]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Flush scan cache in ap_wps_and_sae
authorJouni Malinen <quic_jouni@quicinc.com>
Thu, 21 Dec 2023 18:49:21 +0000 (20:49 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 21 Dec 2023 18:49:21 +0000 (20:49 +0200)
This avoids issues with old scan results from a previous test causing
incorrect association after WPS exchange.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
tests/hwsim/test_ap_wps.py

index 035464ca7f7cca96659ade1d48bfc4f863e2c430..883a735e42d2174d9ec875344ef213ba964d4ef3 100644 (file)
@@ -10402,6 +10402,7 @@ def run_ap_wps_and_sae(dev, apdev):
     pin = dev[0].wps_read_pin()
     hapd.request("WPS_PIN any " + pin)
 
+    dev[0].flush_scan_cache()
     dev[0].set("wps_cred_add_sae", "1")
     dev[0].request("SET sae_groups ")
     dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412", force_scan=True)
@@ -10413,6 +10414,7 @@ def run_ap_wps_and_sae(dev, apdev):
     if 'pmf' not in status or status['pmf'] != "1":
         raise Exception("PMF not enabled")
 
+    dev[1].flush_scan_cache()
     pin = dev[1].wps_read_pin()
     hapd.request("WPS_PIN any " + pin)
     dev[1].scan_for_bss(apdev[0]['bssid'], freq="2412", force_scan=True)