From: Christopher Faulet Date: Mon, 27 Apr 2020 10:06:55 +0000 (+0200) Subject: BUG/MINOR: checks: Only use ssl_sock_is_ssl() if compiled with SSL support X-Git-Tag: v2.2-dev7~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f73f5cc11f18012fdb976b969af262b22c82522b;p=thirdparty%2Fhaproxy.git BUG/MINOR: checks: Only use ssl_sock_is_ssl() if compiled with SSL support ssl_sock_is_ssl() only exists if HAProxy is complied with SSL support. No backport needed. --- diff --git a/src/checks.c b/src/checks.c index efc9ce2295..414c39e421 100644 --- a/src/checks.c +++ b/src/checks.c @@ -2511,8 +2511,11 @@ static int tcpcheck_main(struct check *check) } else if (rule->action == TCPCHK_ACT_CONNECT) { const char *msg = ((rule->connect.options & TCPCHK_OPT_IMPLICIT) ? NULL : "(tcp-check)"); - enum healthcheck_status status = ((conn && ssl_sock_is_ssl(conn)) ? HCHK_STATUS_L6OK : HCHK_STATUS_L4OK); - + enum healthcheck_status status = HCHK_STATUS_L4OK; +#ifdef USE_OPENSSL + if (conn && ssl_sock_is_ssl(conn)) + status = HCHK_STATUS_L6OK; +#endif set_server_check_status(check, status, msg); } }