summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown2014-07-30 19:11:20 +0200
committerMichael Brown2014-07-30 19:22:09 +0200
commit98d09a1e0372226bdea46f7dc8ce7f0cae98f08c (patch)
treee530ade6bf7cda0565eddb67cfa250635c22697b /src/include
parent[efi] Report exact failure when unable to open the device path (diff)
downloadipxe-98d09a1e0372226bdea46f7dc8ce7f0cae98f08c.tar.gz
ipxe-98d09a1e0372226bdea46f7dc8ce7f0cae98f08c.tar.xz
ipxe-98d09a1e0372226bdea46f7dc8ce7f0cae98f08c.zip
[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>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ipxe/netdevice.h2
1 files changed, 2 insertions, 0 deletions
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,