mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 08:50:07 +01:00
libnm/utils: fix build
We don't have NM_WIFI_DEVICE_CAP_IBSS_RSN in 1.20.x series. Don't allow SAE on ad-hoc networks, we don't allow WPA2 in 1.20.x either.
This commit is contained in:
parent
58ffded2d0
commit
cab2e4fc96
1 changed files with 6 additions and 12 deletions
|
|
@ -1296,24 +1296,18 @@ nm_utils_security_valid (NMUtilsSecurityType type,
|
|||
}
|
||||
break;
|
||||
case NMU_SEC_SAE:
|
||||
if (adhoc)
|
||||
return FALSE;
|
||||
if (!(wifi_caps & NM_WIFI_DEVICE_CAP_RSN))
|
||||
return FALSE;
|
||||
if (have_ap) {
|
||||
if (adhoc) {
|
||||
if (!(wifi_caps & NM_WIFI_DEVICE_CAP_IBSS_RSN))
|
||||
return FALSE;
|
||||
if (ap_rsn & NM_802_11_AP_SEC_KEY_MGMT_SAE) {
|
||||
if ( (ap_rsn & NM_802_11_AP_SEC_PAIR_TKIP)
|
||||
&& (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_TKIP))
|
||||
return TRUE;
|
||||
if ( (ap_rsn & NM_802_11_AP_SEC_PAIR_CCMP)
|
||||
&& (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_CCMP))
|
||||
return TRUE;
|
||||
} else {
|
||||
if (ap_rsn & NM_802_11_AP_SEC_KEY_MGMT_SAE) {
|
||||
if ( (ap_rsn & NM_802_11_AP_SEC_PAIR_TKIP)
|
||||
&& (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_TKIP))
|
||||
return TRUE;
|
||||
if ( (ap_rsn & NM_802_11_AP_SEC_PAIR_CCMP)
|
||||
&& (wifi_caps & NM_WIFI_DEVICE_CAP_CIPHER_CCMP))
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue