Skip to contentSkip to conversation

selftests: netfilter: add a vrf+conntrack testcase

PATCH Applied Florian Westphal 2 participants 2 messages Oct 18, 2021 – Nov 8, 2021

Subsystems (2)
lore
Share & tools
lore

Florian Westphal

author maintainer
#0 lore raw

PATCH 1/1 selftests: netfilter: add a vrf+conntrack testcase

Rework the reproducer for the vrf+conntrack regression reported by Eugene into a selftest and also add a test for ip masquerading that Lahav fixed recently.

With net or net-next tree, the first test fails and the latter two pass.

With 09e856d54bda5f28 ("vrf: Reset skb conntrack connection on VRF rcv") reverted first test passes but the last two fail.

A proper fix needs more work, for time being a revert seems to be the best choice, snat/masquerade did not work before the fix.

---
Lahav, it would be nice if you could check if this is a correct test of the scenario that you fixed with 09e856d54bda5f28. Thanks!

 tools/testing/selftests/netfilter/Makefile    |   3 +-
 .../selftests/netfilter/conntrack_vrf.sh      | 219 ++++++++++++++++++
 2 files changed, 221 insertions(+), 1 deletion(-)
 create mode 100755 tools/testing/selftests/netfilter/conntrack_vrf.sh
tools/testing/selftests/netfilter/Makefile +2 -1
index 8748199ac109..ffca314897c4 100644
@@ -5,7 +5,8 @@ TEST_PROGS := nft_trans_stress.sh nft_fib.sh nft_nat.sh bridge_brouter.sh \
 	conntrack_icmp_related.sh nft_flowtable.sh ipvs.sh \
 	nft_concat_range.sh nft_conntrack_helper.sh \
 	nft_queue.sh nft_meta.sh nf_nat_edemux.sh \
-	ipip-conntrack-mtu.sh conntrack_tcp_unreplied.sh
+	ipip-conntrack-mtu.sh conntrack_tcp_unreplied.sh \
+	conntrack_vrf.sh
 
 LDLIBS = -lmnl
 TEST_GEN_FILES =  nf-queue
tools/testing/selftests/netfilter/conntrack_vrf.sh new file +219 -0

219 lines not on this page · raw message

Signature · 1 line
2.32.0
maintainer Applied
#1 lore raw
Quoted 4 lines · Florian Westphal

Rework the reproducer for the vrf+conntrack regression reported by Eugene into a selftest and also add a test for ip masquerading that Lahav fixed recently.

Quoted 8 lines

With net or net-next tree, the first test fails and the latter two pass.

With 09e856d54bda5f28 ("vrf: Reset skb conntrack connection on VRF rcv") reverted first test passes but the last two fail.

A proper fix needs more work, for time being a revert seems to be the best choice, snat/masquerade did not work before the fix.

Applied, thanks.

Quoted 8 lines

---
Lahav, it would be nice if you could check if this is a correct test of the scenario that you fixed with 09e856d54bda5f28. Thanks!

No news from Lahav.