aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-11-27 11:48:40 (GMT)
committerJouni Malinen <j@w1.fi>2017-11-27 11:48:40 (GMT)
commit82feacced044b202826e9eb3b8437f06b89c2848 (patch)
treef230613b023c9ff05c1bf8eefdf3e499cbd34d85 /wpa_supplicant
parent73a7feb3114bcd4936d5fee42751906ca246924d (diff)
downloadhostap-82feacced044b202826e9eb3b8437f06b89c2848.zip
hostap-82feacced044b202826e9eb3b8437f06b89c2848.tar.gz
hostap-82feacced044b202826e9eb3b8437f06b89c2848.tar.bz2
DPP: Ignore GAS server status callback for unknown response
It was possible for a timeout from an old GAS server operation to trigger DPP configuration failure during the subsequent DPP operation. Fix this by verifying that the status callback is for the response generated during the same DPP Authentication/Configuration exchange. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/dpp_supplicant.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c
index 13b5326..05fe0c8 100644
--- a/wpa_supplicant/dpp_supplicant.c
+++ b/wpa_supplicant/dpp_supplicant.c
@@ -2045,6 +2045,7 @@ wpas_dpp_gas_req_handler(void *ctx, const u8 *sa, const u8 *query,
resp = dpp_conf_req_rx(auth, query, query_len);
if (!resp)
wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_CONF_FAILED);
+ auth->conf_resp = resp;
return resp;
}
@@ -2059,6 +2060,13 @@ wpas_dpp_gas_status_handler(void *ctx, struct wpabuf *resp, int ok)
wpabuf_free(resp);
return;
}
+ if (auth->conf_resp != resp) {
+ wpa_printf(MSG_DEBUG,
+ "DPP: Ignore GAS status report (ok=%d) for unknown response",
+ ok);
+ wpabuf_free(resp);
+ return;
+ }
wpa_printf(MSG_DEBUG, "DPP: Configuration exchange completed (ok=%d)",
ok);