Correct condition for not to use pmk caching

This commit is contained in:
Kapil Gupta
2022-06-02 19:06:41 +05:30
parent 3de609800b
commit 944690a5e7

View File

@@ -2275,7 +2275,7 @@ int wpa_set_bss(char *macddr, char * bssid, u8 pairwise_cipher, u8 group_cipher,
if (sm->key_mgmt == WPA_KEY_MGMT_SAE || if (sm->key_mgmt == WPA_KEY_MGMT_SAE ||
is_wpa2_enterprise_connection()) { is_wpa2_enterprise_connection()) {
if (!esp_wifi_skip_supp_pmkcaching() || use_pmk_cache) { if (!esp_wifi_skip_supp_pmkcaching() && use_pmk_cache) {
pmksa_cache_set_current(sm, NULL, (const u8*) bssid, 0, 0); pmksa_cache_set_current(sm, NULL, (const u8*) bssid, 0, 0);
wpa_sm_set_pmk_from_pmksa(sm); wpa_sm_set_pmk_from_pmksa(sm);
} else { } else {