aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-09-01 07:08:30 (GMT)
committerJouni Malinen <j@w1.fi>2013-09-01 07:14:29 (GMT)
commit05766ed8de2df822948e4bdc279ae7c461702bf4 (patch)
tree1adbca926898e13851d2ab162f41b8e403e38ae3 /wpa_supplicant/ctrl_iface.c
parent698e921b9efd697af00590f8dafb6803a8535a06 (diff)
downloadhostap-05766ed8de2df822948e4bdc279ae7c461702bf4.zip
hostap-05766ed8de2df822948e4bdc279ae7c461702bf4.tar.gz
hostap-05766ed8de2df822948e4bdc279ae7c461702bf4.tar.bz2
P2P: Allow per-device PSK to be assigned
"wpa_cli p2p_set per_sta_psk <0/1>" can now be used to disable/enable use of per-device PSKs in P2P groups. This is disabled by default. When enabled, a default passphrase is still generated by the GO for legacy stations, but all P2P and non-P2P devices using WPS will get a unique PSK. This gives more protection for the P2P group by preventing clients from being able to derive the unicast keys used by other clients. This is also a step towards allowing specific clients to be removed from a group reliably without having to tear down the full group to do so. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/ctrl_iface.c')
-rw-r--r--wpa_supplicant/ctrl_iface.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 03ffde0..2abcf74 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -1,6 +1,6 @@
/*
* WPA Supplicant / Control interface (shared code for all backends)
- * Copyright (c) 2004-2012, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2004-2013, Jouni Malinen <j@w1.fi>
*
* This software may be distributed under the terms of the BSD license.
* See README for more details.
@@ -4559,6 +4559,11 @@ static int p2p_ctrl_set(struct wpa_supplicant *wpa_s, char *cmd)
max_disc_int, max_disc_tu);
}
+ if (os_strcmp(cmd, "per_sta_psk") == 0) {
+ wpa_s->global->p2p_per_sta_psk = !!atoi(param);
+ return 0;
+ }
+
wpa_printf(MSG_DEBUG, "CTRL_IFACE: Unknown P2P_SET field value '%s'",
cmd);