From be607ceb556153da45fd27b3978c7bae1f1e6ef1 Mon Sep 17 00:00:00 2001 From: Avraham Stern Date: Wed, 8 Mar 2017 14:37:42 +0200 Subject: [PATCH] tests: BSS transition management query with unknown candidates Verify that the AP responds to a BSS transition management query that includes candidates unknown to the AP. Signed-off-by: Avraham Stern --- tests/hwsim/test_wnm.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/hwsim/test_wnm.py b/tests/hwsim/test_wnm.py index 6323c050d..033f1519c 100644 --- a/tests/hwsim/test_wnm.py +++ b/tests/hwsim/test_wnm.py @@ -1730,3 +1730,23 @@ def test_wnm_bss_tm_ap_proto(dev, apdev): raise Exception("MGMT_RX_PROCESS failed") hapd.set("ext_mgmt_frame_handling", "0") + +def test_wnm_bss_transition_mgmt_query_with_unknown_candidates(dev, apdev): + """WNM BSS Transition Management query with unknown candidates""" + params = { "ssid": "test-wnm", + "bss_transition": "1" } + hapd = hostapd.add_ap(apdev[0], params) + + dev[0].scan_for_bss(apdev[0]['bssid'], 2412) + + dev[0].connect("test-wnm", key_mgmt="NONE", scan_freq="2412") + dev[0].request("WNM_BSS_QUERY 0 neighbor=00:11:22:33:44:55,0,81,1,4") + + ev = dev[0].wait_event(["WNM: BSS Transition Management Request"], + timeout=5) + if ev is None: + raise Exception("No BSS Transition Management Request frame seen") + + ev = hapd.wait_event(["BSS-TM-RESP"], timeout=5) + if ev is None: + raise Exception("No BSS Transition Management Response frame seen")