diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-12-08 20:29:23 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-12-08 20:33:20 +0100 |
commit | fd314278115255ccee23ab6cffb2b0a033238fbb (patch) | |
tree | 01ba1961ee433bb0bc45ef21ff5a13a134d1f489 /tests/shell/testcases | |
parent | 8eca0308c44127f3b4335c50b96ce8c4d2e041bd (diff) |
tests: shell: timeouts later than 23 days
Test timeout later than 23 days in set definitions and dynamic set
insertions.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/shell/testcases')
-rwxr-xr-x | tests/shell/testcases/sets/0058_setupdate_timeout_0 | 17 | ||||
-rw-r--r-- | tests/shell/testcases/sets/dumps/0058_setupdate_timeout_0.nft | 12 |
2 files changed, 29 insertions, 0 deletions
diff --git a/tests/shell/testcases/sets/0058_setupdate_timeout_0 b/tests/shell/testcases/sets/0058_setupdate_timeout_0 new file mode 100755 index 00000000..52a658e1 --- /dev/null +++ b/tests/shell/testcases/sets/0058_setupdate_timeout_0 @@ -0,0 +1,17 @@ +#!/bin/bash + +RULESET="table inet filter { + set ssh_meter { + type ipv4_addr + size 65535 + flags dynamic,timeout + timeout 30d + } + + chain test { + add @ssh_meter { ip saddr timeout 30d } + } +}" + +set -e +$NFT -f - <<< $RULESET diff --git a/tests/shell/testcases/sets/dumps/0058_setupdate_timeout_0.nft b/tests/shell/testcases/sets/dumps/0058_setupdate_timeout_0.nft new file mode 100644 index 00000000..873adc63 --- /dev/null +++ b/tests/shell/testcases/sets/dumps/0058_setupdate_timeout_0.nft @@ -0,0 +1,12 @@ +table inet filter { + set ssh_meter { + type ipv4_addr + size 65535 + flags dynamic,timeout + timeout 30d + } + + chain test { + add @ssh_meter { ip saddr timeout 30d } + } +} |