supplicant: allow PMF with SAE

PMF can be used with SAE, allow it. Actually, it is required according
to WPA3 specifications but there are implementations that don't
require it (hostapd can be configured in a such way); so let's not
make it mandatory for WPA3.

Fixes: 6640fb4b36 ('supplicant: add support for SAE key management')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/257
(cherry picked from commit e36c297fd8)
This commit is contained in:
Beniamino Galvani 2019-10-09 11:55:27 +02:00
parent 2c4195bb74
commit 299fbc0888
2 changed files with 2 additions and 3 deletions

View file

@ -881,8 +881,8 @@ nm_supplicant_config_add_setting_wireless_security (NMSupplicantConfig *self,
}
}
/* Don't try to enable PMF on non-WPA networks */
if (!NM_IN_STRSET (key_mgmt, "wpa-eap", "wpa-psk"))
/* Don't try to enable PMF on non-WPA/SAE networks */
if (!NM_IN_STRSET (key_mgmt, "wpa-eap", "wpa-psk", "sae"))
pmf = NM_SETTING_WIRELESS_SECURITY_PMF_DISABLE;
/* Check if we actually support PMF */

View file

@ -430,7 +430,6 @@ test_wifi_sae_psk (const char *psk)
NMTST_EXPECT_NM_INFO ("Config: added 'proto' value 'RSN'");
NMTST_EXPECT_NM_INFO ("Config: added 'pairwise' value 'TKIP CCMP'");
NMTST_EXPECT_NM_INFO ("Config: added 'group' value 'TKIP CCMP'");
NMTST_EXPECT_NM_INFO ("Config: added 'ieee80211w' value '0'");
config_dict = build_supplicant_config (connection, 1500, 0, TRUE, TRUE);
g_test_assert_expected_messages ();