From 340ec48cdd740f33a3e84a8ffef959880ea9176e Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 15 Feb 2022 16:18:12 +0200 Subject: [PATCH] DPP: Clear state on configuration failure in GAS server hander There is no need to maintain the DPP authentication state if config request processing fails, so clear state also in the GAS server request handler similarly to the other failure cases. Signed-off-by: Jouni Malinen --- wpa_supplicant/dpp_supplicant.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c index b0b22c9a5..f7b638b20 100644 --- a/wpa_supplicant/dpp_supplicant.c +++ b/wpa_supplicant/dpp_supplicant.c @@ -3312,9 +3312,12 @@ wpas_dpp_gas_req_handler(void *ctx, void *resp_ctx, const u8 *sa, return NULL; } - if (!resp) - wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_CONF_FAILED); auth->conf_resp = resp; + if (!resp) { + wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_CONF_FAILED); + dpp_auth_deinit(wpa_s->dpp_auth); + wpa_s->dpp_auth = NULL; + } return resp; }