Subject: Re: [PATCH net] net: usb: usbnet: fix name regression

From: Simon Horman <[email-masked]>
Date: Thu, 17 Oct 2024 17:11:10 +0100

On Thu, Oct 17, 2024 at 09:18:37AM +0200, Oliver Neukum wrote:
> The fix for MAC addresses broke detection of the naming convention
> because it gave network devices no random MAC before bind()
> was called. This means that the check for the local assignment bit
> was always negative as the address was zeroed from allocation,
> instead of from overwriting the MAC with a unique hardware address.
> 
> The correct check for whether bind() has altered the MAC is
> done with is_zero_ether_addr
> 
> Signed-off-by: Oliver Neukum <[email-masked]>
> Reported-by: Greg Thelen <[email-masked]>
> Diagnosed-by: John Sperbeck <[email-masked]>
> Fixes: bab8eb0dd4cb9 ("usbnet: modern method to get random MAC")

I accidently provided my feedback in response to an earlier version [1]
https://lore.kernel.org/all/[email-masked]/

It is:

I think works for the case where a random address will be assigned
as per the cited commit. But I'm unsure that is correct wrt
to the case where ->bind assigns an address with 0x2 set in the 0th octet.

Can that occur in practice? Perhaps not because the driver would
rely on usbnet_probe() to set a random address. But if so then
it would previously have hit the "eth%d" logic, but does not anymore.