diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2022-06-10 12:32:45 +1000 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2022-06-18 09:05:06 +0200 |
commit | 41c02e10db8bc0f4e89ec9e5bd23cf39162f5f68 (patch) | |
tree | 72840e547df6a1a3a351125c0a9a9667e40017bf /test/demo/pasta | |
parent | e48373382f7c84175a0f61890e8f0164cdd2d329 (diff) | |
download | passt-41c02e10db8bc0f4e89ec9e5bd23cf39162f5f68.tar passt-41c02e10db8bc0f4e89ec9e5bd23cf39162f5f68.tar.gz passt-41c02e10db8bc0f4e89ec9e5bd23cf39162f5f68.tar.bz2 passt-41c02e10db8bc0f4e89ec9e5bd23cf39162f5f68.tar.lz passt-41c02e10db8bc0f4e89ec9e5bd23cf39162f5f68.tar.xz passt-41c02e10db8bc0f4e89ec9e5bd23cf39162f5f68.tar.zst passt-41c02e10db8bc0f4e89ec9e5bd23cf39162f5f68.zip |
tests: Use nmap-ncat instead of openbsd netcat for pasta tests
A number of the testcases use options specific the OpenBSD version of
netcat. That's available in Debian, but not easily available in Fedora.
Switch the pasta tests to using the nmap version of netcat (a.k.a. ncat).
This is easily available in both Debian and Fedora, and appears to be a
bit more modern and maintained as well.
ncat generally requires explicit listen addresses (which is good for
clarity anywhere). Its default options appear to remove the need for the
-N and -q options.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
[sbrivio: changed one ncat listening address to IPv6 loopback]
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/demo/pasta')
-rw-r--r-- | test/demo/pasta | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/demo/pasta b/test/demo/pasta index e2517ed..754b320 100644 --- a/test/demo/pasta +++ b/test/demo/pasta @@ -100,9 +100,9 @@ nl say pasta detects bound ports and forwards them. sleep 3 -nsb nc -6 -l -p 31337 +nsb ncat -6 -l ::1 31337 sleep 2 -host echo "Hello from the host" | nc -N ::1 31337 +host echo "Hello from the host" | ncat ::1 31337 sleep 5 nl @@ -111,9 +111,9 @@ say Now the other way around... nl say we can use a loopback address sleep 2 -hostb nc -l -p 31337 +hostb ncat -l ::1 31337 sleep 2 -ns echo "Hello from the namespace" | nc -N 127.0.0.1 31337 +ns echo "Hello from the namespace" | ncat ::1 31337 sleep 5 nl @@ -121,9 +121,9 @@ say or the address of the default gateway. sleep 2 nsout GW ip -j -4 route show|jq -rM '.[] | select(.dst == "default").gateway' sleep 5 -hostb nc -l -p 31337 +hostb ncat -l 0.0.0.0 31337 sleep 2 -ns echo "Hello from the namespace" | nc -N __GW__ 31337 +ns echo "Hello from the namespace" | ncat __GW__ 31337 sleep 3 nl |