]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Make DPP relay tests more robust
authorJouni Malinen <j@w1.fi>
Sun, 13 Mar 2022 16:18:28 +0000 (18:18 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 13 Mar 2022 16:26:45 +0000 (18:26 +0200)
Flush scan results to avoid failure caused by incorrect channel
selection based on an old result for the same BSSID. This was found with
the following test sequence:
ap_track_sta_no_auth dpp_network_intro_version_missing_req dpp_controller_relay_pkex

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

index 5ffe909b86bd5ff827d6f482627ccb1f279bd329..94b9f8207b5848959a48ed5a8f76dafc05915116 100644 (file)
@@ -5406,6 +5406,8 @@ def run_dpp_controller_relay(dev, apdev, params, chirp=False):
     wait_auth_success(relay, dev[1], configurator=dev[1], enrollee=relay)
     update_hapd_config(relay)
 
+    dev[0].flush_scan_cache()
+
     # Initiate from Enrollee with broadcast DPP Authentication Request or
     # using chirping
     dev[0].set("dpp_config_processing", "2")
index c3f57f62103a0be94969a1096537231c39b52477..9cf6f963470ae1b5d0b0de76c13a1e07ec4cf9e9 100644 (file)
@@ -260,6 +260,8 @@ def run_dpp_controller_relay_pkex(dev, apdev, params):
     if "FAIL" in res:
         raise Exception("Failed to set PKEX data (Controller)")
 
+    dev[0].flush_scan_cache()
+
     # Initiate PKEX from Enrollee
     dev[0].set("dpp_config_processing", "2")
     dev[0].dpp_pkex_init(identifier=None, code=code, role="enrollee")