mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-14 17:00:45 +02:00
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.
This commit is contained in:
parent
60c2f6c596
commit
e019132033
1 changed files with 10 additions and 6 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue