Skip to content

Commit

Permalink
selftests, bpf: test_tc_tunnel.sh nc: Cannot use -p and -l
Browse files Browse the repository at this point in the history
When run test_tc_tunnel.sh, it complains following error

ipip
encap 192.168.1.1 to 192.168.1.2, type ipip, mac none len 100
test basic connectivity
nc: cannot use -p and -l

nc man page has:

     -l  Listen for an incoming connection rather than initiating
         a connection to a remote host.Cannot be used together with
         any of the options -psxz. Additionally, any timeouts specified
         with the -w option are ignored.

Correct nc in server_listen().

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20210719223022.66681-1-vincent.mc.li@gmail.com
  • Loading branch information
Vincent Li authored and Andrii Nakryiko committed Jul 20, 2021
1 parent c39aa21 commit 875fc31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/bpf/test_tc_tunnel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ cleanup() {
}

server_listen() {
ip netns exec "${ns2}" nc "${netcat_opt}" -l -p "${port}" > "${outfile}" &
ip netns exec "${ns2}" nc "${netcat_opt}" -l "${port}" > "${outfile}" &
server_pid=$!
sleep 0.2
}
Expand Down

0 comments on commit 875fc31

Please sign in to comment.