]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: connection: Be sure to always install a mux for sync connect
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 29 Jul 2020 20:42:27 +0000 (22:42 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 30 Jul 2020 07:31:09 +0000 (09:31 +0200)
commit3f5bcd0c9677307a56726205689725f5388c0f1c
tree49abd63bc4d66711ebeabdc948a2b74ae98c385b
parent8f587ea34726c9d3e4529c8f9b3b10d832df5d4a
BUG/MEDIUM: connection: Be sure to always install a mux for sync connect

Sometime, a server connection may be performed synchronously. Most of time on
TCP socket, it does not happen. It is easier to have sync connect with unix
socket. When it happens, if we are not waiting for any hanshake completion, we
must be sure to have a mux installed before leaving the connect_server()
function because an attempt to send may be done before the I/O connection
handler have a chance to be executed to install the mux, if not already done.

For now, It is not expected to perform a send with no mux installed, leading to
a crash if it happens.

This patch should fix the issue #762 and probably #779 too. It must be
backported as far as 1.9.
src/backend.c