From 3507968fd2d494da313aff814b7d89e7db205441 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 15 Mar 2019 00:12:05 +0200 Subject: [PATCH] tests: SAE anti-clogging request with mesh BSS Signed-off-by: Jouni Malinen --- tests/hwsim/test_sae.py | 45 +++++++++++++++----------- tests/hwsim/test_wpas_mesh.py | 59 +++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 18 deletions(-) diff --git a/tests/hwsim/test_sae.py b/tests/hwsim/test_sae.py index 85927d757..ca0add280 100644 --- a/tests/hwsim/test_sae.py +++ b/tests/hwsim/test_sae.py @@ -1400,9 +1400,7 @@ def test_sae_anti_clogging_during_attack(dev, apdev): try: run_sae_anti_clogging_during_attack(dev, apdev) finally: - subprocess.call(["ip", "link", "set", "dev", apdev[1]["ifname"], - "down"]) - subprocess.call(["iw", apdev[1]["ifname"], "set", "type", "managed"]) + stop_monitor(apdev[1]["ifname"]) def build_sae_commit(bssid, addr, group=21, token=None): if group == 19: @@ -1450,6 +1448,30 @@ def sae_rx_commit_token_req(sock, radiotap, send_two=False): sock.send(radiotap + frame) return True +def radiotap_build(): + radiotap_payload = struct.pack('BB', 0x08, 0) + radiotap_payload += struct.pack('BB', 0, 0) + radiotap_payload += struct.pack('BB', 0, 0) + radiotap_hdr = struct.pack('