Thread (8 messages) 8 messages, 4 authors, 2024-10-15

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

From: Oliver Neukum <oneukum@suse.com>
Date: 2024-10-14 22:24:32
Also in: linux-usb, lkml

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?

	Regards
		Oliver
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help