aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/dpp_supplicant.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-11-29 22:07:50 (GMT)
committerJouni Malinen <j@w1.fi>2017-11-29 22:08:40 (GMT)
commit1866dfb52c5abb38275dc11f08dc8a453d57652b (patch)
treef345e8f950c0335dc47047a7f87d8feb55957030 /wpa_supplicant/dpp_supplicant.c
parentf981ce7298e6cf6fe1480605e53255edaf72dd26 (diff)
downloadhostap-1866dfb52c5abb38275dc11f08dc8a453d57652b.zip
hostap-1866dfb52c5abb38275dc11f08dc8a453d57652b.tar.gz
hostap-1866dfb52c5abb38275dc11f08dc8a453d57652b.tar.bz2
DPP: Stop pending GAS client operation on DPP_STOP_LISTEN
This makes the operation more complete in stopping all ongoing DPP related functionality. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/dpp_supplicant.c')
-rw-r--r--wpa_supplicant/dpp_supplicant.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c
index 8661672..11ac450 100644
--- a/wpa_supplicant/dpp_supplicant.c
+++ b/wpa_supplicant/dpp_supplicant.c
@@ -1314,6 +1314,8 @@ static void wpas_dpp_gas_resp_cb(void *ctx, const u8 *addr, u8 dialog_token,
const u8 *pos;
struct dpp_authentication *auth = wpa_s->dpp_auth;
+ wpa_s->dpp_gas_dialog_token = -1;
+
if (!auth || !auth->auth_success) {
wpa_printf(MSG_DEBUG, "DPP: No matching exchange in progress");
return;
@@ -1422,6 +1424,7 @@ static void wpas_dpp_start_gas_client(struct wpa_supplicant *wpa_s)
} else {
wpa_printf(MSG_DEBUG,
"DPP: GAS query started with dialog token %u", res);
+ wpa_s->dpp_gas_dialog_token = res;
}
}
@@ -2450,6 +2453,8 @@ void wpas_dpp_stop(struct wpa_supplicant *wpa_s)
wpa_s->dpp_auth = NULL;
dpp_pkex_free(wpa_s->dpp_pkex);
wpa_s->dpp_pkex = NULL;
+ if (wpa_s->dpp_gas_client && wpa_s->dpp_gas_dialog_token >= 0)
+ gas_query_stop(wpa_s->gas, wpa_s->dpp_gas_dialog_token);
}