]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Extend VENDOR_ELEM parameters to cover non-P2P Probe Request frame
authorJouni Malinen <j@w1.fi>
Fri, 8 Apr 2016 14:28:23 +0000 (17:28 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 8 Apr 2016 21:30:49 +0000 (00:30 +0300)
The new VENDOR_ELEM value 14 can now be used to add a vendor element
into Probe Request frames used by non-P2P active scans.

For example:
VENDOR_ELEM_ADD 14 dd05001122330a
and to clear that:
VENDOR_ELEM_REMOVE 14 *

Signed-off-by: Jouni Malinen <j@w1.fi>
src/common/wpa_ctrl.h
wpa_supplicant/scan.c

index d9641bb05bcaef2002f77519e25a7f4d73d21f0c..20cd5ae77af09bcf2b5517598e32b4e98487ac19 100644 (file)
@@ -319,6 +319,7 @@ enum wpa_vendor_elem_frame {
        VENDOR_ELEM_P2P_ASSOC_REQ = 11,
        VENDOR_ELEM_P2P_ASSOC_RESP = 12,
        VENDOR_ELEM_ASSOC_REQ = 13,
+       VENDOR_ELEM_PROBE_REQ = 14,
        NUM_VENDOR_ELEM_FRAMES
 };
 
index 4dd031458380d967af218a2616088c4c72f3d1b5..b2576e37614314dfb35e613c6108a3cdbe84c17d 100644 (file)
@@ -497,6 +497,13 @@ static struct wpabuf * wpa_supplicant_extra_ies(struct wpa_supplicant *wpa_s)
                wpas_mbo_scan_ie(wpa_s, extra_ie);
 #endif /* CONFIG_MBO */
 
+       if (wpa_s->vendor_elem[VENDOR_ELEM_PROBE_REQ]) {
+               struct wpabuf *buf = wpa_s->vendor_elem[VENDOR_ELEM_PROBE_REQ];
+
+               if (wpabuf_resize(&extra_ie, wpabuf_len(buf)) == 0)
+                       wpabuf_put_buf(extra_ie, buf);
+       }
+
        return extra_ie;
 }