3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 21:22:37 +01:00

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

View File

@ -202,6 +202,12 @@ class HostapdCLI(object):
cmd = self.cmdline + ['req_beacon', addr, request] cmd = self.cmdline + ['req_beacon', addr, request]
ctx.start_process(cmd).wait() 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 @property
def bssid(self): def bssid(self):
cmd = self.cmdline + ['status'] cmd = self.cmdline + ['status']