aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/ieee802_11.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 /src/ap/ieee802_11.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 'src/ap/ieee802_11.c')
-rw-r--r--src/ap/ieee802_11.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index c108faa..781afa2 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -1960,6 +1960,14 @@ static u16 send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta,
p = hostapd_eid_mbo(hapd, p, buf + sizeof(buf) - p);
+ if (hapd->conf->assocresp_elements &&
+ (size_t) (buf + sizeof(buf) - p) >=
+ wpabuf_len(hapd->conf->assocresp_elements)) {
+ os_memcpy(p, wpabuf_head(hapd->conf->assocresp_elements),
+ wpabuf_len(hapd->conf->assocresp_elements));
+ p += wpabuf_len(hapd->conf->assocresp_elements);
+ }
+
send_len += p - reply->u.assoc_resp.variable;
if (hostapd_drv_send_mlme(hapd, reply, send_len, 0) < 0) {