Bug 30859 - NetworkManager and Mageia Networking App fail to connect to open and unencrypted Wifi
Summary: NetworkManager and Mageia Networking App fail to connect to open and unencryp...
Status: RESOLVED WONTFIX
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-17 18:41 CEST by Elmar Stellnberger
Modified: 2022-12-13 21:50 CET (History)
2 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments
iwlist wlp58s0 scanning script to show unencrypted wlans (116 bytes, text/plain)
2022-09-17 18:43 CEST, Elmar Stellnberger
Details
script to connect to one of the listed Wifis (195 bytes, text/plain)
2022-09-17 18:43 CEST, Elmar Stellnberger
Details
here is how to use these scripts including their screen output (2.13 KB, text/plain)
2022-09-17 18:47 CEST, Elmar Stellnberger
Details
script calling "iw dev wlp58s0 scan" (685 bytes, application/x-perl)
2022-09-18 22:19 CEST, Elmar Stellnberger
Details
awk-ed output of "iw dev wlp58s0 scan" (1.45 KB, text/plain)
2022-09-18 22:24 CEST, Elmar Stellnberger
Details
console messages of net_applet (trying to connect to open wifi) (1.06 KB, text/plain)
2022-09-18 23:27 CEST, Elmar Stellnberger
Details
iw --debug dev wlp58s0 connect -w "Pareus Beach Resort": sucess (9.40 KB, text/plain)
2022-09-18 23:46 CEST, Elmar Stellnberger
Details

Description Elmar Stellnberger 2022-09-17 18:41:11 CEST
NetworkManager did to my knowledge not show the open and unencrypted Wifis correctly since there is no way to connect without entering a PSK/password. The Mageia Networking App shows an open lock for such Wifis but in case of the Pareus Wifi it could not connect. The only way for me was to shut down NetworkManager and quit the Mageia Networking App and then get access via iwlist, iwconfig and dhclient. I will upload the scripts I am using to connect along with the screen output produced by them. 
  There is an interesting issue on why the Mageia Networking App may have failed: The encrypted and the free & open Wifi have both the same ESSID and automatic access point selection after the assignment of the ESSID fails. You have to set an access point explicitly by "iwconfig wlp58s0 ap XXXX". Likely the kernel driver does not support open and encrypted Wifis with same ESSID for auto-access-point selection so that the App would have to implement this manually.
  Futhermore I have heard that iwlist is said to be deprectaed. What else shall I use here?
Comment 1 Elmar Stellnberger 2022-09-17 18:43:07 CEST
Created attachment 13378 [details]
iwlist wlp58s0 scanning script to show unencrypted wlans
Comment 2 Elmar Stellnberger 2022-09-17 18:43:46 CEST
Created attachment 13379 [details]
script to connect to one of the listed Wifis
Comment 3 Elmar Stellnberger 2022-09-17 18:47:33 CEST
Created attachment 13380 [details]
here is how to use these scripts including their screen output

note: Associating an acess point may not always work at the first attempt.
Comment 4 Elmar Stellnberger 2022-09-17 18:48:55 CEST
related: bug 30857
It documents that you can not simply connect to the encrypted Wifis with the same essid using wpa_supplicant. That seems to be another bug.
Comment 5 sturmvogel 2022-09-17 19:12:39 CEST
(In reply to Elmar Stellnberger from comment #0)
> NetworkManager did to my knowledge not show the open and unencrypted Wifis
> correctly since there is no way to connect without entering a PSK/password.
> The Mageia Networking App shows an open lock for such Wifis but in case of
> the Pareus Wifi it could not connect. 

Networkmanager under Mageia connects perfectly fine to unencrypted/open Wifis. You are using a completely borked and broken setup for your wifis (same SSIDS several times for different Wifis with different encryption).

This one seems completely INVALID.
Comment 6 Elmar Stellnberger 2022-09-17 20:00:44 CEST
It is not me who has set up these Wifis. It is the Pareus Beach resort. I would suggest that Linux should connect to anything that Android and Windows do.
Comment 7 Elmar Stellnberger 2022-09-17 22:36:27 CEST
If it works with Android, MacOS and Windows then it has to work on a Linux laptop, too!
Comment 8 sturmvogel 2022-09-17 22:48:09 CEST
(In reply to Elmar Stellnberger from comment #7)
> If it works with Android, MacOS and Windows then it has to work on a Linux
> laptop, too!

Android is not MacOS is not Windows is not Linux!
Did you try with other linux distributions?
Why do you believe it is a Mageia only problem?
Did you file an upstream bugreport for networkmanager?
Why should Mageia fix something at their tools for an obscure wifi in italy?
Did you notify the owner if this obscure wifi in italy about this problems?
Comment 9 Elmar Stellnberger 2022-09-17 23:07:59 CEST
No, I didn´t notify the owner of the Wifi. It works for me with iwlist and iwconfig using the scripts posted here. I didn´t file an upstream bug for NetworkManager since I am on holiday here and I won´t have much time for it. Moreover I´d rather like bug 30857 to be investigated before. The Mageia Networking App almost supported it to my knowledge; at least it has displayed both Wifis as far as I remember. How can I start the Mageia Networking App from the command line?
Comment 10 Elmar Stellnberger 2022-09-17 23:12:29 CEST
I would have a Debian on this laptop as well, but NetworkManager will most likely do the same there so I don´t believe it is worth testing that. I won´t have the time to compile software here so an upstream report would be futile. Possibly the Mageia App can be adapted to support this use case. Besides this I have asked on why iwlist is considered deprecated and what it shall replace in the future. Where can I read that iwlist is considered deprecated?
Comment 11 Elmar Stellnberger 2022-09-17 23:21:15 CEST
There may be many other Wifis like this one. Non-Linux admins won´t care for it if it works on Android, the iPhone and Mac & Win computers. If you can still connect with iwlist and iwconfig nobody with Linux goes for the work to file a report about it either. Most people won´t do that and who knows about these tools being flagged deprecated?
Comment 14 Elmar Stellnberger 2022-09-17 23:38:28 CEST
My second question was on how to start the Mageia Networking App.
Comment 15 sturmvogel 2022-09-17 23:41:59 CEST
net_applet
Comment 16 sturmvogel 2022-09-17 23:59:02 CEST
Hopefully the networkmanager devs will turn this request down. Everybody with a little bit of technical knowledge won't setup several wifi AP in the same range with same ESSID but different encrytion/open mode. Every client which is properly designed and configured won't be able to connect to these wifi network. The client is in the range of as example two AP's with same ESSID but different encryption? What? The client logicaly refuses to connect to this ESSID. All well designed clients expect the same authentication method across all APs with the same ESSID.

A really bad IT-guy in this resort in italy....
Comment 17 Elmar Stellnberger 2022-09-18 09:08:55 CEST
I am not interested in what you think is a well configured Wifi. I am interested in having internet access here and there. To me it appears perfectly reasonable to have encrypted and unencrypted offers under the same essid since with many networks you may not want to remember different essids for different authentication mechanisms.
Comment 18 Elmar Stellnberger 2022-09-18 10:04:55 CEST
This is not about mixing different authentication mechanisms. It is about having an unencrypted Wifi as a fallback and this is perfectly reasonable.
Comment 19 Morgan Leijström 2022-09-18 11:56:23 CEST
Even if stupid, people may compare connectivity between Mageia and other OS:es and then it is good if it works.

That said it may not be good security wise if it switch to unencrypted if user prefer to only connect encrypted.  I fail to remember if we can restrict connection type by a setting.

CC: (none) => fri

Comment 20 sturmvogel 2022-09-18 12:59:21 CEST
Nope. There is only a missconfiguration on Elmars and the wifi side. It's a complete mess. See bug 30857. The italy wifi has no BSSID set for their encrypted wifi. But they have set the BSSID "Pareus Beach Resort" for their unecrypted wifi. Elmar tries to connect with a self written wpa config (configured for encryption) to "Pareus Beach Resort". Encrypted auth with unencrypted wifi will fail and vice versa.

In opposite as Elmar claims, that is no common configuration widely found. It is a
 complete mess on the wifi side of this beach ressort. Even "if" a Microsoft BS (which doesn't use Networkmanager or any other open standard tool) connects to this mess, why should Linux follow?

I asked in comment 8 why Elmar believes that this is a Mageia 8 bug and if it is the same with other distributions. In comment 9 Elmar refuses to test with other distributions but demands that Mageia changes its net_applet. Additionally there is a wild mixing of net_applet and networkmanager....
So lets wait for the response of the networkmanager devs...
Comment 21 Morgan Leijström 2022-09-18 13:01:51 CEST
Thank you for the summing up :)
Comment 22 sturmvogel 2022-09-18 13:04:31 CEST
Additionally one could read out of comment 9 that there is a double usage of networkmanager and net_applet which will lead to a completely messed setup as both managers will spawn their own wpa_supplicant.
Comment 23 sturmvogel 2022-09-18 13:12:28 CEST
Exchange BSSID in my comment 20 with ESSID.
Comment 24 Elmar Stellnberger 2022-09-18 22:14:13 CEST
  No I have not tested NetworkManager together with net_applet. I have tested three different setups
* NetworkManager
* net_applet
* manual connection with iwlist and iwconfig
  If that helps, sure I can test with NetworkManager and Debian. However I doubt it would make any difference.
Comment 25 Elmar Stellnberger 2022-09-18 22:19:14 CEST
Created attachment 13385 [details]
script calling "iw dev wlp58s0 scan"

Now I have rewritten the iwlistpareus script to use "iw" rather than "iwlist". The iw command gives better output and now you can see that both Wifis, the encrypted and unencrypted one do in deed not have the really same essid. "iw" differs between SSID and OWE Transition Mode SSID. See the output of this command which I will post next.
Comment 26 Elmar Stellnberger 2022-09-18 22:24:32 CEST
Created attachment 13386 [details]
awk-ed output of "iw dev wlp58s0 scan"

Now this is the awk-ed output of the new non-deprecated iw utility when it scans for wlans. I will post the non-awked output as before at the sister bug 30857.
Comment 27 Elmar Stellnberger 2022-09-18 23:08:36 CEST
I am now testing with Debian Bullseye and in deed, I would not have expected it, here it connects to the unencrypted Wifi without any problem. Debian NetworkManager has several bugs though: It does not display two different Wifis, one for encrypted and one for the unencrypted Wifi. Second it shows a closed lock although iwconfig reveals that encryption is off. The displayed ESSID is "_owetm_Pareus Beach R3216974253" which is the essid of the unencrypted wlan.
Comment 28 Elmar Stellnberger 2022-09-18 23:14:31 CEST
I have erred before: Under Mageia both programs, NetworkManager and net_applet show two different Wifis. "net_applet" shows the access point mac for the encrypted Wifis instead of the ssid since it apparently fails to get a reasonable ssid here. Under NetworkManager you can in deed view the unencrypted Wifi if you go to "connect with a hidden wireless network". It is displayed as "System Pareus Beach Resort" while the encrypted Wifi is displayed as "Pareus Beach Resort". Under Debian Bullseye there is only one wifi "Pareus Beach Resort".
Comment 29 Elmar Stellnberger 2022-09-18 23:27:37 CEST
Created attachment 13389 [details]
console messages of net_applet (trying to connect to open wifi)

These are the console messages of net_applet when I unconnect from the initially connected wifi and then try to reconnect to the open unencrypted wifi.
Comment 30 Elmar Stellnberger 2022-09-18 23:46:38 CEST
Created attachment 13390 [details]
iw --debug dev wlp58s0 connect -w "Pareus Beach Resort": sucess

  Under both distros Debian Bullseye and Mageia 8 the following command does the trick if you want to connect to the unencrypted Wifi:
> iw dev wlp58s0 connect -w "Pareus Beach Resort"

  I wonder why it selects an unencrypted access point here and whether there is a way to set an essid and thereafter associate to a specific access point explicitly doing two steps rather than one if you are using the new "iw" tool rather than iwconfig.
Comment 31 Elmar Stellnberger 2022-09-18 23:49:59 CEST
Something I could not achieve, neither under Debian Bullseye nor under Mageia 8 is connecting to the encrypted Wifi, which is normally preferred if you don´t VPN; see bug 30857. Perhaps file a report for wpa_supplicant? I don´t know what it does.
Comment 32 Elmar Stellnberger 2022-09-28 14:24:30 CEST
I would love to hear from this before I depart. Nonetheless I am on holiday here and my testing time is limited.
Comment 33 sturmvogel 2022-09-28 15:36:29 CEST
(In reply to Elmar Stellnberger from comment #31)
> Something I could not achieve, neither under Debian Bullseye nor under
> Mageia 8 is 

So after all why do you still believe it is a Mageia problem? What should Mageia do to fix a messed single wifi in an italian beach ressort?
Comment 34 Elmar Stellnberger 2022-09-28 16:58:38 CEST
It is a Mageia problem because it is tested and verified to work under Debian Bullseye (Comment 27) with NetworkManager.
Comment 35 Lewis Smith 2022-12-13 16:25:18 CET
Thank you for all your research at the time.

Given the unique parameters of this bug, it seems fair to close it. Despite the fact that Debian worked, its networking had a different view of things which enabled the 'duplicate' unencrypted access to work. And in comment 30 you give a workaround:
 Under both distros Debian Bullseye and Mageia 8 the following command does the trick if you want to connect to the unencrypted Wifi:
> iw dev wlp58s0 connect -w "Pareus Beach Resort"
If, for example, the bug was "Cannot connect to any open & unencrypted WiFi", that would matter.

Status: NEW => RESOLVED
CC: (none) => lewyssmith
Resolution: (none) => WONTFIX

Comment 36 Elmar Stellnberger 2022-12-13 17:17:17 CET
In deed I don´t know whether other unencrypted Wifis could be affected. Last week I was in Dolenjske Toplice and the hotel had offered two Wifis: an unencrypted called "Balnea" and another encrypted one called "Balnea Apple". The name does somehow indicate that the first one may not work with Apple computers. Since MacOS is also a Unix based on FreebBSD which may run similar software as OSS and since there was no response on this report, I did not test whether the unencrypted Wifi would have worked with Mageia.
Comment 37 Lewis Smith 2022-12-13 21:50:02 CET
I thought curiosity would have led you to try. Never mind.

Note You need to log in before you can comment on or make changes to this bug.