diff --git a/autotests/util/hostapd.py b/autotests/util/hostapd.py index 9f2dc745..22802be6 100644 --- a/autotests/util/hostapd.py +++ b/autotests/util/hostapd.py @@ -202,11 +202,15 @@ class HostapdCLI(object): cmd = self.cmdline + ['req_beacon', addr, request] ctx.start_process(cmd).wait() - def rekey(self, address): + def rekey(self, address=None): + if address: + cmd = 'REKEY_PTK %s' % address + self.ctrl_sock.sendall(cmd.encode('utf-8')) + self.wait_for_event('EAPOL-4WAY-HS-COMPLETED') + return + 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):