aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-09-11 14:13:59 (GMT)
committerJouni Malinen <j@w1.fi>2009-11-22 18:53:25 (GMT)
commit3b3da9282ee60ce7a7f347729874d721167d7633 (patch)
treed7bc2ccebe9f9a20d0fb05c6987c213ff80f67a7
parent30d1047f721b17e289b987ba220bddd553d95114 (diff)
downloadhostap-06-3b3da9282ee60ce7a7f347729874d721167d7633.zip
hostap-06-3b3da9282ee60ce7a7f347729874d721167d7633.tar.gz
hostap-06-3b3da9282ee60ce7a7f347729874d721167d7633.tar.bz2
WPS: Add parsing of AP Setup Locked attribute
(cherry picked from commit e9a2bca6f5e5dd7ef7aa62f6954b3877f41a1e34)
-rw-r--r--src/wps/wps_attr_parse.c8
-rw-r--r--src/wps/wps_i.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/wps/wps_attr_parse.c b/src/wps/wps_attr_parse.c
index 25ff251..f50ae39 100644
--- a/src/wps/wps_attr_parse.c
+++ b/src/wps/wps_attr_parse.c
@@ -381,6 +381,14 @@ static int wps_set_attr(struct wps_parse_attr *attr, u16 type,
attr->eap_identity = pos;
attr->eap_identity_len = len;
break;
+ case ATTR_AP_SETUP_LOCKED:
+ if (len != 1) {
+ wpa_printf(MSG_DEBUG, "WPS: Invalid AP Setup Locked "
+ "length %u", len);
+ return -1;
+ }
+ attr->ap_setup_locked = pos;
+ break;
default:
wpa_printf(MSG_DEBUG, "WPS: Unsupported attribute type 0x%x "
"len=%u", type, len);
diff --git a/src/wps/wps_i.h b/src/wps/wps_i.h
index 85adf28..631d22f 100644
--- a/src/wps/wps_i.h
+++ b/src/wps/wps_i.h
@@ -146,6 +146,7 @@ struct wps_parse_attr {
const u8 *selected_registrar; /* 1 octet (Bool) */
const u8 *request_type; /* 1 octet */
const u8 *response_type; /* 1 octet */
+ const u8 *ap_setup_locked; /* 1 octet */
/* variable length fields */
const u8 *manufacturer;