mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-26 02:19:26 +01:00
auto-t: change EAP-PWD to trigger eapol reauth
This commit is contained in:
parent
7f437c30e3
commit
ca0f993358
@ -9,9 +9,23 @@ from iwd import IWD
|
||||
from iwd import PSKAgent
|
||||
from iwd import NetworkType
|
||||
|
||||
from hostapd import HostapdCLI
|
||||
from hostapd import hostapd_map
|
||||
|
||||
class Test(unittest.TestCase):
|
||||
|
||||
def validate_connection(self, wd):
|
||||
|
||||
hostapd = None
|
||||
|
||||
for hostapd_if in list(hostapd_map.values()):
|
||||
hpd = HostapdCLI(hostapd_if)
|
||||
if hpd.get_config_value('ssid') == 'ssidEAP-PWD':
|
||||
hostapd = hpd
|
||||
break
|
||||
|
||||
self.assertIsNotNone(hostapd)
|
||||
|
||||
psk_agent = PSKAgent('eap-pwd-identity', ('eap-pwd-identity',
|
||||
'secret123'))
|
||||
wd.register_psk_agent(psk_agent)
|
||||
@ -47,6 +61,13 @@ class Test(unittest.TestCase):
|
||||
condition = 'obj.connected'
|
||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
||||
|
||||
hostapd.eapol_reauth(device.address)
|
||||
|
||||
wd.wait(10)
|
||||
|
||||
condition = 'obj.connected'
|
||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
||||
|
||||
device.disconnect()
|
||||
|
||||
condition = 'not obj.connected'
|
||||
|
Loading…
Reference in New Issue
Block a user