mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-30 16:54:04 -05:00
tests: Make ap_wps_ap_scan_2 more robust
The test sequence "scan_and_bss_entry_removed ap_wps_ap_scan_2" resulted in failure due to an old BSS entry remaining from the first test case to the second and the WPS_PBC operation on a forced BSSID ending up picking the incorrect BSS entry. Make this more robust by clearing the scan results from cfg80211. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
492c3a9180
commit
e51c8b2e97
@ -2513,6 +2513,7 @@ def test_ap_wps_ap_scan_2(dev, apdev):
|
|||||||
if "OK" not in wpas.request("AP_SCAN 2"):
|
if "OK" not in wpas.request("AP_SCAN 2"):
|
||||||
raise Exception("Failed to set AP_SCAN 2")
|
raise Exception("Failed to set AP_SCAN 2")
|
||||||
|
|
||||||
|
wpas.flush_scan_cache()
|
||||||
wpas.scan_for_bss(apdev[0]['bssid'], freq="2412")
|
wpas.scan_for_bss(apdev[0]['bssid'], freq="2412")
|
||||||
wpas.request("WPS_PBC " + apdev[0]['bssid'])
|
wpas.request("WPS_PBC " + apdev[0]['bssid'])
|
||||||
ev = wpas.wait_event(["WPS-SUCCESS"], timeout=15)
|
ev = wpas.wait_event(["WPS-SUCCESS"], timeout=15)
|
||||||
|
@ -539,6 +539,10 @@ def test_scan_and_bss_entry_removed(dev, apdev):
|
|||||||
|
|
||||||
dev[0].wait_connected(timeout=15, error="No connection (sme-connect)")
|
dev[0].wait_connected(timeout=15, error="No connection (sme-connect)")
|
||||||
wpas.wait_connected(timeout=15, error="No connection (connect)")
|
wpas.wait_connected(timeout=15, error="No connection (connect)")
|
||||||
|
dev[0].request("DISCONNECT")
|
||||||
|
wpas.request("DISCONNECT")
|
||||||
|
dev[0].flush_scan_cache()
|
||||||
|
wpas.flush_scan_cache()
|
||||||
|
|
||||||
def test_scan_reqs_with_non_scan_radio_work(dev, apdev):
|
def test_scan_reqs_with_non_scan_radio_work(dev, apdev):
|
||||||
"""SCAN commands while non-scan radio_work is in progress"""
|
"""SCAN commands while non-scan radio_work is in progress"""
|
||||||
|
Loading…
Reference in New Issue
Block a user