diff options
author | Milan Broz <gmazyland@gmail.com> | 2024-06-05 17:33:40 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-06-06 17:33:12 -0700 |
commit | cb6cf0820f22ca36dc8f95cf1bd196e5ec24e69d (patch) | |
tree | 18480b00aa11e65796c60975af6996db21bed1f2 | |
parent | 62b5bf58b928f0f4fcc8bb633b63795517825d31 (diff) |
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 <gmazyland@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20240605153340.25694-1-gmazyland@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-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); |