diff mbox series

[net-next] selftests: set conf.all.rp_filter=0 in bareudp.sh

Message ID f2d459346471f163b239aa9d63ce3e2ba9c62895.1605107012.git.gnault@redhat.com (mailing list archive)
State Accepted
Commit e865802357086b36632acf3e629f726f089a6769
Delegated to: Netdev Maintainers
Headers show
Series [net-next] selftests: set conf.all.rp_filter=0 in bareudp.sh | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net-next
netdev/subject_prefix success Link
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link
netdev/stable success Stable not CCed

Commit Message

Guillaume Nault Nov. 11, 2020, 3:05 p.m. UTC
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>
---
 tools/testing/selftests/net/bareudp.sh | 2 ++
 1 file changed, 2 insertions(+)

Comments

patchwork-bot+netdevbpf@kernel.org Nov. 13, 2020, 12:20 a.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Wed, 11 Nov 2020 16:05:35 +0100 you wrote:
> 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>
> 
> [...]

Here is the summary with links:
  - [net-next] selftests: set conf.all.rp_filter=0 in bareudp.sh
    https://git.kernel.org/netdev/net-next/c/e86580235708

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

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
 }