Merge branch 'bugfix/allow_m1_for_pmk_cache_v5.2' into 'release/v5.2'

fix(esp_wifi): Allow M1 in pmk caching case (v5.2)

See merge request espressif/esp-idf!49034
This commit is contained in:
Jiang Jiang Jian
2026-06-01 18:03:14 +08:00
+6 -3
View File
@@ -657,9 +657,11 @@ void wpa_supplicant_process_1_of_4(struct wpa_sm *sm,
#ifdef CONFIG_ESP_WIFI_ENTERPRISE_SUPPORT
if (is_wpa2_enterprise_connection()) {
wpa2_ent_eap_state_t state = eap_client_get_eap_state();
if (state != WPA2_ENT_EAP_STATE_SUCCESS) {
wpa_printf(MSG_INFO, "EAP not completed (state=%d)."
" Drop EAPOL message.", state);
if (state == WPA2_ENT_EAP_STATE_IN_PROGRESS || sm->pmk_len == 0) {
wpa_printf(MSG_INFO,
"Drop EAPOL M1: EAP state=%d, pmk_len=%u.",
state, (unsigned int) sm->pmk_len);
return;
}
}
@@ -2368,6 +2370,7 @@ int wpa_set_bss(char *macddr, char * bssid, u8 pairwise_cipher, u8 group_cipher,
if (pmksa) {
pmksa_cache_flush(sm->pmksa, NULL, pmksa->pmk, pmksa->pmk_len);
}
wpa_sm_drop_sa(sm);
}
#ifdef CONFIG_IEEE80211W