aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2016-08-18 17:06:09 (GMT)
committerJouni Malinen <j@w1.fi>2016-08-18 17:07:17 (GMT)
commit548d280162c08be11a8bcd6179507acbc5d93878 (patch)
tree57dfcf3de4e693a92aba9c87397ddb64bdc472cf /tests
parent72a652d785871ac49a035abd1886410068ced191 (diff)
downloadhostap-548d280162c08be11a8bcd6179507acbc5d93878.zip
hostap-548d280162c08be11a8bcd6179507acbc5d93878.tar.gz
hostap-548d280162c08be11a8bcd6179507acbc5d93878.tar.bz2
tests: IAPP and multiple BSSes
This verifies IAPP socket registration from multiple hostapd interfaces. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/example-hostapd.config2
-rw-r--r--tests/hwsim/test_ap_dynamic.py43
2 files changed, 44 insertions, 1 deletions
diff --git a/tests/hwsim/example-hostapd.config b/tests/hwsim/example-hostapd.config
index 40015fd..674386a 100644
--- a/tests/hwsim/example-hostapd.config
+++ b/tests/hwsim/example-hostapd.config
@@ -101,3 +101,5 @@ CONFIG_SUITEB=y
#LIBS_n += -fsanitize=undefined
#LIBS_c += -fsanitize=undefined
CONFIG_MBO=y
+
+CONFIG_IAPP=y
diff --git a/tests/hwsim/test_ap_dynamic.py b/tests/hwsim/test_ap_dynamic.py
index 5c4bbc2..33db463 100644
--- a/tests/hwsim/test_ap_dynamic.py
+++ b/tests/hwsim/test_ap_dynamic.py
@@ -13,7 +13,7 @@ import os
import hwsim_utils
import hostapd
-from utils import alloc_fail
+from utils import alloc_fail, require_under_vm
from test_ap_acs import force_prev_ap_on_24g
@remote_compatible
@@ -463,3 +463,44 @@ def test_ap_add_with_driver(dev, apdev):
dev[0].request("DISCONNECT")
dev[0].wait_disconnected()
hapd.disable()
+
+def test_ap_iapp(dev, apdev):
+ """IAPP and multiple BSSes"""
+ require_under_vm()
+ try:
+ _test_ap_iapp(dev, apdev)
+ finally:
+ subprocess.call(['ifconfig', 'br-multicast', 'down'],
+ stderr=open('/dev/null', 'w'))
+ subprocess.call(['brctl', 'delbr', 'br-multicast'],
+ stderr=open('/dev/null', 'w'))
+
+def _test_ap_iapp(dev, apdev):
+ br_ifname = 'br-multicast'
+ subprocess.call(['brctl', 'addbr', br_ifname])
+ subprocess.call(['brctl', 'setfd', br_ifname, '0'])
+ subprocess.call(['ip', 'addr', 'add', '10.174.65.206/31', 'dev', br_ifname])
+ subprocess.call(['ip', 'link', 'set', 'dev', br_ifname, 'up'])
+ subprocess.call(['ip', 'route', 'add', '224.0.0.0/4', 'dev', br_ifname])
+
+ params = { "ssid": "test-1",
+ "bridge": br_ifname,
+ "iapp_interface": br_ifname }
+ hapd = hostapd.add_ap(apdev[0], params)
+
+ dev[0].scan_for_bss(apdev[0]['bssid'], freq=2412)
+ dev[0].connect("test-1", key_mgmt="NONE", scan_freq="2412")
+ dev[1].connect("test-1", key_mgmt="NONE", scan_freq="2412")
+
+ hapd2 = hostapd.add_ap(apdev[1], params)
+ dev[0].scan_for_bss(apdev[1]['bssid'], freq=2412)
+ dev[0].roam(apdev[1]['bssid'])
+ dev[0].roam(apdev[0]['bssid'])
+
+ dev[0].request("DISCONNECT")
+ dev[1].request("DISCONNECT")
+ dev[0].wait_disconnected()
+ dev[1].wait_disconnected()
+
+ hapd.disable()
+ hapd2.disable()