From 94e66da6dfbd2d7f6e93ce4bcf6da4e41fa18281 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 28 Dec 2019 23:21:14 +0200 Subject: [PATCH] tests: ignore_broadcast_ssid and SSID List or Short SSID List mismatch Signed-off-by: Jouni Malinen --- tests/hwsim/test_scan.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/tests/hwsim/test_scan.py b/tests/hwsim/test_scan.py index a9e415b3f..43311d7ea 100644 --- a/tests/hwsim/test_scan.py +++ b/tests/hwsim/test_scan.py @@ -467,11 +467,30 @@ def test_scan_for_auth_wep(dev, apdev): @remote_compatible def test_scan_hidden(dev, apdev): """Control interface behavior on scan parameters""" - hapd = hostapd.add_ap(apdev[0], {"ssid": "test-scan", + dev[0].flush_scan_cache() + ssid = "test-scan" + wrong_ssid = "wrong" + hapd = hostapd.add_ap(apdev[0], {"ssid": ssid, "ignore_broadcast_ssid": "1"}) bssid = apdev[0]['bssid'] check_scan(dev[0], "freq=2412 use_id=1") + try: + payload = struct.pack('BB', 0, len(wrong_ssid)) + wrong_ssid.encode() + ssid_list = struct.pack('BB', 84, len(payload)) + payload + cmd = "VENDOR_ELEM_ADD 14 " + binascii.hexlify(ssid_list).decode() + if "OK" not in dev[0].request(cmd): + raise Exception("VENDOR_ELEM_ADD failed") + check_scan(dev[0], "freq=2412 use_id=1") + + payload = struct.pack('