[PATCHv2 10/12] test: untagged vlan id with EGRESS_VLANID radius attribute

Michael Braun michael-dev at fami-braun.de
Sun Dec 6 12:47:41 PST 2015


Signed-off-by: Michael Braun <michael-dev at fami-braun.de>
---
 tests/hwsim/auth_serv/eap_user.conf |  3 +++
 tests/hwsim/test_ap_vlan.py         | 13 +++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/tests/hwsim/auth_serv/eap_user.conf b/tests/hwsim/auth_serv/eap_user.conf
index 7d499f8..3fa6d11 100644
--- a/tests/hwsim/auth_serv/eap_user.conf
+++ b/tests/hwsim/auth_serv/eap_user.conf
@@ -36,6 +36,9 @@ radius_accept_attr=64:d:13
 radius_accept_attr=65:d:6
 radius_accept_attr=81:s:2
 
+"vlan1b"	PAX	0123456789abcdef0123456789abcdef
+radius_accept_attr=56:x:32000001
+
 "vlan1tagged"   PAX     0123456789abcdef0123456789abcdef
 radius_accept_attr=56:x:31000001
 
diff --git a/tests/hwsim/test_ap_vlan.py b/tests/hwsim/test_ap_vlan.py
index 1d5335e..ed253b2 100644
--- a/tests/hwsim/test_ap_vlan.py
+++ b/tests/hwsim/test_ap_vlan.py
@@ -89,6 +89,19 @@ def test_ap_vlan_wpa2_radius(dev, apdev):
     hwsim_utils.test_connectivity_iface(dev[1], hapd, "brvlan2")
     hwsim_utils.test_connectivity(dev[2], hapd)
 
+def test_ap_vlan_wpa2_radius_2(dev, apdev):
+    """AP VLAN with WPA2-Enterprise and RADIUS EGRESS_VLANID attributes"""
+    params = hostapd.wpa2_eap_params(ssid="test-vlan")
+    params['dynamic_vlan'] = "1";
+    hapd = hostapd.add_ap(apdev[0]['ifname'], params)
+
+    dev[0].connect("test-vlan", key_mgmt="WPA-EAP", eap="PAX",
+                   identity="vlan1b",
+                   password_hex="0123456789abcdef0123456789abcdef",
+                   scan_freq="2412")
+
+    hwsim_utils.test_connectivity_iface(dev[0], hapd, "brvlan1")
+
 def test_ap_vlan_wpa2_radius_id_change(dev, apdev):
     """AP VLAN with WPA2-Enterprise and RADIUS attributes changing VLANID"""
     as_params = { "ssid": "as",
-- 
2.1.4




More information about the Hostap mailing list