Skip to content

Commit bcf7ddb

Browse files
dsaherndavem330
authored andcommitted
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7f9bf6e commit bcf7ddb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/testing/selftests/net/icmp_redirect.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ setup()
180180
;;
181181
r[12]) ip netns exec $ns sysctl -q -w net.ipv4.ip_forward=1
182182
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
183185

184186
ip netns exec $ns sysctl -q -w net.ipv6.conf.all.forwarding=1
185187
ip netns exec $ns sysctl -q -w net.ipv6.route.mtu_expires=10

0 commit comments

Comments
 (0)