BUG/MEDIUM: servers: Make assign_tproxy_address work when ALPN is set.
If an ALPN is set on the server line, then when we reach assign_tproxy_address, the stream_interface's endpoint will be a connection, not a conn_stream, so make sure assign_tproxy_address() handles both cases. This should be backported to 1.9.
This commit is contained in:
parent
b07e7b4dc1
commit
09a0f03994
|
@ -1021,7 +1021,12 @@ static void assign_tproxy_address(struct stream *s)
|
||||||
struct server *srv = objt_server(s->target);
|
struct server *srv = objt_server(s->target);
|
||||||
struct conn_src *src;
|
struct conn_src *src;
|
||||||
struct connection *cli_conn;
|
struct connection *cli_conn;
|
||||||
struct connection *srv_conn = cs_conn(objt_cs(s->si[1].end));
|
struct connection *srv_conn;
|
||||||
|
|
||||||
|
if (objt_cs(s->si[1].end))
|
||||||
|
srv_conn = cs_conn(__objt_cs(s->si[1].end));
|
||||||
|
else
|
||||||
|
srv_conn = objt_conn(s->si[1].end);
|
||||||
|
|
||||||
if (srv && srv->conn_src.opts & CO_SRC_BIND)
|
if (srv && srv->conn_src.opts & CO_SRC_BIND)
|
||||||
src = &srv->conn_src;
|
src = &srv->conn_src;
|
||||||
|
|
Loading…
Reference in New Issue