Re: [PATCH] net: usb: usbnet: restore usb%d name exception for local mac addresses
From: Andrew Lunn
Date: Thu Dec 05 2024 - 09:51:50 EST
> > The point about locally administered MAC addresses is that they are
> > locally administered.
>
> Honest question here our of curiosity, my reading of a few random pages
> on the internet is that it would be acceptable for the modem to randomly
> generate it?
> (under the assumption that e.g. a reset would clear it and get me a new
> mac)
>
> Or does it have to be assigned as late as possible, e.g. we'd want linux
> to be generating it in this case?
Honest, answer is, i've never read what IEEE says about locally
administered MAC addresses.
The general pattern in linux is, if there is no alternative, generate
a random MAC address in the locally administered range. The sysadmin
should be able to change it via ip link set address, and more likely
making it 'permanent' by setting it in /etc/network/interfaces or
whatever the distribution uses. I would not be too surprised if some
MAC drivers are broken and that fails.
Since you can change the MAC address at runtime, and you say they do
appear to be somewhat random, i don't see why we cannot live with
this. It can still be locally administrated if need be. But it is no
something we want to see OEMs do, they really should get an OUI.
Andrew