aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/config_file.c
diff options
context:
space:
mode:
authorBala Krishna Bhamidipati <c_bbhami@qti.qualcomm.com>2016-04-20 04:04:17 (GMT)
committerJouni Malinen <j@w1.fi>2016-04-20 10:12:50 (GMT)
commita9112270615dd68d422623ebc26c21a6887a2a11 (patch)
tree92ee4826194574c6a881696830f0f9ad6bae6db4 /hostapd/config_file.c
parent49fe2ada20d5fd53c0388442d23e7f03086f4d57 (diff)
downloadhostap-a9112270615dd68d422623ebc26c21a6887a2a11.zip
hostap-a9112270615dd68d422623ebc26c21a6887a2a11.tar.gz
hostap-a9112270615dd68d422623ebc26c21a6887a2a11.tar.bz2
Add assocresp_elements parameter for hostapd
This new parameter allows hostapd to add Vendor Specific elements into (Re)Association Response frames similarly to the way vendor_elements parameter can be used for Beacon and Probe Response frames. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'hostapd/config_file.c')
-rw-r--r--hostapd/config_file.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index bb7f3ea..93f25b2 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -3379,6 +3379,36 @@ static int hostapd_config_fill(struct hostapd_config *conf,
wpabuf_free(bss->vendor_elements);
bss->vendor_elements = elems;
+ } else if (os_strcmp(buf, "assocresp_elements") == 0) {
+ struct wpabuf *elems;
+ size_t len = os_strlen(pos);
+ if (len & 0x01) {
+ wpa_printf(MSG_ERROR,
+ "Line %d: Invalid assocresp_elements '%s'",
+ line, pos);
+ return 1;
+ }
+ len /= 2;
+ if (len == 0) {
+ wpabuf_free(bss->assocresp_elements);
+ bss->assocresp_elements = NULL;
+ return 0;
+ }
+
+ elems = wpabuf_alloc(len);
+ if (elems == NULL)
+ return 1;
+
+ if (hexstr2bin(pos, wpabuf_put(elems, len), len)) {
+ wpabuf_free(elems);
+ wpa_printf(MSG_ERROR,
+ "Line %d: Invalid assocresp_elements '%s'",
+ line, pos);
+ return 1;
+ }
+
+ wpabuf_free(bss->assocresp_elements);
+ bss->assocresp_elements = elems;
} else if (os_strcmp(buf, "sae_anti_clogging_threshold") == 0) {
bss->sae_anti_clogging_threshold = atoi(pos);
} else if (os_strcmp(buf, "sae_groups") == 0) {