]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mux-pt: Set EOS on error on sending path if read0 was received
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 13 Mar 2023 10:07:37 +0000 (11:07 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 13 Mar 2023 10:22:13 +0000 (11:22 +0100)
commite5d02c3d469159bea45ede1397196621f09a5aff
tree4153526215c201846e4fa875b26aa9724a089eba
parentfc0ad29c292eb07496d29fd4375ba010e876bbf2
BUG/MEDIUM: mux-pt: Set EOS on error on sending path if read0 was received

It is more a less a revert of the commit b65af26e1 ("MEDIUM: mux-pt: Don't
always set a final error on SE on the sending path"). The PT multiplexer is
so simple that an error on the sending path is terminal. Unlike other muxes,
there is no connection level here. However, instead of reporting an final
error by setting SE_FL_ERROR, we set SE_FL_EOS flag instead if a read0 was
received on the underlying connection. Concretely, it is always true with
the current design of the raw socket layer. But it is cleaner this way.

Without this patch, it is possible to block a TCP socket if a connection
error is triggered when data are sent (for instance a broken pipe) while the
upper stream does not expect to receive more data.

Note the patch above introduced a regression because errors handling at the
connection level is quite simple. All errors are final. But we must keep in
mind it may change. And if so, this will require to move back on a 2-step
errors handling in the mux-pt.

This patch must be backported to 2.7.
src/mux_pt.c