Skip to content

Commit

Permalink
r8152: Set NET_ADDR_STOLEN if using passthru MAC
Browse files Browse the repository at this point in the history
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
systemd/systemd#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]>
  • Loading branch information
mbroz authored and kuba-moo committed Jun 7, 2024
1 parent 62b5bf5 commit cb6cf08
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/usb/r8152.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit cb6cf08

Please sign in to comment.