mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-12-01 11:48:23 -05:00
tests: Handle scan result clearing more carefully in ap_country
If the ABORT_SCAN command succeeds, CTRL-EVENT-SCAN-RESULTS event is delivered for the aborted scan. Following this with an immediate flush_scan_cache() call can result in the first scan interpreting that pending event as the completion and that results in trying to start another scan while the first scan is still in progress. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
09bdbc6ed9
commit
2b4263d06f
@ -132,8 +132,11 @@ def test_ap_country(dev, apdev):
|
|||||||
if hapd:
|
if hapd:
|
||||||
hapd.request("DISABLE")
|
hapd.request("DISABLE")
|
||||||
dev[0].request("DISCONNECT")
|
dev[0].request("DISCONNECT")
|
||||||
dev[0].request("ABORT_SCAN")
|
res = dev[0].request("ABORT_SCAN")
|
||||||
dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5)
|
for i in range(2 if "OK" in res else 1):
|
||||||
|
dev[0].wait_event(["CTRL-EVENT-DISCONNECTED",
|
||||||
|
"CTRL-EVENT-SCAN-RESULTS"], timeout=0.5)
|
||||||
|
dev[0].dump_monitor()
|
||||||
hostapd.cmd_execute(apdev[0], ['iw', 'reg', 'set', '00'])
|
hostapd.cmd_execute(apdev[0], ['iw', 'reg', 'set', '00'])
|
||||||
dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
|
dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=0.5)
|
||||||
dev[0].flush_scan_cache()
|
dev[0].flush_scan_cache()
|
||||||
|
Loading…
Reference in New Issue
Block a user