[PATCH RESEND] check for driver SME support when selecting FT suites

Matthew Wang matthewmwang at chromium.org
Mon Apr 15 17:05:51 PDT 2019


Fast BSS Transition (802.11r) cannot be performed without driver support for
Station Management Entity (SME). However, wpa_supplicant will select FT suites
(FT-PSK and FT-EAP) even when the driver does not support it. This change has
wpa_supplicant select the FT suites only if the driver supports SME.

Signed-off-by: Matthew Wang <matthewmwang at chromium.org>
---
 wpa_supplicant/wpa_supplicant.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 20ae588ad..0a758f840 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -1440,7 +1440,8 @@ int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s,
 			pmksa_cache_clear_current(wpa_s->wpa);
 		}
 #endif /* CONFIG_SHA384 */
-	} else if (sel & WPA_KEY_MGMT_FT_IEEE8021X) {
+	} else if ((sel & WPA_KEY_MGMT_FT_IEEE8021X) &&
+		   (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)) {
 		wpa_s->key_mgmt = WPA_KEY_MGMT_FT_IEEE8021X;
 		wpa_dbg(wpa_s, MSG_DEBUG, "WPA: using KEY_MGMT FT/802.1X");
 		if (pmksa_cache_get_current(wpa_s->wpa)) {
@@ -1450,7 +1451,8 @@ int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s,
 				"WPA: Disable PMKSA caching for FT/802.1X connection");
 			pmksa_cache_clear_current(wpa_s->wpa);
 		}
-	} else if (sel & WPA_KEY_MGMT_FT_PSK) {
+	} else if ((sel & WPA_KEY_MGMT_FT_PSK) &&
+		   (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)) {
 		wpa_s->key_mgmt = WPA_KEY_MGMT_FT_PSK;
 		wpa_dbg(wpa_s, MSG_DEBUG, "WPA: using KEY_MGMT FT/PSK");
 #endif /* CONFIG_IEEE80211R */
-- 
2.21.0.rc2.261.ga7da99ff1b-goog




More information about the Hostap mailing list