forked from espressif/esp-idf
Merge branch 'bugfix/flush_pmk_for_akm_change_v5.0' into 'release/v5.0'
esp_wifi: Flush PMK caching if bss akm has changed(backport v5.0) See merge request espressif/esp-idf!21646
This commit is contained in:
@@ -2331,8 +2331,15 @@ int wpa_set_bss(char *macddr, char * bssid, u8 pairwise_cipher, u8 group_cipher,
|
||||
sm->key_mgmt == WPA_KEY_MGMT_OWE ||
|
||||
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;
|
||||
|
||||
|
Reference in New Issue
Block a user