mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-20 21:31:28 +02:00
BUG/MINOR: check: ensure check-reuse is compatible with SSL
SSL may be activated implicitely if a server relies on SSL, even without check-ssl keyword. This is performed by init_srv_check() function. The main operation is to change xprt layer for check to SSL. Prior to this patch, <use_ssl> check member was also set, despite not strictly necessary. This has a negative side-effect of rendering check-reuse-pool ineffective. Indeed, reuse on check is only performed if no specific check configuration has been specified (see tcpcheck_use_nondefault_connect()). This patch fixes check reuse with SSL : <use_ssl> is not set in case SSL is inherited implicitely from server configuration. Thus, <use_ssl> is now only set if an explicit check-ssl keyword is set, which disables connection reuse for check. This must be backported up to 3.2.
This commit is contained in:
parent
f32bc8f0a4
commit
6d3c3c7871
@ -1814,10 +1814,8 @@ int init_srv_check(struct server *srv)
|
||||
* specified.
|
||||
*/
|
||||
if (!srv->check.port && !is_addr(&srv->check.addr)) {
|
||||
if (!srv->check.use_ssl && srv->use_ssl != -1) {
|
||||
srv->check.use_ssl = srv->use_ssl;
|
||||
if (!srv->check.use_ssl && srv->use_ssl != -1)
|
||||
srv->check.xprt = srv->xprt;
|
||||
}
|
||||
else if (srv->check.use_ssl == 1)
|
||||
srv->check.xprt = xprt_get(XPRT_SSL);
|
||||
srv->check.send_proxy |= (srv->pp_opts);
|
||||
|
Loading…
x
Reference in New Issue
Block a user