eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 4c6173ee8953b3274cb7411cf2b604187066ac62
parent 6e2aba3907877ae6e43012e397883e2c78f2d964
Author: James Prestwood <prestwoj@gmail.com>
Date:   Thu, 10 Sep 2020 16:12:38 -0700

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.

Diffstat:
Mautotests/testFT-SAE-roam/connection_test.py | 22+++++++++++++---------
Mautotests/testFT-SAE-roam/ft-psk-3.conf | 2--
Mautotests/testFT-SAE-roam/ft-sae-1.conf | 4+---
Mautotests/testFT-SAE-roam/ft-sae-2.conf | 4+---
4 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/autotests/testFT-SAE-roam/connection_test.py b/autotests/testFT-SAE-roam/connection_test.py @@ -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 diff --git a/autotests/testFT-SAE-roam/ft-psk-3.conf b/autotests/testFT-SAE-roam/ft-psk-3.conf @@ -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). diff --git a/autotests/testFT-SAE-roam/ft-sae-1.conf b/autotests/testFT-SAE-roam/ft-sae-1.conf @@ -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). diff --git a/autotests/testFT-SAE-roam/ft-sae-2.conf b/autotests/testFT-SAE-roam/ft-sae-2.conf @@ -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).