aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/sme.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-07-17 21:57:34 (GMT)
committerJouni Malinen <j@w1.fi>2016-07-17 21:57:34 (GMT)
commitf8608fab859d68f993e49219e01eb47734e1a507 (patch)
treea6a15bd77b4c55bc25bf22e150beb4c00ce20447 /wpa_supplicant/sme.c
parentab6ab07ad1f27b1207855dae88f1b004e4d1bc4b (diff)
downloadhostap-f8608fab859d68f993e49219e01eb47734e1a507.zip
hostap-f8608fab859d68f993e49219e01eb47734e1a507.tar.gz
hostap-f8608fab859d68f993e49219e01eb47734e1a507.tar.bz2
SME: Fix SA Query local failure handling
If no new sme_sa_query_timer() callback is scheculed, sme_stop_sa_query() needs to be called to allow new SA Query operations to be started after the failure. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/sme.c')
-rw-r--r--wpa_supplicant/sme.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index 3a8f5b1..61fd3b2 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -1585,8 +1585,10 @@ static void sme_sa_query_timer(void *eloop_ctx, void *timeout_ctx)
nbuf = os_realloc_array(wpa_s->sme.sa_query_trans_id,
wpa_s->sme.sa_query_count + 1,
WLAN_SA_QUERY_TR_ID_LEN);
- if (nbuf == NULL)
+ if (nbuf == NULL) {
+ sme_stop_sa_query(wpa_s);
return;
+ }
if (wpa_s->sme.sa_query_count == 0) {
/* Starting a new SA Query procedure */
os_get_reltime(&wpa_s->sme.sa_query_start);
@@ -1597,6 +1599,7 @@ static void sme_sa_query_timer(void *eloop_ctx, void *timeout_ctx)
if (os_get_random(trans_id, WLAN_SA_QUERY_TR_ID_LEN) < 0) {
wpa_printf(MSG_DEBUG, "Could not generate SA Query ID");
+ sme_stop_sa_query(wpa_s);
return;
}