kselftest: add test for nfqueue induced conntrack race
authorFlorian Westphal <fw@strlen.de>
Wed, 18 Sep 2024 13:16:33 +0000 (15:16 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 26 Sep 2024 11:03:03 +0000 (13:03 +0200)
commite306e3739d9a35c89176281f9ff6c600fcc859a4
tree11cf1df247add626b615f9906a8fa9b5ecd26680
parent8af79d3edb5fd2dce35ea0a71595b6d4f9962350
kselftest: add test for nfqueue induced conntrack race

The netfilter race happens when two packets with the same tuple are DNATed
and enqueued with nfqueue in the postrouting hook.

Once one of the packet is reinjected it may be DNATed again to a different
destination, but the conntrack entry remains the same and the return packet
was dropped.

Based on earlier patch from Antonio Ojea.

Link: https://bugzilla.netfilter.org/show_bug.cgi?id=1766
Co-developed-by: Antonio Ojea <aojea@google.com>
Signed-off-by: Antonio Ojea <aojea@google.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tools/testing/selftests/net/netfilter/nft_queue.sh