aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2019-03-09 14:21:54 (GMT)
committerJouni Malinen <j@w1.fi>2019-03-09 14:21:54 (GMT)
commit954c535a50d4614f69390417eff5a6b37cec87a9 (patch)
tree08ef39f450873c687336632a3d466b054bca4a96 /wpa_supplicant
parent4d379be4a99d09abe43be9f5a233424bfc5cc43a (diff)
downloadhostap-954c535a50d4614f69390417eff5a6b37cec87a9.zip
hostap-954c535a50d4614f69390417eff5a6b37cec87a9.tar.gz
hostap-954c535a50d4614f69390417eff5a6b37cec87a9.tar.bz2
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>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/dpp_supplicant.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c
index b6a6671..74f7170 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;