DPP: Reset DPP_AUTH_INIT netrole back to STA by default

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>
This commit is contained in:
Jouni Malinen 2020-02-11 06:33:24 +02:00
parent ef39ac497e
commit c7cc80fbc8

View 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=");