Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

David Ahern and committed by
David S. Miller
bcf7ddb0 7f9bf6e8

+2
+2
tools/testing/selftests/net/icmp_redirect.sh
··· 180 180 ;; 181 181 r[12]) ip netns exec $ns sysctl -q -w net.ipv4.ip_forward=1 182 182 ip netns exec $ns sysctl -q -w net.ipv4.conf.all.send_redirects=1 183 + ip netns exec $ns sysctl -q -w net.ipv4.conf.default.rp_filter=0 184 + ip netns exec $ns sysctl -q -w net.ipv4.conf.all.rp_filter=0 183 185 184 186 ip netns exec $ns sysctl -q -w net.ipv6.conf.all.forwarding=1 185 187 ip netns exec $ns sysctl -q -w net.ipv6.route.mtu_expires=10