mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-27 13:28:32 +00:00
BUG/MINOR: tcp-check: use the server's service port as a fallback
When running tcp-check scripts, one must ensure we can establish a tcp connection first. When doing this action, HAProxy needs a TCP port configured either on the server or on the check itself or on the connect rule itself. For some reasons, the connect code did not evaluate the service port on the server structure... this patch fixes this error. Backport status: 1.8
This commit is contained in:
parent
248f1173f2
commit
2f3a56b4ff
@ -2757,6 +2757,8 @@ static int tcpcheck_main(struct check *check)
|
||||
set_host_port(&conn->addr.to, check->current_step->port);
|
||||
else if (check->port)
|
||||
set_host_port(&conn->addr.to, check->port);
|
||||
else if (s->svc_port)
|
||||
set_host_port(&conn->addr.to, s->svc_port);
|
||||
|
||||
if (check->current_step->conn_opts & TCPCHK_OPT_SSL) {
|
||||
xprt = xprt_get(XPRT_SSL);
|
||||
|
Loading…
Reference in New Issue
Block a user