]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP: Reset DPP_AUTH_INIT netrole back to STA by default
authorJouni Malinen <jouni@codeaurora.org>
Tue, 11 Feb 2020 04:33:24 +0000 (06:33 +0200)
committerJouni Malinen <jouni@codeaurora.org>
Tue, 11 Feb 2020 04:33:24 +0000 (06:33 +0200)
Previously DPP_AUTH_INIT command update wpa_s->dpp_netrole only if the
netrole parameter was included. This could leave AP or configurator
network in place for the next DPP_AUTH_INIT command. This would be
unexpected behavior, so reset wpa_s->dpp_netrole back to the
DPP_NETROLE_STA default if no explicit netrole parameter is included.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
wpa_supplicant/dpp_supplicant.c

index 0811ab300215202a8c439b717d3a8327838d8873..0a13213b0535eebae97f2cd0cb0e9f097ff6e575 100644 (file)
@@ -751,6 +751,8 @@ int wpas_dpp_auth_init(struct wpa_supplicant *wpa_s, const char *cmd)
                        wpa_s->dpp_netrole = DPP_NETROLE_CONFIGURATOR;
                else
                        wpa_s->dpp_netrole = DPP_NETROLE_STA;
+       } else {
+               wpa_s->dpp_netrole = DPP_NETROLE_STA;
        }
 
        pos = os_strstr(cmd, " neg_freq=");