From 2d3525bed4a0d4c5290d16aff7ea18e1ba75ce7b Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 8 Apr 2016 17:28:24 +0300 Subject: [PATCH] tests: VENDOR_ELEM 14 to add an IE into Probe Request frame Signed-off-by: Jouni Malinen --- tests/hwsim/test_scan.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/hwsim/test_scan.py b/tests/hwsim/test_scan.py index 8121ed40e..8a7a89d5b 100644 --- a/tests/hwsim/test_scan.py +++ b/tests/hwsim/test_scan.py @@ -990,3 +990,15 @@ def test_scan_abort_on_connect(dev, apdev): if ev is None: raise Exception("Scan did not start") dev[0].connect("test-scan", key_mgmt="NONE") + +def test_scan_ext(dev, apdev): + """Custom IE in Probe Request frame""" + hostapd.add_ap(apdev[0], { "ssid": "test-scan" }) + bssid = apdev[0]['bssid'] + + try: + if "OK" not in dev[0].request("VENDOR_ELEM_ADD 14 dd050011223300"): + raise Exception("VENDOR_ELEM_ADD failed") + check_scan(dev[0], "freq=2412 use_id=1") + finally: + dev[0].request("VENDOR_ELEM_REMOVE 14 *")