summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@kernel.org>2020-08-17 09:43:33 -0600
committerDavid S. Miller <davem@davemloft.net>2020-08-17 14:59:24 -0700
commitbcf7ddb0186d366f761f86196b480ea6dd2dc18c (patch)
tree2438b7e2f2a6a1d92a8528d7fb640d29789572a1 /tools
parent7f9bf6e82461b97ce43a912cb4a959c5a41367ac (diff)
downloadlinux-stable-bcf7ddb0186d366f761f86196b480ea6dd2dc18c.tar.gz
linux-stable-bcf7ddb0186d366f761f86196b480ea6dd2dc18c.tar.bz2
linux-stable-bcf7ddb0186d366f761f86196b480ea6dd2dc18c.zip
selftests: disable rp_filter for icmp_redirect.sh
h1 is initially configured to reach h2 via r1 rather than the more direct path through r2. If rp_filter is set and inherited for r2, forwarding fails since the source address of h1 is reachable from eth0 vs the packet coming to it via r1 and eth1. Since rp_filter setting affects the test, explicitly reset it. Signed-off-by: David Ahern <dsahern@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/net/icmp_redirect.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/icmp_redirect.sh b/tools/testing/selftests/net/icmp_redirect.sh
index 18c5de53558a..bf361f30d6ef 100755
--- a/tools/testing/selftests/net/icmp_redirect.sh
+++ b/tools/testing/selftests/net/icmp_redirect.sh
@@ -180,6 +180,8 @@ setup()
;;
r[12]) ip netns exec $ns sysctl -q -w net.ipv4.ip_forward=1
ip netns exec $ns sysctl -q -w net.ipv4.conf.all.send_redirects=1
+ ip netns exec $ns sysctl -q -w net.ipv4.conf.default.rp_filter=0
+ ip netns exec $ns sysctl -q -w net.ipv4.conf.all.rp_filter=0
ip netns exec $ns sysctl -q -w net.ipv6.conf.all.forwarding=1
ip netns exec $ns sysctl -q -w net.ipv6.route.mtu_expires=10