Commit 1ccd5833 authored by Guillaume Nault's avatar Guillaume Nault Committed by Jakub Kicinski

selftests: disable rp_filter when testing bareudp

Some systems have rp_filter=1 as default configuration. This breaks
bareudp.sh as the intermediate namespaces handle part of the routing
with regular IPv4 routes but the reverse path is done with tc
(flower/tunnel_key/mirred).
Signed-off-by: default avatarGuillaume Nault <gnault@redhat.com>
Link: https://lore.kernel.org/r/28140b7d20161e4f766b558018fe2718f9bc1117.1604767577.git.gnault@redhat.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 8be33ecf
...@@ -234,6 +234,12 @@ setup_overlay_ipv4() ...@@ -234,6 +234,12 @@ setup_overlay_ipv4()
ip netns exec "${NS2}" sysctl -qw net.ipv4.ip_forward=1 ip netns exec "${NS2}" sysctl -qw net.ipv4.ip_forward=1
ip -netns "${NS1}" route add 192.0.2.100/32 via 192.0.2.10 ip -netns "${NS1}" route add 192.0.2.100/32 via 192.0.2.10
ip -netns "${NS2}" route add 192.0.2.103/32 via 192.0.2.33 ip -netns "${NS2}" route add 192.0.2.103/32 via 192.0.2.33
# The intermediate namespaces don't have routes for the reverse path,
# as it will be handled by tc. So we need to ensure that rp_filter is
# not going to block the traffic.
ip netns exec "${NS1}" sysctl -qw net.ipv4.conf.default.rp_filter=0
ip netns exec "${NS2}" sysctl -qw net.ipv4.conf.default.rp_filter=0
} }
setup_overlay_ipv6() setup_overlay_ipv6()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment