[PATCHv2 09/12] test: verify connectivity with untagged/tagged mixed configuration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Michael Braun <michael-dev@xxxxxxxxxxxxx>
---
 tests/hwsim/auth_serv/eap_user.conf |  6 ++++++
 tests/hwsim/test_ap_vlan.py         | 24 ++++++++++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/tests/hwsim/auth_serv/eap_user.conf b/tests/hwsim/auth_serv/eap_user.conf
index 44600ca..7d499f8 100644
--- a/tests/hwsim/auth_serv/eap_user.conf
+++ b/tests/hwsim/auth_serv/eap_user.conf
@@ -39,6 +39,12 @@ radius_accept_attr=81:s:2
 "vlan1tagged"   PAX     0123456789abcdef0123456789abcdef
 radius_accept_attr=56:x:31000001
 
+"vlan12mixed"   PAX     0123456789abcdef0123456789abcdef
+radius_accept_attr=56:x:31000001
+radius_accept_attr=64:d:13
+radius_accept_attr=65:d:6
+radius_accept_attr=81:s:2
+
 "test-class"	PAX	0123456789abcdef0123456789abcdef
 radius_accept_attr=25:x:00112233445566778899
 
diff --git a/tests/hwsim/test_ap_vlan.py b/tests/hwsim/test_ap_vlan.py
index c8f5c42..1d5335e 100644
--- a/tests/hwsim/test_ap_vlan.py
+++ b/tests/hwsim/test_ap_vlan.py
@@ -486,3 +486,27 @@ def test_ap_vlan_wpa2_radius_tagged(dev, apdev):
     finally:
         subprocess.call(['ifconfig','wlan0.1','down'])
         subprocess.call(['ip','link','del','wlan0.1'])
+
+def test_ap_vlan_wpa2_radius_mixed(dev, apdev):
+    """AP VLAN with WPA2-Enterprise and tagged+untagged VLANs"""
+    try:
+        subprocess.call(['ip','link','add','link','wlan0','name','wlan0.1','type','vlan','id','1'])
+        subprocess.call(['ifconfig','wlan0.1','up'])
+
+        params = hostapd.wpa2_eap_params(ssid="test-vlan")
+        params['dynamic_vlan'] = "1"
+        params["vlan_naming"] = "1"
+        hapd = hostapd.add_ap(apdev[0]['ifname'], params)
+
+        dev[0].connect("test-vlan", key_mgmt="WPA-EAP", eap="PAX",
+                       identity="vlan12mixed",
+                       password_hex="0123456789abcdef0123456789abcdef",
+                       scan_freq="2412")
+
+	logger.info("test connectivity in untagged vlan 2")
+        hwsim_utils.run_connectivity_test(dev[0], hapd, 0, ifname1="wlan0", ifname2="brvlan2")
+	logger.info("test connectivity in tagged vlan 1")
+        hwsim_utils.run_connectivity_test(dev[0], hapd, 0, ifname1="wlan0.1", ifname2="brvlan1")
+    finally:
+        subprocess.call(['ifconfig','wlan0.1','down'])
+        subprocess.call(['ip','link','del','wlan0.1'])
-- 
2.1.4


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux