diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-02-28 16:23:25 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-02-28 16:48:22 +0100 |
commit | 2b41e3c411f5367ee4da5153147c2586e71dfa9d (patch) | |
tree | 201eb5dba8f5cb309991684b34bdc3847127c7b1 /include/parser.h | |
parent | ddb962604cda323f15589f3b424c4618db7494de (diff) |
src: add last statement
This new statement allows you to know how long ago there was a matching
packet.
# nft list ruleset
table ip x {
chain y {
[...]
ip protocol icmp last used 49m54s884ms counter packets 1 bytes 64
}
}
if this statement never sees a packet, then the listing says:
ip protocol icmp last used never counter packets 0 bytes 0
Add tests/py in this patch too.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/parser.h')
-rw-r--r-- | include/parser.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/parser.h b/include/parser.h index 71df4309..f79a22f3 100644 --- a/include/parser.h +++ b/include/parser.h @@ -42,6 +42,7 @@ enum startcond_type { PARSER_SC_IGMP, PARSER_SC_IP, PARSER_SC_IP6, + PARSER_SC_LAST, PARSER_SC_LIMIT, PARSER_SC_META, PARSER_SC_POLICY, |