From 5c25c5a35cbd27911d233efd01efcb9be35c85af Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Wed, 2 Aug 2023 17:47:14 +0200 Subject: 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 --- tests/shell/testcases/nft-f/dumps/0017ct_timeout_obj_0.nft | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/shell/testcases/nft-f/dumps/0017ct_timeout_obj_0.nft') diff --git a/tests/shell/testcases/nft-f/dumps/0017ct_timeout_obj_0.nft b/tests/shell/testcases/nft-f/dumps/0017ct_timeout_obj_0.nft index 7cff1ed5..c5d9649e 100644 --- a/tests/shell/testcases/nft-f/dumps/0017ct_timeout_obj_0.nft +++ b/tests/shell/testcases/nft-f/dumps/0017ct_timeout_obj_0.nft @@ -2,7 +2,7 @@ table ip filter { ct timeout cttime { protocol tcp l3proto ip - policy = { established : 123, close : 12 } + policy = { established : 2m3s, close : 12s } } chain c { -- cgit v1.2.3