auto-t: hostapd.py: add rekey() utility

Forces GTK/PTK rekeys
This commit is contained in:
James Prestwood 2021-09-28 15:36:08 -07:00 committed by Denis Kenzior
parent 908dff807e
commit 7c1e3ab76a
1 changed files with 6 additions and 0 deletions

View File

@ -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']