client: replace allow/deny parser

Use the new cmdparse function for parsing the (cmd)allow/deny commands
and refactor the code a bit to reduce the number of functions needed for
all the (cmd)allow/deny(all) combinations.
This commit is contained in:
Miroslav Lichvar
2021-09-22 17:06:38 +02:00
parent f5fe5452f6
commit 5e6f8458ff
2 changed files with 18 additions and 188 deletions

View File

@@ -399,6 +399,10 @@ noclientlog"
commands=(
"add server nosuchnode.net1.clk" "^Invalid host/IP address$"
"allow nosuchnode.net1.clk" "^Could not read address$"
"allow 192.168.123.0/2 4" "^Could not read address$"
"allow 192.168.123.0/2e" "^Could not read address$"
"allow 192.168.12e" "^Could not read address$"
"allow 192.168123" "^Could not read address$"
"allow 192.168.123.2/33" "^507 Bad subnet$"
"clients" "Hostname.*519 Client logging is not active in the daemon$"
"delete 192.168.123.2" "^503 No such source$"