diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index b4e033a5e..364ab544c 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -665,13 +665,6 @@ run_test() { return 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 - # update DTLS variable detect_dtls "$SRV_CMD" @@ -681,6 +674,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