]> git.baikalelectronics.ru Git - kernel.git/commitdiff
selftests: netfilter: Fix nft_fib.sh for all.rp_filter=1
authorPhil Sutter <phil@nwl.cc>
Wed, 5 Oct 2022 15:34:36 +0000 (17:34 +0200)
committerFlorian Westphal <fw@strlen.de>
Wed, 12 Oct 2022 12:08:15 +0000 (14:08 +0200)
If net.ipv4.conf.all.rp_filter is set, it overrides the per-interface
setting and thus defeats the fix from aa1e4da7c6fc5 ("selftests:
netfilter: disable rp_filter on router"). Unset it as well to cover that
case.

Fixes: aa1e4da7c6fc5 ("selftests: netfilter: disable rp_filter on router")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Florian Westphal <fw@strlen.de>
tools/testing/selftests/netfilter/nft_fib.sh

index fd76b69635a44c878b44810972b29df7d4644d89..dff476e45e772701be6a3f54c78eb0681c3baddb 100755 (executable)
@@ -188,6 +188,7 @@ test_ping() {
 ip netns exec ${nsrouter} sysctl net.ipv6.conf.all.forwarding=1 > /dev/null
 ip netns exec ${nsrouter} sysctl net.ipv4.conf.veth0.forwarding=1 > /dev/null
 ip netns exec ${nsrouter} sysctl net.ipv4.conf.veth1.forwarding=1 > /dev/null
+ip netns exec ${nsrouter} sysctl net.ipv4.conf.all.rp_filter=0 > /dev/null
 ip netns exec ${nsrouter} sysctl net.ipv4.conf.veth0.rp_filter=0 > /dev/null
 
 sleep 3