DPP: Update wpa_supplicant configuration file after provisioning

WPS was already doing this if update_config=1 was set and DPP should be
consistent with that behavior. Update the configuration file if
update_config=1 and dpp_config_processing is set to 1 or 2.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2019-03-09 16:21:54 +02:00
parent 4d379be4a9
commit 954c535a50

View file

@ -1249,11 +1249,19 @@ static void wpas_dpp_process_config(struct wpa_supplicant *wpa_s,
return;
wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_NETWORK_ID "%d", ssid->id);
if (wpa_s->conf->dpp_config_processing == 2)
ssid->disabled = 0;
#ifndef CONFIG_NO_CONFIG_WRITE
if (wpa_s->conf->update_config &&
wpa_config_write(wpa_s->confname, wpa_s->conf))
wpa_printf(MSG_DEBUG, "DPP: Failed to update configuration");
#endif /* CONFIG_NO_CONFIG_WRITE */
if (wpa_s->conf->dpp_config_processing < 2)
return;
wpa_printf(MSG_DEBUG, "DPP: Trying to connect to the new network");
ssid->disabled = 0;
wpa_s->disconnected = 0;
wpa_s->reassociate = 1;
wpa_s->scan_runs = 0;