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
commit19d2eb75aff297bb26ed806f71bfa5a1e6667bbb (patch)
tree4dd80453f1357caa134e5d28ca5c8fbdea38ffdf
parentdeeacc37241013f145e3facd7496cd0e899029a5 (diff)
selftests/bpf: More compatible nc options in test_lwt_ip_encap
(bsc#1155518).
-rw-r--r--patches.suse/selftests-bpf-More-compatible-nc-options-in-test_lwt.patch41
-rw-r--r--series.conf1
2 files changed, 42 insertions, 0 deletions
diff --git a/patches.suse/selftests-bpf-More-compatible-nc-options-in-test_lwt.patch b/patches.suse/selftests-bpf-More-compatible-nc-options-in-test_lwt.patch
new file mode 100644
index 0000000000..b0214d8103
--- /dev/null
+++ b/patches.suse/selftests-bpf-More-compatible-nc-options-in-test_lwt.patch
@@ -0,0 +1,41 @@
+From: Jiri Benc <jbenc@redhat.com>
+Date: Tue, 8 Oct 2019 15:10:45 +0200
+Subject: selftests/bpf: More compatible nc options in test_lwt_ip_encap
+Patch-mainline: v5.4-rc4
+Git-commit: 106c35dda32f8b63f88cad7433f1b8bb0056958a
+References: bsc#1155518
+
+Out of the three nc implementations widely in use, at least two (BSD netcat
+and nmap-ncat) do not support -l combined with -s. Modify the nc invocation
+to be accepted by all of them.
+
+Fixes: 17a90a788473 ("selftests/bpf: test that GSO works in lwt_ip_encap")
+Signed-off-by: Jiri Benc <jbenc@redhat.com>
+Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
+Link: https://lore.kernel.org/bpf/9f177682c387f3f943bb64d849e6c6774df3c5b4.1570539863.git.jbenc@redhat.com
+Acked-by: Gary Lin <glin@suse.com>
+---
+ tools/testing/selftests/bpf/test_lwt_ip_encap.sh | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/tools/testing/selftests/bpf/test_lwt_ip_encap.sh
++++ b/tools/testing/selftests/bpf/test_lwt_ip_encap.sh
+@@ -314,15 +314,15 @@ test_gso()
+ command -v nc >/dev/null 2>&1 || \
+ { echo >&2 "nc is not available: skipping TSO tests"; return; }
+
+- # listen on IPv*_DST, capture TCP into $TMPFILE
++ # listen on port 9000, capture TCP into $TMPFILE
+ if [ "${PROTO}" == "IPv4" ] ; then
+ IP_DST=${IPv4_DST}
+ ip netns exec ${NS3} bash -c \
+- "nc -4 -l -s ${IPv4_DST} -p 9000 > ${TMPFILE} &"
++ "nc -4 -l -p 9000 > ${TMPFILE} &"
+ elif [ "${PROTO}" == "IPv6" ] ; then
+ IP_DST=${IPv6_DST}
+ ip netns exec ${NS3} bash -c \
+- "nc -6 -l -s ${IPv6_DST} -p 9000 > ${TMPFILE} &"
++ "nc -6 -l -p 9000 > ${TMPFILE} &"
+ RET=$?
+ else
+ echo " test_gso: unknown PROTO: ${PROTO}"
diff --git a/series.conf b/series.conf
index 7b1980dcbd..9a78ebeac7 100644
--- a/series.conf
+++ b/series.conf
@@ -2669,6 +2669,7 @@
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/selftests-bpf-More-compatible-nc-options-in-test_lwt.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