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>
This commit is contained in:
Jouni Malinen 2016-07-18 00:57:34 +03:00
parent ab6ab07ad1
commit f8608fab85

View file

@ -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, nbuf = os_realloc_array(wpa_s->sme.sa_query_trans_id,
wpa_s->sme.sa_query_count + 1, wpa_s->sme.sa_query_count + 1,
WLAN_SA_QUERY_TR_ID_LEN); WLAN_SA_QUERY_TR_ID_LEN);
if (nbuf == NULL) if (nbuf == NULL) {
sme_stop_sa_query(wpa_s);
return; return;
}
if (wpa_s->sme.sa_query_count == 0) { if (wpa_s->sme.sa_query_count == 0) {
/* Starting a new SA Query procedure */ /* Starting a new SA Query procedure */
os_get_reltime(&wpa_s->sme.sa_query_start); 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) { if (os_get_random(trans_id, WLAN_SA_QUERY_TR_ID_LEN) < 0) {
wpa_printf(MSG_DEBUG, "Could not generate SA Query ID"); wpa_printf(MSG_DEBUG, "Could not generate SA Query ID");
sme_stop_sa_query(wpa_s);
return; return;
} }