BPF Archive on lore.kernel.org
 help / color / Atom feed
From: Jiri Benc <jbenc@redhat.com>
To: bpf@vger.kernel.org, netdev@vger.kernel.org
Cc: Petar Penkov <ppenkov@google.com>
Subject: [PATCH bpf 1/2] selftests/bpf: set rp_filter in test_flow_dissector
Date: Tue,  8 Oct 2019 15:10:44 +0200
Message-ID: <513a298f53e99561d2f70b2e60e2858ea6cda754.1570539863.git.jbenc@redhat.com> (raw)
In-Reply-To: <cover.1570539863.git.jbenc@redhat.com>

Many distributions enable rp_filter. However, the flow dissector test
generates packets that have set as (inner) source address without
this address being reachable. This causes the selftest to fail.

The selftests should not assume a particular initial configuration. Switch
off rp_filter.

Fixes: 50b3ed57dee9 ("selftests/bpf: test bpf flow dissection")
Cc: Petar Penkov <ppenkov@google.com>
Signed-off-by: Jiri Benc <jbenc@redhat.com>
 tools/testing/selftests/bpf/test_flow_dissector.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/testing/selftests/bpf/test_flow_dissector.sh b/tools/testing/selftests/bpf/test_flow_dissector.sh
index d23d4da66b83..e2d06191bd35 100755
--- a/tools/testing/selftests/bpf/test_flow_dissector.sh
+++ b/tools/testing/selftests/bpf/test_flow_dissector.sh
@@ -63,6 +63,9 @@ fi
 # Setup
 tc qdisc add dev lo ingress
+echo 0 > /proc/sys/net/ipv4/conf/default/rp_filter
+echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
+echo 0 > /proc/sys/net/ipv4/conf/lo/rp_filter
 echo "Testing IPv4..."
 # Drops all IP/UDP packets coming from port 9

  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-08 13:10 [PATCH bpf 0/2] selftests/bpf: fix false failures Jiri Benc
2019-10-08 13:10 ` Jiri Benc [this message]
2019-10-08 16:45   ` [PATCH bpf 1/2] selftests/bpf: set rp_filter in test_flow_dissector Petar Penkov
2019-10-08 13:10 ` [PATCH bpf 2/2] selftests/bpf: more compatible nc options in test_lwt_ip_encap Jiri Benc
2019-10-08 22:03 ` [PATCH bpf 0/2] selftests/bpf: fix false failures Daniel Borkmann

Reply instructions:

You may reply publically 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 \
    --in-reply-to=513a298f53e99561d2f70b2e60e2858ea6cda754.1570539863.git.jbenc@redhat.com \
    --to=jbenc@redhat.com \
    --cc=bpf@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=ppenkov@google.com \


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

BPF Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/bpf/0 bpf/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 bpf bpf/ https://lore.kernel.org/bpf \
	public-inbox-index bpf

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git