Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146977697
D8399.id21938.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
742 B
Referenced Files
None
Subscribers
None
D8399.id21938.diff
View Options
Index: sys/dev/e1000/if_igb.c
===================================================================
--- sys/dev/e1000/if_igb.c
+++ sys/dev/e1000/if_igb.c
@@ -598,9 +598,18 @@
}
/* Check its sanity */
if (!igb_is_valid_ether_addr(adapter->hw.mac.addr)) {
- device_printf(dev, "Invalid MAC address\n");
- error = EIO;
- goto err_pci;
+ if (adapter->vf_ifp) {
+ u8 addr[ETHER_ADDR_LEN];
+ device_printf(dev, "DEBUG Assigning random MAC address\n");
+ 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_pci;
+ }
}
/* Setup OS specific network interface */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 8, 7:02 AM (17 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29398335
Default Alt Text
D8399.id21938.diff (742 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