Skip to content

Commit

Permalink
selftests: disable rp_filter for icmp_redirect.sh
Browse files Browse the repository at this point in the history
[ Upstream commit bcf7ddb ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
dsahern authored and gregkh committed Sep 3, 2020
1 parent 9570661 commit a8d2614
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/testing/selftests/net/icmp_redirect.sh
Expand Up @@ -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
Expand Down

0 comments on commit a8d2614

Please sign in to comment.