Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147019493
D8399.id22065.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
815 B
Referenced Files
None
Subscribers
None
D8399.id22065.diff
View Options
Index: head/sys/dev/e1000/if_igb.c
===================================================================
--- head/sys/dev/e1000/if_igb.c
+++ head/sys/dev/e1000/if_igb.c
@@ -590,11 +590,20 @@
error = EIO;
goto err_late;
}
- /* Check its sanity */
- if (!igb_is_valid_ether_addr(adapter->hw.mac.addr)) {
- device_printf(dev, "Invalid MAC address\n");
- error = EIO;
- goto err_late;
+
+ /* Check its sanity */
+ if (!igb_is_valid_ether_addr(adapter->hw.mac.addr)) {
+ if (adapter->vf_ifp) {
+ u8 addr[ETHER_ADDR_LEN];
+ arc4rand(&addr, sizeof(addr), 0);
+ addr[0] &= 0xFE;
+ addr[0] |= 0x02;
+ bcopy(addr, adapter->hw.mac.addr, sizeof(addr));
+ } else {
+ device_printf(dev, "Invalid MAC address\n");
+ error = EIO;
+ goto err_late;
+ }
}
/* Setup OS specific network interface */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 8, 4:15 PM (12 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29391016
Default Alt Text
D8399.id22065.diff (815 B)
Attached To
Mode
D8399: igb driver to generate random MAC address for VF interface when none assigned
Attached
Detach File
Event Timeline
Log In to Comment