tests: Verify hostapd STA vlan_id value
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
4994fa9e59
commit
e4d1000cac
2 changed files with 30 additions and 0 deletions
|
@ -378,6 +378,20 @@ def test_ap_ft_vlan(dev, apdev):
|
||||||
if filename.startswith('/tmp/'):
|
if filename.startswith('/tmp/'):
|
||||||
os.unlink(filename)
|
os.unlink(filename)
|
||||||
|
|
||||||
|
sta = hapd0.get_sta(dev[0].own_addr())
|
||||||
|
if not (sta and "vlan_id" in sta):
|
||||||
|
raise Exception("VLAN information not in STA output")
|
||||||
|
vlan_id = int(sta["vlan_id"])
|
||||||
|
if vlan_id != 1:
|
||||||
|
raise Exception("Unexpected vlan_id %d" % vlan_id)
|
||||||
|
|
||||||
|
sta = hapd1.get_sta(dev[0].own_addr())
|
||||||
|
if not (sta and "vlan_id" in sta):
|
||||||
|
raise Exception("VLAN information not in STA output")
|
||||||
|
vlan_id = int(sta["vlan_id"])
|
||||||
|
if vlan_id != 1:
|
||||||
|
raise Exception("Unexpected vlan_id %d" % vlan_id)
|
||||||
|
|
||||||
def test_ap_ft_vlan_disconnected(dev, apdev):
|
def test_ap_ft_vlan_disconnected(dev, apdev):
|
||||||
"""WPA2-PSK-FT AP with VLAN and local key generation"""
|
"""WPA2-PSK-FT AP with VLAN and local key generation"""
|
||||||
ssid = "test-ft"
|
ssid = "test-ft"
|
||||||
|
|
|
@ -782,6 +782,14 @@ def test_ap_vlan_psk(dev, apdev, params):
|
||||||
hwsim_utils.test_connectivity_iface(dev[1], hapd, "brvlan2")
|
hwsim_utils.test_connectivity_iface(dev[1], hapd, "brvlan2")
|
||||||
hwsim_utils.test_connectivity_iface(dev[2], hapd, "brvlan3")
|
hwsim_utils.test_connectivity_iface(dev[2], hapd, "brvlan3")
|
||||||
|
|
||||||
|
for i in range(3):
|
||||||
|
sta = hapd.get_sta(dev[i].own_addr())
|
||||||
|
if not (sta and "vlan_id" in sta):
|
||||||
|
raise Exception("VLAN information not in STA output")
|
||||||
|
vlan_id = int(sta["vlan_id"])
|
||||||
|
if vlan_id != i + 1:
|
||||||
|
raise Exception("Unexpected vlan_id %d for dev[%d]" % (vlan_id, i))
|
||||||
|
|
||||||
def test_ap_vlan_sae(dev, apdev, params):
|
def test_ap_vlan_sae(dev, apdev, params):
|
||||||
"""AP VLAN based on SAE Password Identifier"""
|
"""AP VLAN based on SAE Password Identifier"""
|
||||||
for i in range(3):
|
for i in range(3):
|
||||||
|
@ -804,3 +812,11 @@ def test_ap_vlan_sae(dev, apdev, params):
|
||||||
hwsim_utils.test_connectivity_iface(dev[0], hapd, "brvlan1")
|
hwsim_utils.test_connectivity_iface(dev[0], hapd, "brvlan1")
|
||||||
hwsim_utils.test_connectivity_iface(dev[1], hapd, "brvlan2")
|
hwsim_utils.test_connectivity_iface(dev[1], hapd, "brvlan2")
|
||||||
hwsim_utils.test_connectivity_iface(dev[2], hapd, "brvlan3")
|
hwsim_utils.test_connectivity_iface(dev[2], hapd, "brvlan3")
|
||||||
|
|
||||||
|
for i in range(3):
|
||||||
|
sta = hapd.get_sta(dev[i].own_addr())
|
||||||
|
if not (sta and "vlan_id" in sta):
|
||||||
|
raise Exception("VLAN information not in STA output")
|
||||||
|
vlan_id = int(sta["vlan_id"])
|
||||||
|
if vlan_id != i + 1:
|
||||||
|
raise Exception("Unexpected vlan_id %d for dev[%d]" % (vlan_id, i))
|
||||||
|
|
Loading…
Reference in a new issue