All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf] selftests/bpf: More compatible nc options in test_tc_edt
@ 2019-10-18 12:00 Jiri Benc
  2019-10-18 18:51 ` Peter Oskolkov
  2019-10-18 20:35 ` Daniel Borkmann
  0 siblings, 2 replies; 3+ messages in thread
From: Jiri Benc @ 2019-10-18 12:00 UTC (permalink / raw)
  To: bpf, netdev; +Cc: Peter Oskolkov

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: 7df5e3db8f63 ("selftests: bpf: tc-bpf flow shaping with EDT")
Cc: Peter Oskolkov <posk@google.com>
Signed-off-by: Jiri Benc <jbenc@redhat.com>
---
 tools/testing/selftests/bpf/test_tc_edt.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/bpf/test_tc_edt.sh b/tools/testing/selftests/bpf/test_tc_edt.sh
index f38567ef694b..daa7d1b8d309 100755
--- a/tools/testing/selftests/bpf/test_tc_edt.sh
+++ b/tools/testing/selftests/bpf/test_tc_edt.sh
@@ -59,7 +59,7 @@ ip netns exec ${NS_SRC} tc filter add dev veth_src egress \
 
 # start the listener
 ip netns exec ${NS_DST} bash -c \
-	"nc -4 -l -s ${IP_DST} -p 9000 >/dev/null &"
+	"nc -4 -l -p 9000 >/dev/null &"
 declare -i NC_PID=$!
 sleep 1
 
-- 
2.18.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf] selftests/bpf: More compatible nc options in test_tc_edt
  2019-10-18 12:00 [PATCH bpf] selftests/bpf: More compatible nc options in test_tc_edt Jiri Benc
@ 2019-10-18 18:51 ` Peter Oskolkov
  2019-10-18 20:35 ` Daniel Borkmann
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Oskolkov @ 2019-10-18 18:51 UTC (permalink / raw)
  To: Jiri Benc; +Cc: bpf, linux-netdev, Peter Oskolkov

On Fri, Oct 18, 2019 at 5:00 AM Jiri Benc <jbenc@redhat.com> wrote:
>
> 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: 7df5e3db8f63 ("selftests: bpf: tc-bpf flow shaping with EDT")
> Cc: Peter Oskolkov <posk@google.com>
> Signed-off-by: Jiri Benc <jbenc@redhat.com>
> ---
>  tools/testing/selftests/bpf/test_tc_edt.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/test_tc_edt.sh b/tools/testing/selftests/bpf/test_tc_edt.sh
> index f38567ef694b..daa7d1b8d309 100755
> --- a/tools/testing/selftests/bpf/test_tc_edt.sh
> +++ b/tools/testing/selftests/bpf/test_tc_edt.sh
> @@ -59,7 +59,7 @@ ip netns exec ${NS_SRC} tc filter add dev veth_src egress \
>
>  # start the listener
>  ip netns exec ${NS_DST} bash -c \
> -       "nc -4 -l -s ${IP_DST} -p 9000 >/dev/null &"
> +       "nc -4 -l -p 9000 >/dev/null &"

The test passes with the regular linux/debian nc. If it passes will the rest,

Acked-by: Peter Oskolkov <posk@google.com>

>  declare -i NC_PID=$!
>  sleep 1
>
> --
> 2.18.1
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf] selftests/bpf: More compatible nc options in test_tc_edt
  2019-10-18 12:00 [PATCH bpf] selftests/bpf: More compatible nc options in test_tc_edt Jiri Benc
  2019-10-18 18:51 ` Peter Oskolkov
@ 2019-10-18 20:35 ` Daniel Borkmann
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Borkmann @ 2019-10-18 20:35 UTC (permalink / raw)
  To: Jiri Benc; +Cc: bpf, netdev, Peter Oskolkov

On Fri, Oct 18, 2019 at 02:00:42PM +0200, Jiri Benc wrote:
> 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: 7df5e3db8f63 ("selftests: bpf: tc-bpf flow shaping with EDT")
> Cc: Peter Oskolkov <posk@google.com>
> Signed-off-by: Jiri Benc <jbenc@redhat.com>

Applied, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-18 20:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-18 12:00 [PATCH bpf] selftests/bpf: More compatible nc options in test_tc_edt Jiri Benc
2019-10-18 18:51 ` Peter Oskolkov
2019-10-18 20:35 ` Daniel Borkmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.