libnm-core: support SAE when determining AP compatibility

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/172
This commit is contained in:
Beniamino Galvani 2019-09-16 16:55:49 +02:00
parent 24bbceed9b
commit 84a86ce55f

View file

@ -205,7 +205,8 @@ nm_setting_wireless_ap_security_compatible (NMSettingWireless *s_wireless,
/* WPA[2]-PSK and WPA[2] Enterprise */
if ( !strcmp (key_mgmt, "wpa-psk")
|| !strcmp (key_mgmt, "wpa-eap")) {
|| !strcmp (key_mgmt, "wpa-eap")
|| !strcmp (key_mgmt, "sae")) {
if (!strcmp (key_mgmt, "wpa-psk")) {
if ( !(ap_wpa & NM_802_11_AP_SEC_KEY_MGMT_PSK)
@ -215,6 +216,10 @@ nm_setting_wireless_ap_security_compatible (NMSettingWireless *s_wireless,
if ( !(ap_wpa & NM_802_11_AP_SEC_KEY_MGMT_802_1X)
&& !(ap_rsn & NM_802_11_AP_SEC_KEY_MGMT_802_1X))
return FALSE;
} else if (!strcmp (key_mgmt, "sae")) {
if ( !(ap_wpa & NM_802_11_AP_SEC_KEY_MGMT_SAE)
&& !(ap_rsn & NM_802_11_AP_SEC_KEY_MGMT_SAE))
return FALSE;
}
// FIXME: should handle WPA and RSN separately here to ensure that