From: Jouni Malinen Date: Sat, 9 Mar 2019 14:21:54 +0000 (+0200) Subject: DPP: Update wpa_supplicant configuration file after provisioning X-Git-Tag: hostap_2_8~262 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=954c535a50d4614f69390417eff5a6b37cec87a9;p=thirdparty%2Fhostap.git 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 --- diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c index b6a667173..74f71701f 100644 --- a/wpa_supplicant/dpp_supplicant.c +++ b/wpa_supplicant/dpp_supplicant.c @@ -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;