DPP: Stop authentication exchange of DPP_STOP_LISTEN
Previously, this command stopped listen operation immediately, but if there was an ongoing authentication exchange, a new listen operation was started. This is not really expected behavior, so stop the authentication exchange first with this command to avoid restarting listen operation. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
51fbcad457
commit
c1d3773967
6 changed files with 18 additions and 0 deletions
|
@ -3022,6 +3022,7 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
|
||||||
if (hostapd_dpp_listen(hapd, buf + 11) < 0)
|
if (hostapd_dpp_listen(hapd, buf + 11) < 0)
|
||||||
reply_len = -1;
|
reply_len = -1;
|
||||||
} else if (os_strcmp(buf, "DPP_STOP_LISTEN") == 0) {
|
} else if (os_strcmp(buf, "DPP_STOP_LISTEN") == 0) {
|
||||||
|
hostapd_dpp_stop(hapd);
|
||||||
hostapd_dpp_listen_stop(hapd);
|
hostapd_dpp_listen_stop(hapd);
|
||||||
} else if (os_strncmp(buf, "DPP_CONFIGURATOR_ADD", 20) == 0) {
|
} else if (os_strncmp(buf, "DPP_CONFIGURATOR_ADD", 20) == 0) {
|
||||||
res = hostapd_dpp_configurator_add(hapd, buf + 20);
|
res = hostapd_dpp_configurator_add(hapd, buf + 20);
|
||||||
|
|
|
@ -1600,6 +1600,13 @@ int hostapd_dpp_pkex_remove(struct hostapd_data *hapd, const char *id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void hostapd_dpp_stop(struct hostapd_data *hapd)
|
||||||
|
{
|
||||||
|
dpp_auth_deinit(hapd->dpp_auth);
|
||||||
|
hapd->dpp_auth = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int hostapd_dpp_init(struct hostapd_data *hapd)
|
int hostapd_dpp_init(struct hostapd_data *hapd)
|
||||||
{
|
{
|
||||||
dl_list_init(&hapd->dpp_bootstrap);
|
dl_list_init(&hapd->dpp_bootstrap);
|
||||||
|
|
|
@ -30,6 +30,7 @@ int hostapd_dpp_configurator_add(struct hostapd_data *hapd, const char *cmd);
|
||||||
int hostapd_dpp_configurator_remove(struct hostapd_data *hapd, const char *id);
|
int hostapd_dpp_configurator_remove(struct hostapd_data *hapd, const char *id);
|
||||||
int hostapd_dpp_pkex_add(struct hostapd_data *hapd, const char *cmd);
|
int hostapd_dpp_pkex_add(struct hostapd_data *hapd, const char *cmd);
|
||||||
int hostapd_dpp_pkex_remove(struct hostapd_data *hapd, const char *id);
|
int hostapd_dpp_pkex_remove(struct hostapd_data *hapd, const char *id);
|
||||||
|
void hostapd_dpp_stop(struct hostapd_data *hapd);
|
||||||
int hostapd_dpp_init(struct hostapd_data *hapd);
|
int hostapd_dpp_init(struct hostapd_data *hapd);
|
||||||
void hostapd_dpp_deinit(struct hostapd_data *hapd);
|
void hostapd_dpp_deinit(struct hostapd_data *hapd);
|
||||||
|
|
||||||
|
|
|
@ -10498,6 +10498,7 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
|
||||||
if (wpas_dpp_listen(wpa_s, buf + 11) < 0)
|
if (wpas_dpp_listen(wpa_s, buf + 11) < 0)
|
||||||
reply_len = -1;
|
reply_len = -1;
|
||||||
} else if (os_strcmp(buf, "DPP_STOP_LISTEN") == 0) {
|
} else if (os_strcmp(buf, "DPP_STOP_LISTEN") == 0) {
|
||||||
|
wpas_dpp_stop(wpa_s);
|
||||||
wpas_dpp_listen_stop(wpa_s);
|
wpas_dpp_listen_stop(wpa_s);
|
||||||
} else if (os_strncmp(buf, "DPP_CONFIGURATOR_ADD", 20) == 0) {
|
} else if (os_strncmp(buf, "DPP_CONFIGURATOR_ADD", 20) == 0) {
|
||||||
int res;
|
int res;
|
||||||
|
|
|
@ -2201,6 +2201,13 @@ int wpas_dpp_pkex_remove(struct wpa_supplicant *wpa_s, const char *id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wpas_dpp_stop(struct wpa_supplicant *wpa_s)
|
||||||
|
{
|
||||||
|
dpp_auth_deinit(wpa_s->dpp_auth);
|
||||||
|
wpa_s->dpp_auth = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int wpas_dpp_init(struct wpa_supplicant *wpa_s)
|
int wpas_dpp_init(struct wpa_supplicant *wpa_s)
|
||||||
{
|
{
|
||||||
u8 adv_proto_id[7];
|
u8 adv_proto_id[7];
|
||||||
|
|
|
@ -30,6 +30,7 @@ int wpas_dpp_configurator_remove(struct wpa_supplicant *wpa_s, const char *id);
|
||||||
int wpas_dpp_configurator_sign(struct wpa_supplicant *wpa_s, const char *cmd);
|
int wpas_dpp_configurator_sign(struct wpa_supplicant *wpa_s, const char *cmd);
|
||||||
int wpas_dpp_pkex_add(struct wpa_supplicant *wpa_s, const char *cmd);
|
int wpas_dpp_pkex_add(struct wpa_supplicant *wpa_s, const char *cmd);
|
||||||
int wpas_dpp_pkex_remove(struct wpa_supplicant *wpa_s, const char *id);
|
int wpas_dpp_pkex_remove(struct wpa_supplicant *wpa_s, const char *id);
|
||||||
|
void wpas_dpp_stop(struct wpa_supplicant *wpa_s);
|
||||||
int wpas_dpp_init(struct wpa_supplicant *wpa_s);
|
int wpas_dpp_init(struct wpa_supplicant *wpa_s);
|
||||||
void wpas_dpp_deinit(struct wpa_supplicant *wpa_s);
|
void wpas_dpp_deinit(struct wpa_supplicant *wpa_s);
|
||||||
int wpas_dpp_check_connect(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
|
int wpas_dpp_check_connect(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
|
||||||
|
|
Loading…
Reference in a new issue