aboutsummaryrefslogtreecommitdiffstats
path: root/src/rsn_supp
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-08-03 17:16:59 (GMT)
committerJouni Malinen <j@w1.fi>2008-08-03 17:16:59 (GMT)
commit3ff77e070de25ba9c78528906079e54377e61a95 (patch)
tree6c22bbd6ec5014ac5126ab21366d2d496ad493ea /src/rsn_supp
parent3fbda8f943fff3e8afd649663bdcbba9cbfd6ee3 (diff)
downloadhostap-06-3ff77e070de25ba9c78528906079e54377e61a95.zip
hostap-06-3ff77e070de25ba9c78528906079e54377e61a95.tar.gz
hostap-06-3ff77e070de25ba9c78528906079e54377e61a95.tar.bz2
Fixed opportunistic key caching (OKC)
wpa_sm_set_config() can be called even if the network block does not change. However, the previous version ended up calling pmksa_cache_notify_reconfig() every time and this cleared the network context from PMKSA cache entries. This prevented OKC from ever being used. Do not call pmksa_cache_notify_reconfig() if the network context remains unchanged to allow OKC to be used.
Diffstat (limited to 'src/rsn_supp')
-rw-r--r--src/rsn_supp/wpa.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c
index 29d900e..89ca473 100644
--- a/src/rsn_supp/wpa.c
+++ b/src/rsn_supp/wpa.c
@@ -2014,7 +2014,8 @@ void wpa_sm_set_config(struct wpa_sm *sm, struct rsn_supp_config *config)
sm->eap_conf_ctx = NULL;
sm->ssid_len = 0;
}
- pmksa_cache_notify_reconfig(sm->pmksa);
+ if (config == NULL || config->network_ctx != sm->network_ctx)
+ pmksa_cache_notify_reconfig(sm->pmksa);
}