libnm: fix compatibility of OWE-TM with unsecure profiles

A unsecure profile can be used with a OWE-TM network, in which case it
uses the non-OWE BSS.

Signed-off-by: David Bauer <mail@david-bauer.net>
This commit is contained in:
David Bauer 2022-06-16 19:58:00 +02:00 committed by Thomas Haller
parent 482885e6e9
commit 21a19383c8
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -141,6 +141,10 @@ nm_setting_wireless_ap_security_compatible(NMSettingWireless *s_wireless
g_return_val_if_fail(NM_IS_SETTING_WIRELESS(s_wireless), FALSE);
if (!s_wireless_sec) {
/* A OWE-TM network can be used w/o security */
if (ap_wpa == NM_802_11_AP_SEC_KEY_MGMT_OWE_TM
|| (ap_rsn == NM_802_11_AP_SEC_KEY_MGMT_OWE_TM))
return TRUE;
if ((ap_flags & NM_802_11_AP_FLAGS_PRIVACY) || (ap_wpa != NM_802_11_AP_SEC_NONE)
|| (ap_rsn != NM_802_11_AP_SEC_NONE))
return FALSE;