aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wps_supplicant.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-07-18 21:30:24 (GMT)
committerJouni Malinen <j@w1.fi>2010-09-09 14:17:16 (GMT)
commit2ff99b3c387accafa0714e0234c176419b42cd38 (patch)
tree8f6f6377b353351048673b718cdc175547c2c1cf /wpa_supplicant/wps_supplicant.c
parentb2c5a4a3df612cd68c4a5da5ffd80ea46f06a528 (diff)
downloadhostap-2ff99b3c387accafa0714e0234c176419b42cd38.zip
hostap-2ff99b3c387accafa0714e0234c176419b42cd38.tar.gz
hostap-2ff99b3c387accafa0714e0234c176419b42cd38.tar.bz2
P2P: Do not save temporary networks
Diffstat (limited to 'wpa_supplicant/wps_supplicant.c')
-rw-r--r--wpa_supplicant/wps_supplicant.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c
index 8cb9df2..2da1697 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -240,6 +240,8 @@ static int wpa_supplicant_wps_cred(void *ctx,
ssid->eap.phase1 = NULL;
os_free(ssid->eap.eap_methods);
ssid->eap.eap_methods = NULL;
+ if (!ssid->p2p_group)
+ ssid->temporary = 0;
} else {
wpa_printf(MSG_DEBUG, "WPS: Create a new network based on the "
"received credential");
@@ -596,6 +598,7 @@ static struct wpa_ssid * wpas_wps_add_network(struct wpa_supplicant *wpa_s,
return NULL;
wpas_notify_network_added(wpa_s, ssid);
wpa_config_set_network_defaults(ssid);
+ ssid->temporary = 1;
if (wpa_config_set(ssid, "key_mgmt", "WPS", 0) < 0 ||
wpa_config_set(ssid, "eap", "WSC", 0) < 0 ||
wpa_config_set(ssid, "identity", registrar ?
@@ -787,6 +790,7 @@ int wpas_wps_start_reg(struct wpa_supplicant *wpa_s, const u8 *bssid,
ssid = wpas_wps_add_network(wpa_s, 1, bssid);
if (ssid == NULL)
return -1;
+ ssid->temporary = 1;
pos = val;
end = pos + sizeof(val);
res = os_snprintf(pos, end - pos, "\"pin=%s", pin);