aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/sme.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2012-11-12 18:07:53 (GMT)
committerJouni Malinen <j@w1.fi>2012-11-12 18:07:53 (GMT)
commit6e2020210afe355bd0f8fcdb2a68f31746f6f7df (patch)
tree149f7ad9f6f411a178ad99edff457f584ed72a45 /wpa_supplicant/sme.c
parent8713a2e6ff0940c03de9f2289c5c875c4df7bc9b (diff)
downloadhostap-6e2020210afe355bd0f8fcdb2a68f31746f6f7df.zip
hostap-6e2020210afe355bd0f8fcdb2a68f31746f6f7df.tar.gz
hostap-6e2020210afe355bd0f8fcdb2a68f31746f6f7df.tar.bz2
Allow OKC to be enabled by default
Previously, OKC (opportunistic key caching, a.k.a. proactive key caching) could be enabled only with a per-network parameter (proactive_key_caching). The new global parameter (okc) can now be used to change the default behavior to be OKC enabled (okc=1) for network blocks that do not override this with the proactive_key_caching parameter. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/sme.c')
-rw-r--r--wpa_supplicant/sme.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index 7d863fd..f6e106c 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -171,7 +171,9 @@ void sme_send_authentication(struct wpa_supplicant *wpa_s,
wpa_bss_get_ie(bss, WLAN_EID_RSN)) &&
wpa_key_mgmt_wpa(ssid->key_mgmt)) {
int try_opportunistic;
- try_opportunistic = ssid->proactive_key_caching &&
+ try_opportunistic = (ssid->proactive_key_caching < 0 ?
+ wpa_s->conf->okc :
+ ssid->proactive_key_caching) &&
(ssid->proto & WPA_PROTO_RSN);
if (pmksa_cache_set_current(wpa_s->wpa, NULL, bss->bssid,
wpa_s->current_ssid,