Re: [PATCHv2 net] usbnet: modern method to get random MAC

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

 





On 15.10.24 01:00, Eric Dumazet wrote:
On Tue, Oct 15, 2024 at 12:24 AM Oliver Neukum <oneukum@xxxxxxxx> wrote:

On 14.10.24 21:59, Eric Dumazet wrote:

As diagnosed by John Sperbeck :

This patch implies all ->bind() method took care of populating net->dev_addr ?

Otherwise the following existing heuristic is no longer working

// heuristic:  "usb%d" for links we know are two-host,
// else "eth%d" when there's reasonable doubt.  userspace
// can rename the link if it knows better.
if ((dev->driver_info->flags & FLAG_ETHER) != 0 &&
      ((dev->driver_info->flags & FLAG_POINTTOPOINT) == 0 ||
       (net->dev_addr [0] & 0x02) == 0))
strscpy(net->name, "eth%d", sizeof(net->name));


Hi,

you need to have a MAC to be an ethernet device, don't you?

Before or after your patch, there was/is a MAC address, eventually random.

The problem is about the test, which is now done while dev->dev_addr
is full of zeroes, which is not a valid address,
as shown by :

Hi,

I am sorry I misunderstood you. Yes, I overlooked the test for whether
the MAC has been altered. I am preparing a patch. Could you give me
John Perbeck's address, so I can include him in "reported-by"?

	Sorry
		Oliver





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

  Powered by Linux