From 57e328e805ae54b14dc8059fd71a456b01c5ea3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Thu, 25 Jun 2020 09:52:54 +0200 Subject: [PATCH] Fix logic error in setting client port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We need to do this after we possibly added the proxy. Signed-off-by: Manuel Pégourié-Gonnard --- tests/ssl-opt.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index 8046eb71c..83123afda 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -477,13 +477,6 @@ run_test() { CLI_EXPECT="$3" shift 3 - # fix client port - if [ -n "$PXY_CMD" ]; then - CLI_CMD=$( echo "$CLI_CMD" | sed s/+SRV_PORT/$PXY_PORT/g ) - else - CLI_CMD=$( echo "$CLI_CMD" | sed s/+SRV_PORT/$SRV_PORT/g ) - fi - # update DTLS variable detect_dtls "$SRV_CMD" @@ -493,6 +486,13 @@ run_test() { PXY_CMD="$P_PXY" fi + # fix client port + if [ -n "$PXY_CMD" ]; then + CLI_CMD=$( echo "$CLI_CMD" | sed s/+SRV_PORT/$PXY_PORT/g ) + else + CLI_CMD=$( echo "$CLI_CMD" | sed s/+SRV_PORT/$SRV_PORT/g ) + fi + # prepend valgrind to our commands if active if [ "$MEMCHECK" -gt 0 ]; then if is_polar "$SRV_CMD"; then