Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Lin <glin@suse.com>2019-11-06 17:49:33 +0800
committerGary Lin <glin@suse.com>2019-11-06 17:49:39 +0800
commitdeeacc37241013f145e3facd7496cd0e899029a5 (patch)
tree200b3f6ad9bf7b5ee1f85a052707f08aa5a9f3c4
parent74c76242007835135a8e217af334545890fde9f4 (diff)
selftests/bpf: Set rp_filter in test_flow_dissector
(bsc#1155518).
-rw-r--r--patches.suse/selftests-bpf-Set-rp_filter-in-test_flow_dissector.patch36
-rw-r--r--series.conf1
2 files changed, 37 insertions, 0 deletions
diff --git a/patches.suse/selftests-bpf-Set-rp_filter-in-test_flow_dissector.patch b/patches.suse/selftests-bpf-Set-rp_filter-in-test_flow_dissector.patch
new file mode 100644
index 0000000000..0d1b54930c
--- /dev/null
+++ b/patches.suse/selftests-bpf-Set-rp_filter-in-test_flow_dissector.patch
@@ -0,0 +1,36 @@
+From: Jiri Benc <jbenc@redhat.com>
+Date: Tue, 8 Oct 2019 15:10:44 +0200
+Subject: selftests/bpf: Set rp_filter in test_flow_dissector
+Patch-mainline: v5.4-rc4
+Git-commit: fd418b01fe26c2430b1091675cceb3ab2b52e1e0
+References: bsc#1155518
+
+Many distributions enable rp_filter. However, the flow dissector test
+generates packets that have 1.1.1.1 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")
+Signed-off-by: Jiri Benc <jbenc@redhat.com>
+Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
+Acked-by: Petar Penkov <ppenkov@google.com>
+Link: https://lore.kernel.org/bpf/513a298f53e99561d2f70b2e60e2858ea6cda754.1570539863.git.jbenc@redhat.com
+Acked-by: Gary Lin <glin@suse.com>
+---
+ tools/testing/selftests/bpf/test_flow_dissector.sh | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- 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
diff --git a/series.conf b/series.conf
index 0897a10d27..7b1980dcbd 100644
--- a/series.conf
+++ b/series.conf
@@ -2668,6 +2668,7 @@
patches.suse/net-silence-KCSAN-warnings-about-sk-sk_backlog.len-r.patch
patches.suse/rxrpc-Fix-possible-NULL-pointer-access-in-ICMP-handl.patch
patches.suse/xsk-Fix-crash-in-poll-when-device-does-not-support-n.patch
+ patches.suse/selftests-bpf-Set-rp_filter-in-test_flow_dissector.patch
patches.suse/tcp-add-rcu-protection-around-tp-fastopen_rsk.patch
patches.suse/tcp-annotate-tp-rcv_nxt-lockless-reads.patch
patches.suse/tcp-annotate-tp-copied_seq-lockless-reads.patch