aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wps_supplicant.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-07-06 23:32:55 (GMT)
committerJouni Malinen <j@w1.fi>2010-09-09 14:17:20 (GMT)
commitdcf788d1a45310da72ece64edf39e40dae020f9b (patch)
treeafee8e771906ea45eba2949374584bd08c898833 /wpa_supplicant/wps_supplicant.c
parentaf8ab1ae97d4c4d39d90994c2770e3f4c7e12c18 (diff)
downloadhostap-dcf788d1a45310da72ece64edf39e40dae020f9b.zip
hostap-dcf788d1a45310da72ece64edf39e40dae020f9b.tar.gz
hostap-dcf788d1a45310da72ece64edf39e40dae020f9b.tar.bz2
WPS: Fix configuration strings on config reload
Previously, freed memory could be used as device name (and other similar parameters) when building WPS IE after SIGHUP.
Diffstat (limited to 'wpa_supplicant/wps_supplicant.c')
-rw-r--r--wpa_supplicant/wps_supplicant.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c
index 8f5329a..9ded028 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -1386,4 +1386,13 @@ void wpas_wps_update_config(struct wpa_supplicant *wpa_s)
} else
os_memcpy(wps->uuid, wpa_s->conf->uuid, WPS_UUID_LEN);
}
+
+ if (wpa_s->conf->changed_parameters & CFG_CHANGED_DEVICE_NAME) {
+ /* Update pointers to make sure they refer current values */
+ wps->dev.device_name = wpa_s->conf->device_name;
+ wps->dev.manufacturer = wpa_s->conf->manufacturer;
+ wps->dev.model_name = wpa_s->conf->model_name;
+ wps->dev.model_number = wpa_s->conf->model_number;
+ wps->dev.serial_number = wpa_s->conf->serial_number;
+ }
}