DPP2: Fix auth termination after receiving Configurator backup

remove_on_tx_status needs to be set in this case even if
dpp_config_processing=2 is used since there will be no connection
attempt when receiving a Configurator backup instead of station config
object.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2020-07-23 17:57:28 +03:00 committed by Jouni Malinen
parent 74cd38ac69
commit 15018d4f4a
2 changed files with 5 additions and 1 deletions

View File

@ -1485,6 +1485,7 @@ static int wpas_dpp_handle_key_pkg(struct wpa_supplicant *wpa_s,
wpa_printf(MSG_DEBUG, "DPP: Received Configurator backup");
wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_CONF_RECEIVED);
wpa_s->dpp_conf_backup_received = true;
while (key) {
res = dpp_configurator_from_backup(wpa_s->dpp, key);
@ -1582,6 +1583,7 @@ static void wpas_dpp_gas_resp_cb(void *ctx, const u8 *addr, u8 dialog_token,
goto fail;
}
wpa_s->dpp_conf_backup_received = false;
for (i = 0; i < auth->num_conf_obj; i++) {
res = wpas_dpp_handle_config_obj(wpa_s, auth,
&auth->conf_obj[i]);
@ -1625,7 +1627,8 @@ fail:
wpabuf_free(msg);
/* This exchange will be terminated in the TX status handler */
if (wpa_s->conf->dpp_config_processing < 2)
if (wpa_s->conf->dpp_config_processing < 2 ||
wpa_s->dpp_conf_backup_received)
auth->remove_on_tx_status = 1;
return;
}

View File

@ -1277,6 +1277,7 @@ struct wpa_supplicant {
unsigned int dpp_resp_retry_time;
u8 dpp_last_ssid[SSID_MAX_LEN];
size_t dpp_last_ssid_len;
bool dpp_conf_backup_received;
#ifdef CONFIG_DPP2
struct dpp_pfs *dpp_pfs;
int dpp_pfs_fallback;