]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests: netfilter: Stabilize rpath.sh
authorPhil Sutter <phil@nwl.cc>
Fri, 6 Dec 2024 14:08:40 +0000 (15:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Dec 2024 17:13:18 +0000 (18:13 +0100)
commitbaf9d7f5a75f64607fd68c04e0f5887ec8db5e96
treef652e8213a4590f6eacdb17ac72c4521af59053f
parentc3a2fb308678ddca879f800007171556e1736d09
selftests: netfilter: Stabilize rpath.sh

[ Upstream commit d92906fd1b940681b4509f7bb8ae737789fb4695 ]

On some systems, neighbor discoveries from ns1 for fec0:42::1 (i.e., the
martian trap address) would happen at the wrong time and cause
false-negative test result.

Problem analysis also discovered that IPv6 martian ping test was broken
in that sent neighbor discoveries, not echo requests were inadvertently
trapped

Avoid the race condition by introducing the neighbors to each other
upfront. Also pin down the firewall rules to matching on echo requests
only.

Fixes: efb056e5f1f0 ("netfilter: ip6t_rpfilter: Fix regression with VRF interfaces")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/net/netfilter/rpath.sh