summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests
diff options
context:
space:
mode:
authorJiri Benc <jbenc@redhat.com>2019-10-08 09:10:45 -0400
committerDaniel Borkmann <daniel@iogearbox.net>2019-10-08 17:59:22 -0400
commit106c35dda32f8b63f88cad7433f1b8bb0056958a (patch)
treed7c35cca7eea028642b2bf5de0d54bbdd52c76cd /tools/testing/selftests
parentfd418b01fe26c2430b1091675cceb3ab2b52e1e0 (diff)
selftests/bpf: More compatible nc options in test_lwt_ip_encap
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
Diffstat (limited to 'tools/testing/selftests')
-rwxr-xr-xtools/testing/selftests/bpf/test_lwt_ip_encap.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/testing/selftests/bpf/test_lwt_ip_encap.sh b/tools/testing/selftests/bpf/test_lwt_ip_encap.sh
index acf7a74f97cd..59ea56945e6c 100755
--- 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()
314 command -v nc >/dev/null 2>&1 || \ 314 command -v nc >/dev/null 2>&1 || \
315 { echo >&2 "nc is not available: skipping TSO tests"; return; } 315 { echo >&2 "nc is not available: skipping TSO tests"; return; }
316 316
317 # listen on IPv*_DST, capture TCP into $TMPFILE 317 # listen on port 9000, capture TCP into $TMPFILE
318 if [ "${PROTO}" == "IPv4" ] ; then 318 if [ "${PROTO}" == "IPv4" ] ; then
319 IP_DST=${IPv4_DST} 319 IP_DST=${IPv4_DST}
320 ip netns exec ${NS3} bash -c \ 320 ip netns exec ${NS3} bash -c \
321 "nc -4 -l -s ${IPv4_DST} -p 9000 > ${TMPFILE} &" 321 "nc -4 -l -p 9000 > ${TMPFILE} &"
322 elif [ "${PROTO}" == "IPv6" ] ; then 322 elif [ "${PROTO}" == "IPv6" ] ; then
323 IP_DST=${IPv6_DST} 323 IP_DST=${IPv6_DST}
324 ip netns exec ${NS3} bash -c \ 324 ip netns exec ${NS3} bash -c \
325 "nc -6 -l -s ${IPv6_DST} -p 9000 > ${TMPFILE} &" 325 "nc -6 -l -p 9000 > ${TMPFILE} &"
326 RET=$? 326 RET=$?
327 else 327 else
328 echo " test_gso: unknown PROTO: ${PROTO}" 328 echo " test_gso: unknown PROTO: ${PROTO}"