]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[netdevice] Avoid registering duplicate network devices
authorMichael Brown <mcb30@ipxe.org>
Wed, 30 Jul 2014 17:11:20 +0000 (18:11 +0100)
committerMichael Brown <mcb30@ipxe.org>
Wed, 30 Jul 2014 17:22:09 +0000 (18:22 +0100)
commit98d09a1e0372226bdea46f7dc8ce7f0cae98f08c
treee530ade6bf7cda0565eddb67cfa250635c22697b
parent057eb9e496b4d6e04864df48f3855f014da53aeb
[netdevice] Avoid registering duplicate network devices

Reject network devices which appear to be duplicates of those already
available via a different underlying hardware device.  On a Xen PV-HVM
system, this allows us to filter out the emulated PCI NICs (which
would otherwise appear alongside the netfront NICs).

Note that we cannot use the Xen facility to "unplug" the emulated PCI
NICs, since there is no guarantee that the OS we subsequently load
will have a native netfront driver.

We permit devices with the same MAC address if they are attached to
the same underlying hardware device (e.g. VLAN devices).

Inspired-by: Marin Hannache <git@mareo.fr>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/include/ipxe/netdevice.h
src/net/netdevice.c