aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wps_supplicant.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-04-13 08:44:57 (GMT)
committerJouni Malinen <j@w1.fi>2014-04-13 08:44:57 (GMT)
commitded4f944df93a12ab4765bd1c3f08315024c0d56 (patch)
treefa99376be61fc2dd377b62d29269c797aa95420b /wpa_supplicant/wps_supplicant.c
parentd6a36f3956cc49c77376eceaef2e14548ca0bf30 (diff)
downloadhostap-ded4f944df93a12ab4765bd1c3f08315024c0d56.zip
hostap-ded4f944df93a12ab4765bd1c3f08315024c0d56.tar.gz
hostap-ded4f944df93a12ab4765bd1c3f08315024c0d56.tar.bz2
WPS: Close p2p_group and temporary parameters to all network blocks
If a P2P GO issues multiple credentials for some reason, clone the p2p_group and temporary parameters to all those based on the initial network block that gets used for the first credential. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/wps_supplicant.c')
-rw-r--r--wpa_supplicant/wps_supplicant.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c
index 22b8e71..4c729dd 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -370,6 +370,17 @@ static int wpa_supplicant_wps_cred(void *ctx,
ssid = wpa_config_add_network(wpa_s->conf);
if (ssid == NULL)
return -1;
+ if (wpa_s->current_ssid) {
+ /*
+ * Should the GO issue multiple credentials for some
+ * reason, each credential should be marked as a
+ * temporary P2P group similarly to the one that gets
+ * marked as such based on the pre-configured values
+ * used for the WPS network block.
+ */
+ ssid->p2p_group = wpa_s->current_ssid->p2p_group;
+ ssid->temporary = wpa_s->current_ssid->temporary;
+ }
wpas_notify_network_added(wpa_s, ssid);
}