From fd6b727ed423d2e518e3eb0de47adc5af59bacf1 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 30 Mar 2014 10:59:16 +0300 Subject: [PATCH] tests: VLAN using vlan_file mapping Signed-off-by: Jouni Malinen --- tests/hwsim/hostapd.vlan | 2 ++ tests/hwsim/test_ap_vlan.py | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 tests/hwsim/hostapd.vlan diff --git a/tests/hwsim/hostapd.vlan b/tests/hwsim/hostapd.vlan new file mode 100644 index 000000000..b0e905bf5 --- /dev/null +++ b/tests/hwsim/hostapd.vlan @@ -0,0 +1,2 @@ +1 hwsimvlan1 +* testvlan# diff --git a/tests/hwsim/test_ap_vlan.py b/tests/hwsim/test_ap_vlan.py index 9b2550bfe..08534a1b7 100644 --- a/tests/hwsim/test_ap_vlan.py +++ b/tests/hwsim/test_ap_vlan.py @@ -28,6 +28,21 @@ def test_ap_vlan_open(dev, apdev): hwsim_utils.test_connectivity(dev[1].ifname, "brvlan2") hwsim_utils.test_connectivity(dev[2].ifname, apdev[0]['ifname']) +def test_ap_vlan_file_open(dev, apdev): + """AP VLAN with open network and vlan_file mapping""" + params = { "ssid": "test-vlan-open", + "dynamic_vlan": "1", + "vlan_file": "hostapd.vlan", + "accept_mac_file": "hostapd.accept" } + hostapd.add_ap(apdev[0]['ifname'], params) + + dev[0].connect("test-vlan-open", key_mgmt="NONE", scan_freq="2412") + dev[1].connect("test-vlan-open", key_mgmt="NONE", scan_freq="2412") + dev[2].connect("test-vlan-open", key_mgmt="NONE", 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(dev, apdev): """AP VLAN with WPA2-PSK""" params = hostapd.wpa2_params(ssid="test-vlan",