From: Michael Braun <michael-dev@xxxxxxxxxxxxx> Signed-off-by: Michael Braun <michael-dev@xxxxxxxxxxxxx> --- tests/hwsim/test_ap_ft.py | 107 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/tests/hwsim/test_ap_ft.py b/tests/hwsim/test_ap_ft.py index c63e427..7ed94ae 100644 --- a/tests/hwsim/test_ap_ft.py +++ b/tests/hwsim/test_ap_ft.py @@ -182,6 +182,43 @@ def test_ap_ft(dev, apdev): if "[WPA2-FT/PSK-CCMP]" not in dev[0].request("SCAN_RESULTS"): raise Exception("Scan results missing RSN element info") +def test_ap_ft_vlan(dev, apdev): + """WPA2-PSK-FT AP w VLAN""" + ssid = "test-ft" + passphrase="12345678" + + params = ft_params1(ssid=ssid, passphrase=passphrase) + params['dynamic_vlan'] = "1"; + params['accept_mac_file'] = "hostapd.accept"; + hapd0 = hostapd.add_ap(apdev[0]['ifname'], params) + + params = ft_params2(ssid=ssid, passphrase=passphrase) + params['dynamic_vlan'] = "1"; + params['accept_mac_file'] = "hostapd.accept"; + hapd1 = hostapd.add_ap(apdev[1]['ifname'], params) + + run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, conndev="brvlan1") + if "[WPA2-FT/PSK-CCMP]" not in dev[0].request("SCAN_RESULTS"): + raise Exception("Scan results missing RSN element info") + +def test_ap_ft_vlan_2(dev, apdev): + """WPA2-PSK-FT AP w VLAN and dest-AP does not have VLAN info locally""" + ssid = "test-ft" + passphrase="12345678" + + params = ft_params1(ssid=ssid, passphrase=passphrase) + params['dynamic_vlan'] = "1"; + params['accept_mac_file'] = "hostapd.accept"; + hapd0 = hostapd.add_ap(apdev[0]['ifname'], params) + + params = ft_params2(ssid=ssid, passphrase=passphrase) + params['dynamic_vlan'] = "1"; + hapd1 = hostapd.add_ap(apdev[1]['ifname'], params) + + run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, conndev="brvlan1") + if "[WPA2-FT/PSK-CCMP]" not in dev[0].request("SCAN_RESULTS"): + raise Exception("Scan results missing RSN element info") + def test_ap_ft_many(dev, apdev): """WPA2-PSK-FT AP multiple times""" ssid = "test-ft" @@ -194,6 +231,23 @@ def test_ap_ft_many(dev, apdev): run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, roams=50) +def test_ap_ft_many_vlan(dev, apdev): + """WPA2-PSK-FT AP w VLAN""" + ssid = "test-ft" + passphrase="12345678" + + params = ft_params1(ssid=ssid, passphrase=passphrase) + params['dynamic_vlan'] = "1"; + params['accept_mac_file'] = "hostapd.accept"; + hapd0 = hostapd.add_ap(apdev[0]['ifname'], params) + + params = ft_params2(ssid=ssid, passphrase=passphrase) + params['dynamic_vlan'] = "1"; + params['accept_mac_file'] = "hostapd.accept"; + hapd1 = hostapd.add_ap(apdev[1]['ifname'], params) + + run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, roams=50, conndev="brvlan1") + def test_ap_ft_mixed(dev, apdev): """WPA2-PSK-FT mixed-mode AP""" ssid = "test-ft-mixed" @@ -238,6 +292,24 @@ def test_ap_ft_over_ds(dev, apdev): check_mib(dev[0], [ ("dot11RSNAAuthenticationSuiteRequested", "00-0f-ac-4"), ("dot11RSNAAuthenticationSuiteSelected", "00-0f-ac-4") ]) +def test_ap_ft_vlan_over_ds(dev, apdev): + """WPA2-PSK-FT AP over DS w VLAN""" + ssid = "test-ft" + passphrase="12345678" + + params = ft_params1(ssid=ssid, passphrase=passphrase) + params['dynamic_vlan'] = "1"; + params['accept_mac_file'] = "hostapd.accept"; + hapd0 = hostapd.add_ap(apdev[0]['ifname'], params) + params = ft_params2(ssid=ssid, passphrase=passphrase) + params['dynamic_vlan'] = "1"; + params['accept_mac_file'] = "hostapd.accept"; + hapd1 = hostapd.add_ap(apdev[1]['ifname'], params) + + run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, over_ds=True, conndev="brvlan1") + check_mib(dev[0], [ ("dot11RSNAAuthenticationSuiteRequested", "00-0f-ac-4"), + ("dot11RSNAAuthenticationSuiteSelected", "00-0f-ac-4") ]) + def test_ap_ft_over_ds_many(dev, apdev): """WPA2-PSK-FT AP over DS multiple times""" ssid = "test-ft" @@ -251,6 +323,23 @@ def test_ap_ft_over_ds_many(dev, apdev): run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, over_ds=True, roams=50) +def test_ap_ft_vlan_over_ds_many(dev, apdev): + """WPA2-PSK-FT AP over DS multiple times""" + ssid = "test-ft" + passphrase="12345678" + + params = ft_params1(ssid=ssid, passphrase=passphrase) + params['dynamic_vlan'] = "1"; + params['accept_mac_file'] = "hostapd.accept"; + hapd0 = hostapd.add_ap(apdev[0]['ifname'], params) + params = ft_params2(ssid=ssid, passphrase=passphrase) + params['dynamic_vlan'] = "1"; + params['accept_mac_file'] = "hostapd.accept"; + hapd1 = hostapd.add_ap(apdev[1]['ifname'], params) + + run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, over_ds=True, + roams=50, conndev="brvlan1") + def test_ap_ft_over_ds_unknown_target(dev, apdev): """WPA2-PSK-FT AP""" ssid = "test-ft" @@ -391,6 +480,24 @@ def test_ap_ft_over_ds_pull(dev, apdev): run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, over_ds=True) +def test_ap_ft_over_ds_pull_vlan(dev, apdev): + """WPA2-PSK-FT AP over DS (pull PMK) w VLAN""" + ssid = "test-ft" + passphrase="12345678" + + params = ft_params1(ssid=ssid, passphrase=passphrase) + params["pmk_r1_push"] = "0" + params['dynamic_vlan'] = "1"; + params['accept_mac_file'] = "hostapd.accept"; + hapd0 = hostapd.add_ap(apdev[0]['ifname'], params) + params = ft_params2(ssid=ssid, passphrase=passphrase) + params["pmk_r1_push"] = "0" + params['dynamic_vlan'] = "1"; + params['accept_mac_file'] = "hostapd.accept"; + hapd1 = hostapd.add_ap(apdev[1]['ifname'], params) + + run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, over_ds=True, conndev="brvlan1") + def test_ap_ft_sae(dev, apdev): """WPA2-PSK-FT-SAE AP""" if "SAE" not in dev[0].get_capability("auth_alg"): -- 1.9.1 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap