Skip to contentSkip to conversation

tests: shell: extend connlimit test

PATCH New Pablo Neira Ayuso 1 participant 1 message Jun 10, 2021 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 tests: shell: extend connlimit test

Extend existing test to add a ct count expression in the set definition.

This test cover the upstream kernel fix ad9f151e560b ("netfilter:
nf_tables: initialize set before expression setup").

---
 tests/shell/testcases/sets/0062set_connlimit_0 | 12 ++++++++++++
 1 file changed, 12 insertions(+)
tests/shell/testcases/sets/0062set_connlimit_0 +12 -0
index 4f95f3835f83..48d589fe68cc 100755
@@ -12,3 +12,15 @@ RULESET="table ip x {
 }"
 
 $NFT -f - <<< $RULESET
+
+RULESET="table ip x {
+	set new-connlimit {
+		type ipv4_addr
+		size 65535
+		flags dynamic
+		ct count over 20
+		elements = { 84.245.120.167 }
+	}
+}"
+
+$NFT -f - <<< $RULESET
Signature · 1 line
2.30.2