Web lists-archives.com

Re: I'd like help reporting an anomaly/bug with wifi and NetworkManager under Buster


On Mon, Dec 03, 2018 at 09:41:21AM -0600, craig macdonald wrote:
> Hello all,
> I've discovered a small bug in linux (wifi?) networking, but I haven't
> been able to report it because I don't seem to know the correct
> package to report the bug against.

Actually you've discovered a Network Manager's inability to associate
with AP. You shown nothing that proves something else.

> The computer uses NetworkManager to manage the wifi connenction.

What's more important is that:

1) The computer in question has udev which likes to rename network
interface names to be 'Predictable'. udev can be considered a part of
systemd, for the simplicity.

2) The wifi dongle in question is a USB device, so a rather dumb ruleset
called 73-usb-net-by-mac.rules applies to it.

3) Network Manager likes to use randomly generated MAC for WiFi AP
scanning, but it reverts to a 'native' MAC before actual AP association.

4) There are WiFi dongles which firmware does not allow you to change
their MAC, but Ralink does not have this deficiency.

Remove a single variable from this and it solves the problem:

1) Make a network interface name in question static. 
Any name that does not depends on MAC should do the trick.

2) Blacklist 73-usb-net-by-mac.rules. Does more harm than good anyway.

3) Remove Network Manager and use wpa_supplicant which *is* the
cornerstone of Linux wireless networking.

4) Or use PCI Wifi, not USB one.

> I found a workaround (detailed below) to allow this usb wifi adapter
> to work under Buster. Wishing to be a good FOSS citizen, I filed a bug
> report against the firmware-misc-nonfree (firmware-ralink) package
> (that was my best guess for the location of the problem).
> After a day or so, the maintainer of the package firmware-ralink
> closed the bug report, saying "This has nothing to do with
> firmware-ralink. Neither the firmware nor the driver cares what the
> device name is."

The maintainer is correct.
One should fix Network Manager, or udev rule, or convince systemd
upstream to ditch this '(Un)Predictable Network Interface Names', but
there's nothing to fix in either the firmware or the kernel.

> OK, fine, but how should I now proceed at this point?

See above.

> I'd like to help the community correct what seems to be a problem somewhere in the linux networking system,

No that's not the problematic part if you mean the kernel.
And there's nothing wrong in udev.
And whoever wrote that AP-scanning part in Network Manager surely had
the best intentions (users' privacy and the like).

> possibly specific to wifi,

Nope. Any USB-provided NIC can be 'broken' the same way.

> but I have NO IDEA what package to mention

Network Manager, of course. Unless you can prove (with a simple
reproducible wpa_supplicant/iproute combo) otherwise.