From: Oliver Neukum <oneukum@suse.com>
To: Eric Dumazet <edumazet@google.com>, Oliver Neukum <oneukum@suse.com>
Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
netdev@vger.kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@kernel.org,
John Sperbeck <jsperbeck@google.com>,
Brian Vazquez <brianvv@google.com>
Subject: Re: [PATCHv2 net] usbnet: modern method to get random MAC
Date: Tue, 15 Oct 2024 09:48:56 +0200 [thread overview]
Message-ID: <93a8a951-7e0f-4504-8407-15d920236f9c@suse.com> (raw)
In-Reply-To: <CANn89iJWATVhMVDgq3fcV9zpZRt8nd_bWp3=qRHo8L3tJP==Kg@mail.gmail.com>
On 15.10.24 01:00, Eric Dumazet wrote:
> On Tue, Oct 15, 2024 at 12:24 AM Oliver Neukum <oneukum@suse.com> 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
next prev parent reply other threads:[~2024-10-15 7:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-29 17:50 Oliver Neukum
2024-08-30 8:32 ` Simon Horman
2024-09-03 18:50 ` patchwork-bot+netdevbpf
2024-10-14 19:59 ` Eric Dumazet
2024-10-14 22:24 ` Oliver Neukum
2024-10-14 23:00 ` Eric Dumazet
2024-10-15 7:48 ` Oliver Neukum [this message]
2024-10-15 7:59 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=93a8a951-7e0f-4504-8407-15d920236f9c@suse.com \
--to=oneukum@suse.com \
--cc=brianvv@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jsperbeck@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®