3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 06:29:23 +01:00

auto-t: fix eapol_reauth utility

This was passing IFNAME= along with EAPOL_REAUTH which does not work
in the context of a hostapd socket where the iface is already implied.
This fixes that issue as well as resets the events array and actually
waits for the required events afterwards.
This commit is contained in:
James Prestwood 2022-05-24 13:31:44 -07:00 committed by Denis Kenzior
parent eb8362bf76
commit a18c6e10a7
2 changed files with 4 additions and 4 deletions

View File

@ -37,9 +37,6 @@ class Test(unittest.TestCase):
hostapd.eapol_reauth(device.address) hostapd.eapol_reauth(device.address)
hostapd.wait_for_event('CTRL-EVENT-EAP-STARTED')
hostapd.wait_for_event('CTRL-EVENT-EAP-SUCCESS')
condition = 'obj.state == DeviceState.connected' condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition) wd.wait_for_object_condition(device, condition)

View File

@ -163,8 +163,11 @@ class HostapdCLI(object):
ctx.start_process(cmd).wait() ctx.start_process(cmd).wait()
def eapol_reauth(self, client_address): def eapol_reauth(self, client_address):
cmd = 'IFNAME=' + self.ifname + ' EAPOL_REAUTH ' + client_address self.events = []
cmd = 'EAPOL_REAUTH ' + client_address
self.ctrl_sock.sendall(cmd.encode('utf-8')) self.ctrl_sock.sendall(cmd.encode('utf-8'))
self.wait_for_event('CTRL-EVENT-EAP-STARTED')
self.wait_for_event('CTRL-EVENT-EAP-SUCCESS')
def reload(self): def reload(self):
# Seemingly all three commands needed for the instance to notice # Seemingly all three commands needed for the instance to notice