summaryrefslogtreecommitdiffstats
path: root/src/scanner.l
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2022-10-14 23:19:22 +0200
committerPhil Sutter <phil@nwl.cc>2023-01-18 14:58:48 +0100
commit1694df2de79f39c5037f82601e02226022b2e38f (patch)
tree57c6b99a1c7de8a414b5693e86cd6cf36816fd42 /src/scanner.l
parentce04d25b4a116ef04f27d0b71994f61a24114d6d (diff)
Implement 'reset rule' and 'reset rules' commands
Reset rule counters and quotas in kernel, i.e. without having to reload them. Requires respective kernel patch to support NFT_MSG_GETRULE_RESET message type. Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'src/scanner.l')
-rw-r--r--src/scanner.l1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/scanner.l b/src/scanner.l
index 9c85ee37..aa0a0a9f 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -402,6 +402,7 @@ addrstring ({macaddr}|{ip4addr}|{ip6addr})
<SCANSTATE_CMD_LIST,SCANSTATE_CMD_RESET>{
"counters" { return COUNTERS; }
"quotas" { return QUOTAS; }
+ "rules" { return RULES; }
}
"log" { scanner_push_start_cond(yyscanner, SCANSTATE_STMT_LOG); return LOG; }