mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 06:11:32 +02:00
BUG/MEDIUM: streams: Move the conn_stream allocation outside #IF USE_OPENSSL.
When commit 477902bd2e8c1e978ad43d22dba1f28525bb797a made the conn_stream allocation unconditional, it unfortunately moved the code doing the allocation inside #if USE_OPENSSL, which means anybody compiling haproxy without openssl wouldn't allocate any conn_stream, and would get a segfault later. Fix that by moving the code that does the allocation outside #if USE_OPENSSL.
This commit is contained in:
parent
99ac8a1aa4
commit
ecffb7d841
@ -1386,13 +1386,13 @@ int connect_server(struct stream *s)
|
||||
else
|
||||
return SF_ERR_INTERNAL; /* how did we get there ? */
|
||||
|
||||
#if defined(USE_OPENSSL) && defined(TLSEXT_TYPE_application_layer_protocol_negotiation)
|
||||
srv_cs = si_alloc_cs(&s->si[1], srv_conn);
|
||||
if (!srv_cs) {
|
||||
conn_free(srv_conn);
|
||||
return SF_ERR_RESOURCE;
|
||||
}
|
||||
srv_conn->ctx = srv_cs;
|
||||
#if defined(USE_OPENSSL) && defined(TLSEXT_TYPE_application_layer_protocol_negotiation)
|
||||
if (!srv ||
|
||||
((!(srv->ssl_ctx.alpn_str) && !(srv->ssl_ctx.npn_str)) ||
|
||||
srv->mux_proto || s->be->mode != PR_MODE_HTTP))
|
||||
|
Loading…
x
Reference in New Issue
Block a user