[PATCH 15/17] tests: test_ap_open_poll_sta_no_ack: fix mgmt-rx race

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

 



From: Johannes Berg <johannes.berg@xxxxxxxxx>

We need to wait for the MGMT-RX event before disabling
ext_mgmt_frame_handling again, otherwise we might be
disabling it and hostapd only receives the deauth frame
after we already disable it, defeating the purpose of
the test.

Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
---
 tests/hwsim/test_ap_open.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/hwsim/test_ap_open.py b/tests/hwsim/test_ap_open.py
index a3bea763a1c4..beb0e18187b5 100644
--- a/tests/hwsim/test_ap_open.py
+++ b/tests/hwsim/test_ap_open.py
@@ -725,6 +725,9 @@ def test_ap_open_poll_sta_no_ack(dev, apdev):
     hapd.set("ext_mgmt_frame_handling", "1")
     dev[0].request("DISCONNECT")
     dev[0].wait_disconnected()
+    # eat up the deauth frame, so it cannot be processed
+    # after we disable ext_mgmt_frame_handling again
+    hapd.wait_event(["MGMT-RX"], timeout=1)
     hapd.set("ext_mgmt_frame_handling", "0")
     if "OK" not in hapd.request("POLL_STA " + addr):
         raise Exception("POLL_STA failed")
-- 
2.41.0


_______________________________________________
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