DPP: Clear netrole on starting chirping or reconfiguration

A previously set netrole (e.g., from DPP_LISTEN or DPP_AUTH_INIT) could
have been used in a following DPP_CHIRP or DPP_RECONFIG operation. This
could result in trying to request incorrect configuration and likely
rejection from the Configurator. Fix this by clearing the netrole when
starting these operations.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2022-02-23 21:58:07 +02:00 committed by Jouni Malinen
parent 2fcc076d1c
commit 0b5f8e3d8e

View file

@ -4216,6 +4216,7 @@ int wpas_dpp_chirp(struct wpa_supplicant *wpa_s, const char *cmd)
wpas_dpp_chirp_stop(wpa_s);
wpa_s->dpp_allowed_roles = DPP_CAPAB_ENROLLEE;
wpa_s->dpp_netrole = DPP_NETROLE_STA;
wpa_s->dpp_qr_mutual = 0;
wpa_s->dpp_chirp_bi = bi;
wpa_s->dpp_presence_announcement = dpp_build_presence_announcement(bi);
@ -4300,6 +4301,7 @@ int wpas_dpp_reconfig(struct wpa_supplicant *wpa_s, const char *cmd)
}
wpas_dpp_chirp_stop(wpa_s);
wpa_s->dpp_allowed_roles = DPP_CAPAB_ENROLLEE;
wpa_s->dpp_netrole = DPP_NETROLE_STA;
wpa_s->dpp_qr_mutual = 0;
wpa_s->dpp_reconfig_ssid = ssid;
wpa_s->dpp_reconfig_ssid_id = ssid->id;