net: only use ethaddrs registered with device node on that device
If an ethaddr is registered with a device node the ethid is set
to 0 via the struct initialization. Now if a device without a node
(for eaxample a USB network adapter) with ethid 0 looks up the
ethaddr it will wrongly get that address assigned, as the ethid
matches.

Avoid this by setting the ethid to something that no device will
ever use when the addr is registered via a device node.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 0b8fbb3 commit 72f68288a5b44f4b6da36bbc762391550016c632
@Lucas Stach Lucas Stach authored on 7 Nov 2018
Sascha Hauer committed on 8 Nov 2018
Showing 1 changed file
View
net/eth.c