From 954c535a50d4614f69390417eff5a6b37cec87a9 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 9 Mar 2019 16:21:54 +0200 Subject: [PATCH] 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 --- wpa_supplicant/dpp_supplicant.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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; -- 2.47.2