diff options
| author | Milan Broz <[email protected]> | 2024-06-05 15:33:40 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2024-06-07 00:33:12 +0000 |
| commit | cb6cf0820f22ca36dc8f95cf1bd196e5ec24e69d (patch) | |
| tree | 18480b00aa11e65796c60975af6996db21bed1f2 | |
| parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net (diff) | |
| download | kernel-cb6cf0820f22ca36dc8f95cf1bd196e5ec24e69d.tar.gz kernel-cb6cf0820f22ca36dc8f95cf1bd196e5ec24e69d.zip | |
r8152: Set NET_ADDR_STOLEN if using passthru MAC
Some docks support MAC pass-through - MAC address
is taken from another device.
Driver should indicate that with NET_ADDR_STOLEN flag.
This should help to avoid collisions if network interface
names are generated with MAC policy.
Reported and discussed here
https://github.com/systemd/systemd/issues/33104
Signed-off-by: Milan Broz <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
| -rw-r--r-- | drivers/net/usb/r8152.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 09fe70bc45d4..15e12f46d0ea 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -1774,6 +1774,7 @@ static int vendor_mac_passthru_addr_read(struct r8152 *tp, struct sockaddr *sa) goto amacout; } memcpy(sa->sa_data, buf, 6); + tp->netdev->addr_assign_type = NET_ADDR_STOLEN; netif_info(tp, probe, tp->netdev, "Using pass-thru MAC addr %pM\n", sa->sa_data); |
