Skip to contentSkip to conversation

tests: shell: flush connlimit sets

PATCH New Pablo Neira Ayuso 1 participant 1 message Nov 21, 2023 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 tests: shell: flush connlimit sets

Restored elements via set declaration are removed almost inmediately by GC, this is causing spurious failures in test runs.

Flush sets to ensure dump is always consistent. Still, cover that restoring a set with connlimit elements do not.

Fixes 95d348d55a9e ("tests: shell: extend connlimit test")
---
 tests/shell/testcases/sets/0062set_connlimit_0           | 3 +++
 tests/shell/testcases/sets/dumps/0062set_connlimit_0.nft | 2 --
 2 files changed, 3 insertions(+), 2 deletions(-)
tests/shell/testcases/sets/0062set_connlimit_0 +3 -0
index 48d589fe68cc..dab1da061795 100755
@@ -24,3 +24,6 @@ RULESET="table ip x {
 }"
 
 $NFT -f - <<< $RULESET
+
+$NFT flush set ip x est-connlimit
+$NFT flush set ip x new-connlimit
tests/shell/testcases/sets/dumps/0062set_connlimit_0.nft +0 -2
index 080d675c3ac7..13bbb953d8c2 100644
@@ -3,7 +3,6 @@ table ip x {
 		type ipv4_addr
 		size 65535
 		flags dynamic
-		elements = { 84.245.120.167 ct count over 20 }
 	}
 
 	set new-connlimit {
@@ -11,6 +10,5 @@ table ip x {
 		size 65535
 		flags dynamic
 		ct count over 20
-		elements = { 84.245.120.167 ct count over 20 }
 	}
 }
Signature · 1 line
2.30.2