3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-16 17:09:24 +01:00

auto-t: fix SAE FT test and update

Updated testFT-SAE-roam to use the TestContext APIs as well as
fixed the failure which was introduced after requiring stricter
AKM logic for SAE networks. The new failure was due to the hostapd
config not including the standard SAE AKM which is actually
required by the spec.
This commit is contained in:
James Prestwood 2020-09-10 16:12:38 -07:00 committed by Denis Kenzior
parent 6e2aba3907
commit 4c6173ee89
4 changed files with 15 additions and 17 deletions

View File

@ -11,9 +11,12 @@ from iwd import NetworkType
from hwsim import Hwsim
from hostapd import HostapdCLI
import testutil
from config import ctx
class Test(unittest.TestCase):
def test_roam_success(self):
wd = IWD()
hwsim = Hwsim()
rule0 = hwsim.rules.create()
@ -28,8 +31,6 @@ class Test(unittest.TestCase):
rule2.source = self.bss_radio[2].addresses[0]
rule2.bidirectional = True
wd = IWD()
psk_agent = PSKAgent("EasilyGuessedPassword")
wd.register_psk_agent(psk_agent)
@ -158,17 +159,20 @@ class Test(unittest.TestCase):
hwsim.get_radio('rad1'),
hwsim.get_radio('rad2') ]
# Set interface addresses to those expected by hostapd config files
os.system('ifconfig "' + cls.bss_hostapd[0].ifname +
'" down hw ether 12:00:00:00:00:01 up')
os.system('ifconfig "' + cls.bss_hostapd[1].ifname +
'" down hw ether 12:00:00:00:00:02 up')
os.system('ifconfig "' + cls.bss_hostapd[2].ifname +
'" down hw ether 12:00:00:00:00:03 up')
ctx.start_process(['ifconfig', cls.bss_hostapd[0].ifname, 'down', 'hw', \
'ether', '12:00:00:00:00:01', 'up'], wait=True)
ctx.start_process(['ifconfig', cls.bss_hostapd[1].ifname, 'down', 'hw', \
'ether', '12:00:00:00:00:02', 'up'], wait=True)
ctx.start_process(['ifconfig', cls.bss_hostapd[2].ifname, 'down', 'hw', \
'ether', '12:00:00:00:00:03', 'up'], wait=True)
# Set interface addresses to those expected by hostapd config files
cls.bss_hostapd[0].reload()
cls.bss_hostapd[0].wait_for_event("AP-ENABLED")
cls.bss_hostapd[1].reload()
cls.bss_hostapd[1].wait_for_event("AP-ENABLED")
cls.bss_hostapd[2].reload()
cls.bss_hostapd[2].wait_for_event("AP-ENABLED")
# Fill in the neighbor AP tables in both BSSes. By default each
# instance knows only about current BSS, even inside one hostapd

View File

@ -16,8 +16,6 @@ wpa_passphrase=EasilyGuessedPassword
wpa_ptk_rekey=30
wpa_group_rekey=80
ieee80211w=2
rsn_preauth=1
rsn_preauth_interfaces=lo
disable_pmksa_caching=0
# Allow PMK cache to be shared opportunistically among configured interfaces
# and BSSes (i.e., all configurations within a single hostapd process).

View File

@ -10,14 +10,12 @@ nas_identifier=dummy1
wpa=2
# Can support SAE and FT-SAE (space separated list) and/or EAP at the same
# time but we want to force FT
wpa_key_mgmt=FT-SAE
wpa_key_mgmt=FT-SAE SAE
sae_password=EasilyGuessedPassword|mac=ff:ff:ff:ff:ff:ff
wpa_pairwise=CCMP
wpa_ptk_rekey=30
wpa_group_rekey=80
ieee80211w=2
rsn_preauth=1
rsn_preauth_interfaces=lo
disable_pmksa_caching=0
# Allow PMK cache to be shared opportunistically among configured interfaces
# and BSSes (i.e., all configurations within a single hostapd process).

View File

@ -10,14 +10,12 @@ nas_identifier=dummy2
wpa=2
# Can support SAE and FT-SAE (space separated list) and/or EAP at the same
# time but we want to force FT
wpa_key_mgmt=FT-SAE
wpa_key_mgmt=FT-SAE SAE
sae_password=EasilyGuessedPassword|mac=ff:ff:ff:ff:ff:ff
wpa_pairwise=CCMP
wpa_ptk_rekey=30
wpa_group_rekey=80
ieee80211w=2
rsn_preauth=1
rsn_preauth_interfaces=lo
disable_pmksa_caching=0
# Allow PMK cache to be shared opportunistically among configured interfaces
# and BSSes (i.e., all configurations within a single hostapd process).