On 3/24/20 11:07 AM, Andrej Shadura wrote:
Could you please provide more background? It’s not quite clear to me how
this commit fixes the issue.
Hello Andrej,
I'm happy to provide the "end user" side of the story, but I can't
provide the "developer" side, as it's the Realtek engineers that
pinpointed this, I'm not familiar with the wpa codebase at all, and I
can't comment why this patch fixes this issue.
So, the background is:
MAC address randomization was enabled for all wifi adapters; then users
reported "keeps asking for a password" problems; the real problem was
never pinpointed, they blamed "it's an issue with these Realtek drivers,
tell them to fix them", and the "disable MAC randomization workaround"
was proposed until the real issue is fixed.
So I did report this to Realtek, and they came up with the fix, but it
was not in their drivers as I expected, but in wpasupplicant.
Nevertheless, I tested it and it indeed solves the issue.
They also proposed a second workaround, that ifname=0 in the kernel
cmdline also works around the issue, and I tested it, and indeed that
works as well.
Then, realizing that it's not related to Realtek drivers, I tested with
an atheros-based wifi adapter, and that one was affected as well.
So, to reproduce the issue, the following are needed (which are the
default in Debian):
1) In /etc/NetworkManager/NetworkManager.conf, to either have the
following, or leave it undefined (while e.g. Ubuntu has "no" there):
[device]
wifi.scan-rand-mac-address=yes
2) Make sure that the USB id isn't "blacklisted" in
/usr/lib/NetworkManager/conf.d/no-mac-addr-change.conf
3) Restart network manager if there were changes:
systemctl stop network-manager
killall wpa_supplicant
systemctl start network-manager
4) Insert a wifi adapter that produces a name with 15 characters like
wlx74ee2ae2436a.
And the result is that without the patch it will keep asking for a password,
while with the patch, it'll work fine.
So I believe that if this is triaged / fixed, then there won't be any
need to apply the "disable MAC randomization" workarounds.
Thanks!