aboutsummaryrefslogtreecommitdiffstats
path: root/src/rsn_supp
diff options
context:
space:
mode:
authorMichael Bernhard <michael.bernhard@bfh.ch>2008-07-06 07:50:53 (GMT)
committerJouni Malinen <j@w1.fi>2008-07-06 07:50:53 (GMT)
commit886a807fb5ced182b582d24549895c5985ec4a8e (patch)
treea7ed488b014c786f14f2f35a47ac971036cba9b7 /src/rsn_supp
parent9d6762cfca831c30c1ce321e4d8ec549897229c3 (diff)
downloadhostap-06-886a807fb5ced182b582d24549895c5985ec4a8e.zip
hostap-06-886a807fb5ced182b582d24549895c5985ec4a8e.tar.gz
hostap-06-886a807fb5ced182b582d24549895c5985ec4a8e.tar.bz2
Make proactive key caching working again
Function 'wpa_sm_set_config' used the argument 'config' as the network context which is a pointer to a local variable of the function 'wpa_supplicant_rsn_supp_set_config'. This is one reason why no proactive key was generated. This network context never matched with the network context saved in the pmksa cache entries. The structure 'rsn_supp_config' has already a member 'network_ctx' which is now filled in by this patch with 'ssid'. Signed-off-by: Michael Bernhard <michael.bernhard@bfh.ch>
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 d1b93eb..29d900e 100644
--- a/src/rsn_supp/wpa.c
+++ b/src/rsn_supp/wpa.c
@@ -1993,8 +1993,8 @@ void wpa_sm_set_config(struct wpa_sm *sm, struct rsn_supp_config *config)
if (!sm)
return;
- sm->network_ctx = config;
if (config) {
+ sm->network_ctx = config->network_ctx;
sm->peerkey_enabled = config->peerkey_enabled;
sm->allowed_pairwise_cipher = config->allowed_pairwise_cipher;
sm->proactive_key_caching = config->proactive_key_caching;
@@ -2006,6 +2006,7 @@ void wpa_sm_set_config(struct wpa_sm *sm, struct rsn_supp_config *config)
} else
sm->ssid_len = 0;
} else {
+ sm->network_ctx = NULL;
sm->peerkey_enabled = 0;
sm->allowed_pairwise_cipher = 0;
sm->proactive_key_caching = 0;