diff mbox series

[4/5] auto-t: add reason/test arguments to hostapd deauthenticate

Message ID 20240717145525.2656306-4-prestwoj@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series [1/5] eapol: move HANDSHAKE_STARTED_EVENT to eapol_start() | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

James Prestwood July 17, 2024, 2:55 p.m. UTC
The reason code is obvious, but the test argument is actually a
toggle to send the frame encrypted or unencrypted.
---
 autotests/util/hostapd.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/autotests/util/hostapd.py b/autotests/util/hostapd.py
index 2f92e330..e5e35a96 100644
--- a/autotests/util/hostapd.py
+++ b/autotests/util/hostapd.py
@@ -184,8 +184,12 @@  class HostapdCLI(object):
         cmd = self.cmdline + ['wps_pin', 'any', pin]
         ctx.start_process(cmd).wait()
 
-    def deauthenticate(self, client_address):
+    def deauthenticate(self, client_address, reason=None, test=None):
         cmd = self.cmdline + ['deauthenticate', client_address]
+
+        if reason:
+            cmd.append(f"reason={reason} test={test}")
+
         ctx.start_process(cmd).wait()
 
     def eapol_reauth(self, client_address):