Netdev Archive on
help / color / mirror / Atom feed
From: David Ahern <>
Cc: David Ahern <>
Subject: [PATCH net-next] selftests: disable rp_filter for
Date: Mon, 17 Aug 2020 09:43:33 -0600	[thread overview]
Message-ID: <> (raw)

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 <>
 tools/testing/selftests/net/ | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/testing/selftests/net/ b/tools/testing/selftests/net/
index 18c5de53558a..bf361f30d6ef 100755
--- a/tools/testing/selftests/net/
+++ b/tools/testing/selftests/net/
@@ -180,6 +180,8 @@ setup()
 		r[12]) ip netns exec $ns sysctl -q -w net.ipv4.ip_forward=1
 		       ip netns exec $ns sysctl -q -w net.ipv4.conf.all.send_redirects=1
+		       ip netns exec $ns sysctl -q -w net.ipv4.conf.default.rp_filter=0
+		       ip netns exec $ns sysctl -q -w net.ipv4.conf.all.rp_filter=0
 		       ip netns exec $ns sysctl -q -w net.ipv6.conf.all.forwarding=1
 		       ip netns exec $ns sysctl -q -w net.ipv6.route.mtu_expires=10

             reply	other threads:[~2020-08-17 15:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-17 15:43 David Ahern [this message]
2020-08-17 22:00 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \
    --subject='Re: [PATCH net-next] selftests: disable rp_filter for' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).