]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: ADD_MAC/DEL_MAC special cases
authorJouni Malinen <j@w1.fi>
Sun, 7 Mar 2021 10:11:56 +0000 (12:11 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 7 Mar 2021 10:11:56 +0000 (12:11 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_ap_params.py

index 5e9650b344c4e555e25da736e83fd3fc3e7c69f5..5da861593948fbf127b903b53b7d8925594d75ee 100644 (file)
@@ -201,7 +201,13 @@ def test_ap_acl_mgmt(dev, apdev):
     if "01:01:01:01:01:01 VLAN_ID=0" not in deny:
         raise Exception("Missing deny entry")
 
+    if "OK" not in hapd.request("ACCEPT_ACL DEL_MAC 22:33:44:55:66:77"):
+        raise Exception("DEL_MAC with empty list failed")
+    if "FAIL" not in hapd.request("ACCEPT_ACL ADD_MAC 22:33:44:55:66"):
+        raise Exception("ADD_MAC with invalid MAC address accepted")
     hapd.request("ACCEPT_ACL ADD_MAC 22:33:44:55:66:77")
+    if "FAIL" not in hapd.request("ACCEPT_ACL DEL_MAC 22:33:44:55:66"):
+        raise Exception("DEL_MAC with invalid MAC address accepted")
     hapd.request("DENY_ACL ADD_MAC 22:33:44:55:66:88 VLAN_ID=2")
 
     accept = hapd.request("ACCEPT_ACL SHOW").splitlines()