[PATCH 27/44] test: pre-authentification with full dynamic vlans
michael-dev at fami-braun.de
michael-dev at fami-braun.de
Wed Feb 24 03:53:33 PST 2016
From: Michael Braun <michael-dev at fami-braun.de>
Signed-off-by: Michael Braun <michael-dev at fami-braun.de>
---
tests/hwsim/test_pmksa_cache.py | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/tests/hwsim/test_pmksa_cache.py b/tests/hwsim/test_pmksa_cache.py
index 5788aad..2200d37 100644
--- a/tests/hwsim/test_pmksa_cache.py
+++ b/tests/hwsim/test_pmksa_cache.py
@@ -486,6 +486,25 @@ def test_pmksa_cache_preauth_vlan_enabled_per_sta_vif(dev, apdev, p):
extraparams[1]['per_sta_vif'] = "1"
test_pmksa_cache_preauth_vlan_enabled(dev, apdev, p, extraparams)
+def test_pmksa_cache_preauth_vlan_used_full_dynamic(dev, apdev, p, extraparams = None):
+ """RSN pre-authentication to generate PMKSA cache entry (dynamic_vlan optional and station with VLAN set, full dynamic vlan)"""
+ try:
+ subprocess.call(['brctl', 'addbr', 'brpre'])
+ subprocess.call(['brctl', 'setfd', 'brpre', '0'])
+ subprocess.call(['ip', 'link', 'set', 'dev', 'brpre', 'up'])
+ if not extraparams:
+ extraparams = [{}, {}]
+ extraparams[0]['dynamic_vlan'] = '1'
+ extraparams[0]['rsn_preauth_copy_iface'] = 'brpre'
+ extraparams[1]['dynamic_vlan'] = '1'
+ extraparams[1]['rsn_preauth_interfaces'] = 'brpre'
+ extraparams[1]['rsn_preauth_autoconf_bridge'] = '1'
+ generic_pmksa_cache_preauth(dev, apdev, extraparams,
+ "vlan1", "brvlan1")
+ finally:
+ subprocess.call(['ip', 'link', 'set', 'dev', 'brpre', 'down'])
+ subprocess.call(['brctl', 'delbr', 'brpre'])
+
def test_pmksa_cache_preauth_vlan_used(dev, apdev, p, extraparams = None):
"""RSN pre-authentication to generate PMKSA cache entry (station with VLAN set)"""
try:
--
1.9.1
More information about the Hostap
mailing list