From 7c1e3ab76a8e3505e3365d4bb4a59facc2f90856 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Tue, 28 Sep 2021 15:36:08 -0700 Subject: [PATCH] auto-t: hostapd.py: add rekey() utility Forces GTK/PTK rekeys --- autotests/util/hostapd.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/autotests/util/hostapd.py b/autotests/util/hostapd.py index 7cb3225a..9f2dc745 100644 --- a/autotests/util/hostapd.py +++ b/autotests/util/hostapd.py @@ -202,6 +202,12 @@ class HostapdCLI(object): cmd = self.cmdline + ['req_beacon', addr, request] ctx.start_process(cmd).wait() + def rekey(self, address): + cmd = 'REKEY_GTK' + self.ctrl_sock.sendall(cmd.encode('utf-8')) + cmd = 'REKEY_PTK %s' % address + self.ctrl_sock.sendall(cmd.encode('utf-8')) + @property def bssid(self): cmd = self.cmdline + ['status']