tests: VLAN tests using RADIUS tunnel attributes
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
37fa2eb5ea
commit
fac1722787
2 changed files with 54 additions and 1 deletions
|
@ -8,6 +8,16 @@
|
|||
"vendor-test" VENDOR-TEST "foo"
|
||||
"osen@example.com" WFA-UNAUTH-TLS
|
||||
|
||||
"vlan1" PAX 0123456789abcdef0123456789abcdef
|
||||
radius_accept_attr=64:d:13
|
||||
radius_accept_attr=65:d:6
|
||||
radius_accept_attr=81:s:1
|
||||
|
||||
"vlan2" PAX 0123456789abcdef0123456789abcdef
|
||||
radius_accept_attr=64:d:13
|
||||
radius_accept_attr=65:d:6
|
||||
radius_accept_attr=81:s:2
|
||||
|
||||
"0"* AKA
|
||||
"1"* SIM
|
||||
"2"* AKA
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/python
|
||||
#
|
||||
# Test cases for AP VLAN
|
||||
# Copyright (c) 2013, Jouni Malinen <j@w1.fi>
|
||||
# Copyright (c) 2013-2014, Jouni Malinen <j@w1.fi>
|
||||
#
|
||||
# This software may be distributed under the terms of the BSD license.
|
||||
# See README for more details.
|
||||
|
@ -42,3 +42,46 @@ def test_ap_vlan_wpa2(dev, apdev):
|
|||
hwsim_utils.test_connectivity(dev[0].ifname, "brvlan1")
|
||||
hwsim_utils.test_connectivity(dev[1].ifname, "brvlan2")
|
||||
hwsim_utils.test_connectivity(dev[2].ifname, apdev[0]['ifname'])
|
||||
|
||||
def test_ap_vlan_wpa2_radius(dev, apdev):
|
||||
"""AP VLAN with WPA2-Enterprise and RADIUS attributes"""
|
||||
params = hostapd.wpa2_eap_params(ssid="test-vlan")
|
||||
params['dynamic_vlan'] = "1";
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
|
||||
dev[0].connect("test-vlan", key_mgmt="WPA-EAP", eap="PAX",
|
||||
identity="vlan1",
|
||||
password_hex="0123456789abcdef0123456789abcdef",
|
||||
scan_freq="2412")
|
||||
dev[1].connect("test-vlan", key_mgmt="WPA-EAP", eap="PAX",
|
||||
identity="vlan2",
|
||||
password_hex="0123456789abcdef0123456789abcdef",
|
||||
scan_freq="2412")
|
||||
dev[2].connect("test-vlan", key_mgmt="WPA-EAP", eap="PAX",
|
||||
identity="pax.user@example.com",
|
||||
password_hex="0123456789abcdef0123456789abcdef",
|
||||
scan_freq="2412")
|
||||
hwsim_utils.test_connectivity(dev[0].ifname, "brvlan1")
|
||||
hwsim_utils.test_connectivity(dev[1].ifname, "brvlan2")
|
||||
hwsim_utils.test_connectivity(dev[2].ifname, apdev[0]['ifname'])
|
||||
|
||||
def test_ap_vlan_wpa2_radius_required(dev, apdev):
|
||||
"""AP VLAN with WPA2-Enterprise and RADIUS attributes required"""
|
||||
params = hostapd.wpa2_eap_params(ssid="test-vlan")
|
||||
params['dynamic_vlan'] = "2";
|
||||
hostapd.add_ap(apdev[0]['ifname'], params)
|
||||
|
||||
dev[0].connect("test-vlan", key_mgmt="WPA-EAP", eap="PAX",
|
||||
identity="vlan1",
|
||||
password_hex="0123456789abcdef0123456789abcdef",
|
||||
scan_freq="2412")
|
||||
dev[2].connect("test-vlan", key_mgmt="WPA-EAP", eap="PAX",
|
||||
identity="pax.user@example.com",
|
||||
password_hex="0123456789abcdef0123456789abcdef",
|
||||
scan_freq="2412", wait_connect=False)
|
||||
ev = dev[2].wait_event(["CTRL-EVENT-CONNECTED",
|
||||
"CTRL-EVENT-DISCONNECTED"], timeout=20)
|
||||
if ev is None:
|
||||
raise Exception("Timeout on connection attempt")
|
||||
if "CTRL-EVENT-CONNECTED" in ev:
|
||||
raise Exception("Unexpected success without tunnel parameters")
|
||||
|
|
Loading…
Reference in a new issue