summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGuillaume Nault <gnault@redhat.com>2020-11-11 16:05:35 +0100
committerJakub Kicinski <kuba@kernel.org>2020-11-12 16:14:38 -0800
commite865802357086b36632acf3e629f726f089a6769 (patch)
treec160465420100181152b4f7d8ee32d535753a102 /tools
parente7086213f7b479c3d08835fb0f2395479dfb6883 (diff)
downloadlinux-e865802357086b36632acf3e629f726f089a6769.tar.bz2
selftests: set conf.all.rp_filter=0 in bareudp.sh
When working on the rp_filter problem, I didn't realise that disabling it on the network devices didn't cover all cases: rp_filter could also be enabled globally in the namespace, in which case it would drop packets, even if the net device has rp_filter=0. Fixes: 1ccd58331f6f ("selftests: disable rp_filter when testing bareudp") Fixes: bbbc7aa45eef ("selftests: add test script for bareudp tunnels") Signed-off-by: Guillaume Nault <gnault@redhat.com> Link: https://lore.kernel.org/r/f2d459346471f163b239aa9d63ce3e2ba9c62895.1605107012.git.gnault@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/net/bareudp.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/bareudp.sh b/tools/testing/selftests/net/bareudp.sh
index c2b9e990e544..f366cadbc5e8 100755
--- a/tools/testing/selftests/net/bareudp.sh
+++ b/tools/testing/selftests/net/bareudp.sh
@@ -238,6 +238,8 @@ setup_overlay_ipv4()
# 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.all.rp_filter=0
+ ip netns exec "${NS2}" sysctl -qw net.ipv4.conf.all.rp_filter=0
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
}