]> git.ipfire.org Git - thirdparty/nftables.git/commit
parser: allow ct timeouts to use time_spec values
authorFlorian Westphal <fw@strlen.de>
Wed, 2 Aug 2023 15:47:14 +0000 (17:47 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 2 Nov 2023 10:56:20 +0000 (11:56 +0100)
commit647d0434abbad86037cc477adfb30d817f80b171
tree21a3e5a3e67e9f622e7d3382cff1d5b22566914a
parent20b3b94b57d71708312a22450d6d9ea0f97afc5c
parser: allow ct timeouts to use time_spec values

commit 5c25c5a35cbd27911d233efd01efcb9be35c85af upstream.

For some reason the parser only allows raw numbers (seconds)
for ct timeouts, e.g.

ct timeout ttcp {
protocol tcp;
policy = { syn_sent : 3, ...

Also permit time_spec, e.g. "established : 5d".
Print the nicer time formats on output, but retain
raw numbers support on input for compatibility.

Signed-off-by: Florian Westphal <fw@strlen.de>
doc/stateful-objects.txt
src/parser_bison.y
src/rule.c
tests/shell/testcases/listing/0013objects_0
tests/shell/testcases/nft-f/dumps/0017ct_timeout_obj_0.nft