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 PSKAgent
|
||||||
from iwd import NetworkType
|
from iwd import NetworkType
|
||||||
|
|
||||||
|
from hostapd import HostapdCLI
|
||||||
|
from hostapd import hostapd_map
|
||||||
|
|
||||||
class Test(unittest.TestCase):
|
class Test(unittest.TestCase):
|
||||||
|
|
||||||
def validate_connection(self, wd):
|
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',
|
psk_agent = PSKAgent('eap-pwd-identity', ('eap-pwd-identity',
|
||||||
'secret123'))
|
'secret123'))
|
||||||
wd.register_psk_agent(psk_agent)
|
wd.register_psk_agent(psk_agent)
|
||||||
|
@ -47,6 +61,13 @@ class Test(unittest.TestCase):
|
||||||
condition = 'obj.connected'
|
condition = 'obj.connected'
|
||||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
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()
|
device.disconnect()
|
||||||
|
|
||||||
condition = 'not obj.connected'
|
condition = 'not obj.connected'
|
||||||
|
|
Loading…
Reference in New Issue