mirror of
https://github.com/ipxe/ipxe
synced 2025-12-23 21:41:43 +03:00
[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>
This commit is contained in:
@@ -685,6 +685,8 @@ extern struct net_device * find_netdev ( const char *name );
|
||||
extern struct net_device * find_netdev_by_index ( unsigned int index );
|
||||
extern struct net_device * find_netdev_by_location ( unsigned int bus_type,
|
||||
unsigned int location );
|
||||
extern struct net_device *
|
||||
find_netdev_by_ll_addr ( struct ll_protocol *ll_protocol, const void *ll_addr );
|
||||
extern struct net_device * last_opened_netdev ( void );
|
||||
extern int net_tx ( struct io_buffer *iobuf, struct net_device *netdev,
|
||||
struct net_protocol *net_protocol, const void *ll_dest,
|
||||
|
||||
Reference in New Issue
Block a user