diff options
author | Jouni Malinen <j@w1.fi> | 2011-10-02 19:36:37 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2011-10-02 19:36:37 +0300 |
commit | c3fea272747f738f5723fc577371fe03711d988f (patch) | |
tree | 95b83b9bafb9e296cb1115fb0eb47dc2aec33cfc | |
parent | 0098ce6d29ebbea5b4917960c9240bfea5daca32 (diff) | |
download | external_wpa_supplicant_8_ti-c3fea272747f738f5723fc577371fe03711d988f.zip external_wpa_supplicant_8_ti-c3fea272747f738f5723fc577371fe03711d988f.tar.gz external_wpa_supplicant_8_ti-c3fea272747f738f5723fc577371fe03711d988f.tar.bz2 |
Clear OKC-based PMKSA caching entries if PMK is changed
Whenever PMK gets changed (e.g., due to re-authentication), all PMKSA
caching entries that were created using the previous PMK needs to be
replaced. Previously, only the entry for the current AP was cleared.
Flush the other entries based on network_ctx matches to get rid of the
OKC entries. These entries can then be re-creating using OKC with the
new PMK.
-rw-r--r-- | src/rsn_supp/pmksa_cache.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rsn_supp/pmksa_cache.c b/src/rsn_supp/pmksa_cache.c index fe3d8da..04c9d29 100644 --- a/src/rsn_supp/pmksa_cache.c +++ b/src/rsn_supp/pmksa_cache.c @@ -186,6 +186,14 @@ pmksa_cache_add(struct rsn_pmksa_cache *pmksa, const u8 *pmk, size_t pmk_len, wpa_printf(MSG_DEBUG, "RSN: Replace PMKSA entry for " "the current AP"); pmksa_cache_free_entry(pmksa, pos, 1); + + /* + * If OKC is used, there may be other PMKSA cache + * entries based on the same PMK. These needs to be + * flushed so that a new entry can be created based on + * the new PMK. + */ + pmksa_cache_flush(pmksa, network_ctx); break; } prev = pos; |