The igb driver currently requires a VF interface to have a non-zero MAC
address, but the associated PF is giving the VF an all zeros MAC address when one is not administratively assigned. The driver should check for this case and generate a random address, similar to how the linux igbvf driver does. Submitted by: skoumjian@juniper.net (Scott Koumjian) MFH: 2 weeks Differential Revision: https://reviews.freebsd.org/D8399
This commit is contained in:
parent
aabc5ce043
commit
525e07418c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=308429
@ -590,12 +590,21 @@ igb_attach(device_t dev)
|
||||
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 */
|
||||
if (igb_setup_interface(dev, adapter) != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user