]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Open AP and TDLS prohibited
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 28 Oct 2016 21:25:17 +0000 (00:25 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 28 Oct 2016 21:28:17 +0000 (00:28 +0300)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_ap_tdls.py

index 5b6ee9ccac7b9eeb835ba7e06997a60a55291a5c..4964deebe037e7f7cb9646bbf6e63df06967aeec 100644 (file)
@@ -553,3 +553,19 @@ def test_ap_tdls_link_status(dev, apdev):
     check_tdls_link(dev[0], dev[1], connected=False)
     if "FAIL" not in dev[0].request("TDLS_LINK_STATUS foo"):
         raise Exception("Unexpected TDLS_LINK_STATUS response for invalid argument")
+
+def test_ap_tdls_prohibit(dev, apdev):
+    """Open AP and TDLS prohibited"""
+    hapd = hostapd.add_ap(apdev[0], { "ssid": "test-open",
+                                      "tdls_prohibit": "1" })
+    connect_2sta_open(dev, hapd)
+    if "FAIL" not in dev[0].request("TDLS_SETUP " + dev[1].own_addr()):
+        raise Exception("TDLS_SETUP accepted unexpectedly")
+
+def test_ap_tdls_chan_switch_prohibit(dev, apdev):
+    """Open AP and TDLS channel switch prohibited"""
+    hapd = hostapd.add_ap(apdev[0], { "ssid": "test-open",
+                                      "tdls_prohibit_chan_switch": "1" })
+    wlantest_setup(hapd)
+    connect_2sta_open(dev, hapd)
+    setup_tdls(dev[0], dev[1], hapd)