From: Jouni Malinen Date: Sun, 22 Dec 2024 17:44:24 +0000 (+0200) Subject: tests: MAke sae_anti_clogging_during_attack more robust X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=90192970bfd67dbace16d388c3b91a4619c4b3fa;p=thirdparty%2Fhostap.git tests: MAke sae_anti_clogging_during_attack more robust Reset apdev[1] into a known state before using it as montior interface since issues have been seen when the previous test case used it as a 5 GHz AP. In addition, handle sock.recv() timeout more gracefully. For example, this test case sequences had issues: ap_track_sta_force_2ghz sae_anti_clogging_during_attack he160b sae_anti_clogging_during_attack Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_sae.py b/tests/hwsim/test_sae.py index d5a7a2342..89b5c623f 100644 --- a/tests/hwsim/test_sae.py +++ b/tests/hwsim/test_sae.py @@ -2006,7 +2006,10 @@ def build_sae_commit(bssid, addr, group=21, token=None): return frame def sae_rx_commit_token_req(sock, radiotap, send_two=False): - msg = sock.recv(1500) + try: + msg = sock.recv(1500) + except TimeoutError: + return False ver, pad, length, present = struct.unpack('