]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests: netfilter: add conntrack clash resolution test case
authorFlorian Westphal <fw@strlen.de>
Fri, 27 Jun 2025 14:27:51 +0000 (16:27 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 14 Jul 2025 13:21:33 +0000 (15:21 +0200)
commit78a58836358783995884784cb20021db6f6a29df
tree6f6c71de479c9e7d29135ac274cc5cbf1663c36d
parentb08590559f4b6954f1bf2510445aba346044c91b
selftests: netfilter: add conntrack clash resolution test case

Add a dedicated test to exercise conntrack clash resolution path.
Test program emits 128 identical udp packets in parallel, then reads
back replies from socat echo server.

Also check (via conntrack -S) that the clash path was hit at least once.
Due to the racy nature of the test its possible that despite the
threaded program all packets were processed in-order or on same cpu,
emit a SKIP warning in this case.

Two tests are added:
 - one to test the simpler, non-nat case
 - one to exercise clash resolution where packets
   might have different nat transformations attached to them.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tools/testing/selftests/net/netfilter/.gitignore
tools/testing/selftests/net/netfilter/Makefile
tools/testing/selftests/net/netfilter/conntrack_clash.sh [new file with mode: 0755]
tools/testing/selftests/net/netfilter/udpclash.c [new file with mode: 0644]