From 57af507ea756470015f83dd01a67f66e901293a2 Mon Sep 17 00:00:00 2001 From: Michael Braun Date: Thu, 21 Jan 2016 14:52:05 +0100 Subject: [PATCH] tests: Untagged VLAN ID with EGRESS_VLANID RADIUS attribute Signed-off-by: Michael Braun --- 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 9a03a9b70..7e43a36ba 100644 --- a/tests/hwsim/auth_serv/eap_user.conf +++ b/tests/hwsim/auth_serv/eap_user.conf @@ -41,6 +41,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 0d2ca00a4..57cef93e0 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",