mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-24 15:21:29 +02:00
BUG/MEDIUM: checks: Don't try to set ALPN if connection failed.
If we failed to connect, don't attempt to set the ALPN, as we don't have a SSL context, anyway. This should be backported to 1.9.
This commit is contained in:
parent
26da323cb9
commit
a48437bb5e
12
src/checks.c
12
src/checks.c
@ -1641,11 +1641,13 @@ static int connect_conn_chk(struct task *t)
|
||||
|
||||
|
||||
#ifdef USE_OPENSSL
|
||||
if (s->check.sni)
|
||||
ssl_sock_set_servername(conn, s->check.sni);
|
||||
if (s->check.alpn_str)
|
||||
ssl_sock_set_alpn(conn, (unsigned char *)s->check.alpn_str,
|
||||
s->check.alpn_len);
|
||||
if (ret == SF_ERR_NONE) {
|
||||
if (s->check.sni)
|
||||
ssl_sock_set_servername(conn, s->check.sni);
|
||||
if (s->check.alpn_str)
|
||||
ssl_sock_set_alpn(conn, (unsigned char *)s->check.alpn_str,
|
||||
s->check.alpn_len);
|
||||
}
|
||||
#endif
|
||||
if (s->check.send_proxy && !(check->state & CHK_ST_AGENT)) {
|
||||
conn->send_proxy_ofs = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user