mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
esp_wifi: Flush PMK caching if bss akm has changed
This commit is contained in:
parent
4a5f26d7fc
commit
81a0c6a27d
@ -2166,8 +2166,15 @@ int wpa_set_bss(char *macddr, char * bssid, u8 pairwise_cipher, u8 group_cipher,
|
||||
if (sm->key_mgmt == WPA_KEY_MGMT_SAE ||
|
||||
is_wpa2_enterprise_connection()) {
|
||||
if (!esp_wifi_skip_supp_pmkcaching() && use_pmk_cache) {
|
||||
pmksa_cache_set_current(sm, NULL, (const u8*) bssid, 0, 0);
|
||||
wpa_sm_set_pmk_from_pmksa(sm);
|
||||
if (pmksa_cache_set_current(sm, NULL, (const u8*) bssid, 0, 0) == 0) {
|
||||
struct rsn_pmksa_cache_entry *pmksa = pmksa_cache_get_current(sm);
|
||||
if (pmksa && (pmksa->akmp != sm->key_mgmt)) {
|
||||
pmksa_cache_clear_current(sm);
|
||||
pmksa_cache_flush(sm->pmksa, NULL, pmksa->pmk, pmksa->pmk_len);
|
||||
}
|
||||
} else {
|
||||
wpa_sm_set_pmk_from_pmksa(sm);
|
||||
}
|
||||
} else {
|
||||
struct rsn_pmksa_cache_entry *entry = NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user