Browse Source

tests: ctrl_iface invalid MAC address

Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen 11 years ago
parent
commit
2f35bc649b
2 changed files with 20 additions and 1 deletions
  1. 1 1
      tests/hwsim/test_ap_wps.py
  2. 19 0
      tests/hwsim/test_wpas_ctrl.py

+ 1 - 1
tests/hwsim/test_ap_wps.py

@@ -264,7 +264,7 @@ def test_ap_wps_twice(dev, apdev):
     logger.info("WPS provisioning step")
     hapd.request("WPS_PBC")
     dev[0].dump_monitor()
-    dev[0].request("WPS_PBC")
+    dev[0].request("WPS_PBC any")
     ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=30)
     if ev is None:
         raise Exception("Association with the AP timed out")

+ 19 - 0
tests/hwsim/test_wpas_ctrl.py

@@ -347,6 +347,25 @@ def test_wpas_ctrl_tdls_discover(dev):
     if "FAIL" not in dev[0].request("TDLS_DISCOVER 00:11:22:33:44:55"):
         raise Exception("Unexpected success on TDLS_DISCOVER")
 
+def test_wpas_ctrl_addr(dev):
+    """wpa_supplicant ctrl_iface invalid address"""
+    if "FAIL" not in dev[0].request("TDLS_SETUP "):
+        raise Exception("Unexpected success on invalid TDLS_SETUP")
+    if "FAIL" not in dev[0].request("TDLS_TEARDOWN "):
+        raise Exception("Unexpected success on invalid TDLS_TEARDOWN")
+    if "FAIL" not in dev[0].request("FT_DS "):
+        raise Exception("Unexpected success on invalid FT_DS")
+    if "FAIL" not in dev[0].request("WPS_PBC 00:11:22:33:44"):
+        raise Exception("Unexpected success on invalid WPS_PBC")
+    if "FAIL" not in dev[0].request("WPS_PIN 00:11:22:33:44"):
+        raise Exception("Unexpected success on invalid WPS_PIN")
+    if "FAIL" not in dev[0].request("WPS_NFC 00:11:22:33:44"):
+        raise Exception("Unexpected success on invalid WPS_NFC")
+    if "FAIL" not in dev[0].request("WPS_REG 12345670 00:11:22:33:44"):
+        raise Exception("Unexpected success on invalid WPS_REG")
+    if "FAIL" not in dev[0].request("IBSS_RSN 00:11:22:33:44"):
+        raise Exception("Unexpected success on invalid IBSS_RSN")
+
 def test_wpas_ctrl_config_parser(dev):
     """wpa_supplicant ctrl_iface SET config parser"""
     if "FAIL" not in dev[0].request("SET pbc_in_m1 qwerty"):