summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMarco Leogrande <leogrande@google.com>2024-12-02 12:45:30 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-21 13:49:06 +0100
commit054e5c4ded023d40549a3ffce492eef5c66881e5 (patch)
tree7d2b0fa543c5f592768f8faf3602a40352d1fd0e /tools
parentef3929a80a0412fc5ed698efb753b07cdfcc4c12 (diff)
downloadlinux-054e5c4ded023d40549a3ffce492eef5c66881e5.tar.gz
linux-054e5c4ded023d40549a3ffce492eef5c66881e5.tar.bz2
linux-054e5c4ded023d40549a3ffce492eef5c66881e5.zip
tools/testing/selftests/bpf/test_tc_tunnel.sh: Fix wait for server bind
[ Upstream commit e2f0791124a1b6ca8d570110cbd487969d9d41ef ] Commit f803bcf9208a ("selftests/bpf: Prevent client connect before server bind in test_tc_tunnel.sh") added code that waits for the netcat server to start before the netcat client attempts to connect to it. However, not all calls to 'server_listen' were guarded. This patch adds the existing 'wait_for_port' guard after the remaining call to 'server_listen'. Fixes: f803bcf9208a ("selftests/bpf: Prevent client connect before server bind in test_tc_tunnel.sh") Signed-off-by: Marco Leogrande <leogrande@google.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Link: https://lore.kernel.org/r/20241202204530.1143448-1-leogrande@google.com Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/bpf/test_tc_tunnel.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/test_tc_tunnel.sh b/tools/testing/selftests/bpf/test_tc_tunnel.sh
index 365a2c7a89ba..8766e88b5a40 100755
--- a/tools/testing/selftests/bpf/test_tc_tunnel.sh
+++ b/tools/testing/selftests/bpf/test_tc_tunnel.sh
@@ -296,6 +296,7 @@ else
client_connect
verify_data
server_listen
+ wait_for_port ${port} ${netcat_opt}
fi
# bpf_skb_net_shrink does not take tunnel flags yet, cannot update L3.