]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: connection: Always get the stream when available to send PP2 line
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 26 May 2020 14:08:49 +0000 (16:08 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 26 May 2020 15:39:39 +0000 (17:39 +0200)
commitd82056c319814f9328db07dd50ab90785ec6c95c
tree5b6778ed12d78cfe34e1c3237e9a0030b66e6544
parent3ab504f5ff53968ae70d592cba4c1c7da6a0e7ff
BUG/MINOR: connection: Always get the stream when available to send PP2 line

When a PROXY protocol line must be sent, it is important to always get the
stream if it exists. It is mandatory to send an unique ID when the unique-id
option is enabled. In conn_si_send_proxy(), to get the stream, we first retrieve
the conn-stream attached to the backend connection. Then if the conn-stream data
callback is si_conn_cb, it is possible to get the stream. But for now, it only
works for connections with a multiplexer. Thus, for mux-less connections, the
unique ID is never sent. This happens for all SSL connections relying on the
alpn to choose the good multiplexer. But it is possible to use the context of
such connections to get the conn-stream.

The bug was introduced by the commit cf6e0c8a8 ("MEDIUM: proxy_protocol: Support
sending unique IDs using PPv2"). Thus, this patch must be backported to the same
versions as the commit above.
src/stream_interface.c