Skip to contentSkip to conversation

selftests: netfilter: add test case for conntrack helper assignment

PATCH Applied Florian Westphal 2 participants 2 messages Jun 22, 2020 – Jun 24, 2020

Subsystems (2)
lore
Share & tools
lore

Florian Westphal

author maintainer
#0 lore raw

PATCH 1/1 selftests: netfilter: add test case for conntrack helper assignment

check that 'nft ... ct helper set <foo>' works:
1. configure ftp helper via nft and assign it to connections on port 2121
2. check with 'conntrack -L' that the next connection has the ftp helper attached to it.

Also add a test for auto-assign (old behaviour).

---
 tools/testing/selftests/netfilter/Makefile    |   2 +-
 .../netfilter/nft_conntrack_helper.sh         | 175 ++++++++++++++++++
 2 files changed, 176 insertions(+), 1 deletion(-)
 create mode 100755 tools/testing/selftests/netfilter/nft_conntrack_helper.sh
tools/testing/selftests/netfilter/Makefile +1 -1
index 9c0f758310fe..a179f0dca8ce 100644
@@ -3,7 +3,7 @@
 
 TEST_PROGS := nft_trans_stress.sh nft_nat.sh bridge_brouter.sh \
 	conntrack_icmp_related.sh nft_flowtable.sh ipvs.sh \
-	nft_concat_range.sh \
+	nft_concat_range.sh nft_conntrack_helper.sh \
 	nft_queue.sh
 
 LDLIBS = -lmnl
tools/testing/selftests/netfilter/nft_conntrack_helper.sh new file +175 -0

175 lines not on this page · raw message

Signature · 1 line
2.26.2
maintainer Applied
#1 lore raw
Quoted 7 lines · Florian Westphal

check that 'nft ... ct helper set <foo>' works:
1. configure ftp helper via nft and assign it to connections on port 2121
2. check with 'conntrack -L' that the next connection has the ftp helper attached to it.

Also add a test for auto-assign (old behaviour).

Applied, thanks.