diff options
author | Florian Westphal <fw@strlen.de> | 2023-08-02 17:47:14 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2023-08-03 13:06:19 +0200 |
commit | 5c25c5a35cbd27911d233efd01efcb9be35c85af (patch) | |
tree | 8aa679c74461357dec26e930ee476b86d24668c3 /tests | |
parent | a8260c056a69aaca33d6604079ebac3d07d2551c (diff) |
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>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/shell/testcases/listing/0013objects_0 | 2 | ||||
-rw-r--r-- | tests/shell/testcases/nft-f/dumps/0017ct_timeout_obj_0.nft | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/shell/testcases/listing/0013objects_0 b/tests/shell/testcases/listing/0013objects_0 index 4d39143d..c81b94e2 100755 --- a/tests/shell/testcases/listing/0013objects_0 +++ b/tests/shell/testcases/listing/0013objects_0 @@ -15,7 +15,7 @@ EXPECTED="table ip test { ct timeout cttime { protocol udp l3proto ip - policy = { unreplied : 15, replied : 12 } + policy = { unreplied : 15s, replied : 12s } } ct expectation ctexpect { 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 { |