aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2017-01-03 17:15:12 (GMT)
committerJouni Malinen <j@w1.fi>2017-01-03 17:53:03 (GMT)
commit6c7a7c7996f005168ef897221ac3dd27db604e5e (patch)
tree66bbb19b02c5d76e32eae649cefc0d6249cd0274 /tests
parent28b32e66d87b875871cdb1d223461771332b9cde (diff)
downloadhostap-6c7a7c7996f005168ef897221ac3dd27db604e5e.zip
hostap-6c7a7c7996f005168ef897221ac3dd27db604e5e.tar.gz
hostap-6c7a7c7996f005168ef897221ac3dd27db604e5e.tar.bz2
tests: Beacon request - active scan mode and old scan result
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_rrm.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/hwsim/test_rrm.py b/tests/hwsim/test_rrm.py
index 618bd0a..9bea272 100644
--- a/tests/hwsim/test_rrm.py
+++ b/tests/hwsim/test_rrm.py
@@ -993,6 +993,33 @@ def test_rrm_beacon_req_active(dev, apdev):
if report.opclass != 81 or report.channel != 11:
raise Exception("Incorrect opclass/channel for AP1")
+def test_rrm_beacon_req_active_ignore_old_result(dev, apdev):
+ """Beacon request - active scan mode and old scan result"""
+ hapd2 = hostapd.add_ap(apdev[1]['ifname'], { "ssid": "another" })
+ dev[0].scan_for_bss(apdev[1]['bssid'], freq=2412)
+ hapd2.disable()
+
+ params = { "ssid": "rrm", "rrm_beacon_report": "1" }
+ hapd = hostapd.add_ap(apdev[0]['ifname'], params)
+
+ dev[0].connect("rrm", key_mgmt="NONE", scan_freq="2412")
+ addr = dev[0].own_addr()
+
+ token = run_req_beacon(hapd, addr, "51010000640001ffffffffffff")
+
+ ev = hapd.wait_event(["BEACON-RESP-RX"], timeout=10)
+ if ev is None:
+ raise Exception("Beacon report response not received")
+ fields = ev.split(' ')
+ report = BeaconReport(binascii.unhexlify(fields[4]))
+ logger.info("Received beacon report: " + str(report))
+ if report.bssid_str == apdev[1]['bssid']:
+ raise Exception("Old BSS reported")
+
+ ev = hapd.wait_event(["BEACON-RESP-RX"], timeout=0.2)
+ if ev is not None:
+ raise Exception("Unexpected beacon report response")
+
def start_ap(dev):
id = dev.add_network()
dev.set_network(id, "mode", "2")