From b385b4765decb2c9628eb48c694438ce9be84aa9 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 7 Mar 2021 12:11:56 +0200 Subject: [PATCH] tests: ADD_MAC/DEL_MAC special cases Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_params.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/hwsim/test_ap_params.py b/tests/hwsim/test_ap_params.py index 5e9650b34..5da861593 100644 --- a/tests/hwsim/test_ap_params.py +++ b/tests/hwsim/test_ap_params.py @@ -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()