Re: [PATCH v2] supplicant: Allow custom probe and assoc req ie.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 04/08/2016 07:31 AM, Jouni Malinen wrote:
On Mon, Apr 04, 2016 at 06:55:05PM -0400, greearb@xxxxxxxxxxxxxxx wrote:
This lets user specify additional IEs for probe requests and
association requests.

While reviewing the changes, I noticed that the Association Request
frame case was already supported with control interface command
VENDOR_ELEM_ADD 13 <hexdump>

Probe Request frame did not have similar extension, so adding that makes
sense, but it's better to be consistent with the already existing
mechanism, so I updated this patch to do simply this:

How do you set this in the wpa config file, or is this only available
through wpa-cli?

Thanks,
Ben


diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h
index d9641bb..20cd5ae 100644
--- a/src/common/wpa_ctrl.h
+++ b/src/common/wpa_ctrl.h
@@ -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
  };

diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index 4dd0314..b2576e3 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -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;
  }



--
Ben Greear <greearb@xxxxxxxxxxxxxxx>
Candela Technologies Inc  http://www.candelatech.com

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux