aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-04-01 18:28:57 (GMT)
committerJouni Malinen <j@w1.fi>2013-04-01 18:28:57 (GMT)
commit88c8bf311efa4eb64468bed9b41b3110ab9effff (patch)
tree93ea3b69c0d1d78e2d008bebda7ff6e10c786efc /wpa_supplicant/ctrl_iface.c
parente205401c720e382b2d291d79e081a1eaff96b0be (diff)
downloadhostap-88c8bf311efa4eb64468bed9b41b3110ab9effff.zip
hostap-88c8bf311efa4eb64468bed9b41b3110ab9effff.tar.gz
hostap-88c8bf311efa4eb64468bed9b41b3110ab9effff.tar.bz2
WPS NFC: Allow configuration token to be built from network block
"WPS_NFC_CONFIG_TOKEN <WPS/NDEF> <network id>" can now be used to build an NFC configuration token from a locally configured network. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/ctrl_iface.c')
-rw-r--r--wpa_supplicant/ctrl_iface.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 4949771..27220a9 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -784,7 +784,11 @@ static int wpa_supplicant_ctrl_iface_wps_nfc_config_token(
int ndef;
struct wpabuf *buf;
int res;
+ char *pos;
+ pos = os_strchr(cmd, ' ');
+ if (pos)
+ *pos++ = '\0';
if (os_strcmp(cmd, "WPS") == 0)
ndef = 0;
else if (os_strcmp(cmd, "NDEF") == 0)
@@ -792,7 +796,7 @@ static int wpa_supplicant_ctrl_iface_wps_nfc_config_token(
else
return -1;
- buf = wpas_wps_nfc_config_token(wpa_s, ndef);
+ buf = wpas_wps_nfc_config_token(wpa_s, ndef, pos);
if (buf == NULL)
return -1;