[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f5d30745-fab8-4a03-8d29-3ce32c63c370@lunn.ch>
Date: Wed, 5 Jun 2024 18:39:53 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Milan Broz <gmazyland@...il.com>
Cc: linux-usb@...r.kernel.org, netdev@...r.kernel.org, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
grundler@...omium.org, dianders@...omium.org, hayeswang@...ltek.com,
hkallweit1@...il.com
Subject: Re: [PATCH] r8152: Set NET_ADDR_STOLEN if using passthru MAC
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@...il.com>
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Andrew
Powered by blists - more mailing lists