Re: [PATCH] r8152: Set NET_ADDR_STOLEN if using passthru MAC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 05, 2024 at 05:33:40PM +0200, Milan Broz wrote:
> 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

MAC pass-through is broken, and expected to cause problems. We
strongly push back on any patches trying to add more instances of
it.

Ideally it needs to be done in user space where you have full access
to the tree of devices, can determine if the device getting the MAC
address really is in a dock, is the first dock in a chain of docks,
and not a USB dongle etc.

Using NET_ADDR_STOLEN is interesting. It is currently used in bonding,
when the bond device takes the MAC address from one of its slaves. It
is also used with VLAN interfaces, which inherit the MAC address of
the base interface. There is a clear relationship between the two
interfaces using the same MAC address. However in the pass through
case, the interfaces are unrelated.

However, the code says:

#define NET_ADDR_STOLEN		2	/* address is stolen from other device */

which is exactly what is happening here.

> Signed-off-by: Milan Broz <gmazyland@xxxxxxxxx>

Reviewed-by: Andrew Lunn <andrew@xxxxxxx>

    Andrew




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux