]> 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)
committerFlorian Westphal <fw@strlen.de>
Thu, 3 Aug 2023 11:06:19 +0000 (13:06 +0200)
commit5c25c5a35cbd27911d233efd01efcb9be35c85af
tree8aa679c74461357dec26e930ee476b86d24668c3
parenta8260c056a69aaca33d6604079ebac3d07d2551c
parser: allow ct timeouts to use time_spec values

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