mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
tests: Verify tagged-only connectivity
Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
This commit is contained in:
parent
ba91e92023
commit
629d369674
@ -41,6 +41,9 @@ radius_accept_attr=64:d:13
|
||||
radius_accept_attr=65:d:6
|
||||
radius_accept_attr=81:s:2
|
||||
|
||||
"vlan1tagged" PAX 0123456789abcdef0123456789abcdef
|
||||
radius_accept_attr=56:x:31000001
|
||||
|
||||
"test-class" PAX 0123456789abcdef0123456789abcdef
|
||||
radius_accept_attr=25:x:00112233445566778899
|
||||
|
||||
|
@ -465,3 +465,28 @@ def test_ap_vlan_without_station(dev, apdev, p):
|
||||
subprocess.call(['brctl', 'delif', 'brvlan1', 'wlan3.1'],
|
||||
stderr=open('/dev/null', 'w'))
|
||||
subprocess.call(['brctl', 'delbr', 'brvlan1'])
|
||||
|
||||
def test_ap_vlan_wpa2_radius_tagged(dev, apdev):
|
||||
"""AP VLAN with WPA2-Enterprise and RADIUS EGRESS_VLANID attributes"""
|
||||
ifname = 'wlan0.1'
|
||||
try:
|
||||
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="vlan1tagged",
|
||||
password_hex="0123456789abcdef0123456789abcdef",
|
||||
scan_freq="2412")
|
||||
|
||||
# Create tagged interface for wpa_supplicant
|
||||
subprocess.call(['ip', 'link', 'add', 'link', dev[0].ifname,
|
||||
'name', ifname, 'type', 'vlan', 'id', '1'])
|
||||
subprocess.call(['ifconfig', ifname, 'up'])
|
||||
|
||||
hwsim_utils.run_connectivity_test(dev[0], hapd, 0, ifname1=ifname,
|
||||
ifname2="brvlan1")
|
||||
finally:
|
||||
subprocess.call(['ifconfig', ifname, 'down'])
|
||||
subprocess.call(['ip', 'link', 'del', ifname])
|
||||
|
Loading…
Reference in New Issue
Block a user