]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Add vendor_elements into Beacon/Probe Response IE parameters
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 21 Mar 2013 13:41:27 +0000 (15:41 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 21 Mar 2013 13:41:27 +0000 (15:41 +0200)
Commit b52f084cfaae5a10bf5886cfa159d2df0dfc350a introduced a mechanism
for adding arbitrary vendor-specific elements into the Beacon and Probe
Response frames. However, this information was not added to the separate
buffers used for specifying Beacon and Probe Response IEs for drivers
that build the frames internally. Add vendor_elements to these values,
too, to support such drivers in addition to drivers that use the full
Beacon tail/head buffers.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

src/ap/ap_drv_ops.c

index b71d51d8b9e8c5d72580b272e29a622d0375dd37..8205d132a254856ef99bd862dbf10455921da04e 100644 (file)
@@ -173,6 +173,14 @@ int hostapd_build_ap_extra_ies(struct hostapd_data *hapd,
        }
 #endif /* CONFIG_HS20 */
 
+       if (hapd->conf->vendor_elements) {
+               size_t add = wpabuf_len(hapd->conf->vendor_elements);
+               if (wpabuf_resize(&beacon, add) == 0)
+                       wpabuf_put_buf(beacon, hapd->conf->vendor_elements);
+               if (wpabuf_resize(&proberesp, add) == 0)
+                       wpabuf_put_buf(proberesp, hapd->conf->vendor_elements);
+       }
+
        *beacon_ret = beacon;
        *proberesp_ret = proberesp;
        *assocresp_ret = assocresp;