]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - wpa_supplicant/wpa_supplicant.c
OCE: Mandate PMF for WPA2 association with OCE AP
[thirdparty/hostap.git] / wpa_supplicant / wpa_supplicant.c
index 78eef388dfa37d78e166929daed15e3c08a1978c..21ef6fad10523a102cbbc9dc66b7c807e82b25ee 100644 (file)
@@ -1413,7 +1413,8 @@ int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s,
        if (0) {
 #ifdef CONFIG_IEEE80211R
 #ifdef CONFIG_SHA384
-       } else if (sel & WPA_KEY_MGMT_FT_IEEE8021X_SHA384) {
+       } else if ((sel & WPA_KEY_MGMT_FT_IEEE8021X_SHA384) &&
+                  os_strcmp(wpa_supplicant_get_eap_mode(wpa_s), "LEAP") != 0) {
                wpa_s->key_mgmt = WPA_KEY_MGMT_FT_IEEE8021X_SHA384;
                wpa_dbg(wpa_s, MSG_DEBUG,
                        "WPA: using KEY_MGMT FT/802.1X-SHA384");
@@ -1456,7 +1457,8 @@ int wpa_supplicant_set_suites(struct wpa_supplicant *wpa_s,
                wpa_dbg(wpa_s, MSG_DEBUG, "WPA: using KEY_MGMT FILS-SHA256");
 #endif /* CONFIG_FILS */
 #ifdef CONFIG_IEEE80211R
-       } else if (sel & WPA_KEY_MGMT_FT_IEEE8021X) {
+       } else if ((sel & WPA_KEY_MGMT_FT_IEEE8021X) &&
+                  os_strcmp(wpa_supplicant_get_eap_mode(wpa_s), "LEAP") != 0) {
                wpa_s->key_mgmt = WPA_KEY_MGMT_FT_IEEE8021X;
                wpa_dbg(wpa_s, MSG_DEBUG, "WPA: using KEY_MGMT FT/802.1X");
                if (!ssid->ft_eap_pmksa_caching &&
@@ -3229,7 +3231,7 @@ static void wpas_start_assoc_cb(struct wpa_radio_work *work, int deinit)
             params.key_mgmt_suite == WPA_KEY_MGMT_IEEE8021X_SHA256 ||
             params.key_mgmt_suite == WPA_KEY_MGMT_IEEE8021X_SUITE_B ||
             params.key_mgmt_suite == WPA_KEY_MGMT_IEEE8021X_SUITE_B_192))
-               params.req_key_mgmt_offload = 1;
+               params.req_handshake_offload = 1;
 
        if (wpa_s->conf->key_mgmt_offload) {
                if (params.key_mgmt_suite == WPA_KEY_MGMT_IEEE8021X ||