From 98d09a1e0372226bdea46f7dc8ce7f0cae98f08c Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 30 Jul 2014 18:11:20 +0100 Subject: [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 Signed-off-by: Michael Brown --- src/include/ipxe/netdevice.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/include') diff --git a/src/include/ipxe/netdevice.h b/src/include/ipxe/netdevice.h index 6ef9cb1e5..95ad1cf1b 100644 --- a/src/include/ipxe/netdevice.h +++ b/src/include/ipxe/netdevice.h @@ -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, -- cgit v1.2.3-55-g7522