summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Dreßler <verdre@v0yd.nl>2021-04-23 18:45:32 +0200
committerJonas Dreßler <verdre@v0yd.nl>2021-05-04 14:54:11 +0200
commit6e9854009a887705291707324d659541684a3dee (patch)
tree16f162443d48537e7128f5a5f2074d8fb66ad4b5
parentaa45347e839af391b83f1c4a8a3c5fb35d727169 (diff)
downloadNetworkManager-6e9854009a887705291707324d659541684a3dee.tar.gz
supplicant/interface: Match more ciphers to determine AP security
There can also be APs which don't do wpa-psk, but do support wpa-psk-sha256, so we should match all AKM suites the AP offers to determine the security type we want to assign it.
-rw-r--r--src/core/supplicant/nm-supplicant-interface.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/core/supplicant/nm-supplicant-interface.c b/src/core/supplicant/nm-supplicant-interface.c
index 168dd39c8d..bbd7288e81 100644
--- a/src/core/supplicant/nm-supplicant-interface.c
+++ b/src/core/supplicant/nm-supplicant-interface.c
@@ -271,17 +271,21 @@ security_from_vardict(GVariant *security)
nm_assert(g_variant_is_of_type(security, G_VARIANT_TYPE_VARDICT));
if (g_variant_lookup(security, "KeyMgmt", "^a&s", &array)) {
- if (g_strv_contains(array, "wpa-psk") || g_strv_contains(array, "wpa-ft-psk"))
+ if (g_strv_contains(array, "wpa-psk") || g_strv_contains(array, "wpa-psk-sha256")
+ || g_strv_contains(array, "wpa-ft-psk"))
flags |= NM_802_11_AP_SEC_KEY_MGMT_PSK;
- if (g_strv_contains(array, "wpa-eap") || g_strv_contains(array, "wpa-ft-eap")
- || g_strv_contains(array, "wpa-fils-sha256")
- || g_strv_contains(array, "wpa-fils-sha384"))
+ if (g_strv_contains(array, "wpa-eap") || g_strv_contains(array, "wpa-eap-sha256")
+ || g_strv_contains(array, "wpa-ft-eap") || g_strv_contains(array, "wpa-fils-sha256")
+ || g_strv_contains(array, "wpa-fils-sha384")
+ || g_strv_contains(array, "wpa-fils-ft-sha256")
+ || g_strv_contains(array, "wpa-fils-ft-sha384"))
flags |= NM_802_11_AP_SEC_KEY_MGMT_802_1X;
- if (g_strv_contains(array, "sae"))
+ if (g_strv_contains(array, "sae") || g_strv_contains(array, "ft-sae"))
flags |= NM_802_11_AP_SEC_KEY_MGMT_SAE;
if (g_strv_contains(array, "owe"))
flags |= NM_802_11_AP_SEC_KEY_MGMT_OWE;
- if (g_strv_contains(array, "wpa-eap-suite-b-192"))
+ if (g_strv_contains(array, "wpa-eap-suite-b-192")
+ || g_strv_contains(array, "wpa-ft-eap-sha384"))
flags |= NM_802_11_AP_SEC_KEY_MGMT_EAP_SUITE_B_192;
g_free(array);
}