]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Avoid race condition in ap_no_auth_ack
authorJouni Malinen <j@w1.fi>
Sun, 10 Dec 2023 14:32:35 +0000 (16:32 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 10 Dec 2023 17:40:18 +0000 (19:40 +0200)
Avoid race condition with TX status reporting for the broadcast
Deauthentication frame. This could be delivered after the SET command
for ext_mgmt_frame_handled=1 and as such, could result in an
MGMT-TX-STATUS event that would confuse the next step in the test.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_ap_open.py

index beb0e18187b5d4430c5fdf5588016cc52f22cc50..fcec8721051ebc97d840bf1cd3d309339664f7bc 100644 (file)
@@ -966,6 +966,11 @@ def test_ap_no_auth_ack(dev, apdev):
     hapd = hostapd.add_ap(apdev[0], {"ssid": "open",
                                      "ap_max_inactivity": "1"})
     hapd.set("ext_mgmt_frame_handling", "1")
+
+    # Avoid race condition with TX status reporting for the broadcast
+    # Deauthentication frame.
+    hapd.wait_event(["MGMT-TX-STATUS"], timeout=0.1)
+
     bssid = hapd.own_addr()
     addr = "02:01:02:03:04:05"
     frame = "b0003a01" + bssid.replace(':', '') + addr.replace(':', '') + bssid.replace(':', '') + "1000" + "000001000000"