]> Gentwo Git Trees - linux/.git/commit
selftests: netfilter: query conntrack state to check for port clash resolution
authorFlorian Westphal <fw@strlen.de>
Thu, 2 Oct 2025 13:05:41 +0000 (15:05 +0200)
committerFlorian Westphal <fw@strlen.de>
Wed, 8 Oct 2025 11:17:31 +0000 (13:17 +0200)
commite84945bdc619ed4243ba4298dbb8ca2062026474
treeeb5932fc622ec8dd17eeb5b5e0c910ee85395fc8
parenta126ab6b26f107f4eb100c8c77e9f10b706f26e6
selftests: netfilter: query conntrack state to check for port clash resolution

Jakub reported this self test flaking occasionally (fails, but passes on
re-run) on debug kernels.

This is because the test checks for elapsed time to determine if both
connections were established in parallel.

Rework this to no longer depend on timing.
Use busywait helper to check that both sockets have moved to established
state and then query the conntrack engine for the two entries.

Reported-by: Jakub Kicinski <kuba@kernel.org>
Closes: https://lore.kernel.org/netfilter-devel/20250926163318.40d1a502@kernel.org/
Fixes: 117e149e26d1 ("selftests: netfilter: test nat source port clash resolution interaction with tcp early demux")
Signed-off-by: Florian Westphal <fw@strlen.de>
tools/testing/selftests/net/netfilter/nf_nat_edemux.sh