selftests: netfilter: nft_nat.sh: add test for reverse clash with nat
authorFlorian Westphal <fw@strlen.de>
Fri, 30 May 2025 10:34:03 +0000 (12:34 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 5 Jun 2025 08:50:05 +0000 (10:50 +0200)
commit3c3c3248496a3a1848ec5d923f2eee0edf60226e
tree759e1a6544983e4be3aea2a01cd22e0332119cec
parent50d9ce9679dd50df2dc51ada717fa875bc248fad
selftests: netfilter: nft_nat.sh: add test for reverse clash with nat

This will fail without the previous bug fix because we erronously
believe that the clashing entry went way.

However, the clash exists in the opposite direction due to an
existing nat mapping:
 PASS: IP statless for ns2-LgTIuS
 ERROR: failed to test udp ns1-x4iyOW to ns2-LgTIuS with dnat rule step 2, result: ""

This is partially adapted from test instructions from the below
ubuntu tracker.

Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2109889
Signed-off-by: Florian Westphal <fw@strlen.de>
Tested-by: Shaun Brady <brady.1345@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tools/testing/selftests/net/netfilter/nft_nat.sh