aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2020-05-25 13:25:50 (GMT)
committerJouni Malinen <j@w1.fi>2020-05-25 13:25:50 (GMT)
commitc2080e8657f812f504ff44011115ab5816b2ce3f (patch)
treec25d3e03f63cd4cbac317a63ae53090071791c52
parentbf47f0542f7dee6d3a476cf971b6c51b84a43957 (diff)
downloadhostap-c2080e8657f812f504ff44011115ab5816b2ce3f.zip
hostap-c2080e8657f812f504ff44011115ab5816b2ce3f.tar.gz
hostap-c2080e8657f812f504ff44011115ab5816b2ce3f.tar.bz2
Clear current PMKSA cache selection on association/roam
It was possible for the RSN state machine to maintain old PMKSA cache selection (sm->cur_pmksa) when roaming to another BSS based on driver-based roaming indication. This could result in mismatching state and unexpected behavior, e.g., with not generating a Suite B PMKSA cache entry. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
-rw-r--r--src/rsn_supp/pmksa_cache.c3
-rw-r--r--wpa_supplicant/events.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/rsn_supp/pmksa_cache.c b/src/rsn_supp/pmksa_cache.c
index bd32cef..4a175f1 100644
--- a/src/rsn_supp/pmksa_cache.c
+++ b/src/rsn_supp/pmksa_cache.c
@@ -485,6 +485,9 @@ void pmksa_cache_clear_current(struct wpa_sm *sm)
{
if (sm == NULL)
return;
+ if (sm->cur_pmksa)
+ wpa_printf(MSG_DEBUG,
+ "RSN: Clear current PMKSA entry selection");
sm->cur_pmksa = NULL;
}
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 46341e9..f0f9189 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -356,6 +356,9 @@ static void wpa_find_assoc_pmkid(struct wpa_supplicant *wpa_s)
int pmksa_set = -1;
size_t i;
+ /* Start with assumption of no PMKSA cache entry match */
+ pmksa_cache_clear_current(wpa_s->wpa);
+
if (wpa_sm_parse_own_wpa_ie(wpa_s->wpa, &ie) < 0 ||
ie.pmkid == NULL)
return;