]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: usb: usbnet: fix name regression
authorOliver Neukum <oneukum@suse.com>
Thu, 17 Oct 2024 07:18:37 +0000 (09:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Nov 2024 01:02:36 +0000 (02:02 +0100)
commitf4788caad87fc692d8dde36754acc0ce3509c098
tree53972a11410a385ba5d607bf56f396eb68e2c1dc
parent9fd5161b8f01a05a0e3f9bc0647bc4db1e96e6c7
net: usb: usbnet: fix name regression

[ Upstream commit 8a7d12d674ac6f2147c18f36d1e15f1a48060edf ]

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 <oneukum@suse.com>
Reported-by: Greg Thelen <gthelen@google.com>
Diagnosed-by: John Sperbeck <jsperbeck@google.com>
Fixes: bab8eb0dd4cb9 ("usbnet: modern method to get random MAC")
Link: https://patch.msgid.link/20241017071849.389636-1-oneukum@suse.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/usb/usbnet.c