]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP: Clear state on configuration failure in GAS server hander
authorJouni Malinen <quic_jouni@quicinc.com>
Tue, 15 Feb 2022 14:18:12 +0000 (16:18 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 15 Feb 2022 14:24:43 +0000 (16:24 +0200)
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 <quic_jouni@quicinc.com>
wpa_supplicant/dpp_supplicant.c

index b0b22c9a59b437d84b94d8d025ad93531b11bf3f..f7b638b20fecbedf21226d996a7aee223be59fe1 100644 (file)
@@ -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;
 }