BUG/MEDIUM: stconn: Block zero-copy forwarding if EOS/ERROR on consumer side
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 11 Dec 2023 12:56:15 +0000 (13:56 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 14 Dec 2023 08:58:22 +0000 (09:58 +0100)
commit37ec5d7501fedcaf09dcba6f5e681faf874cc9df
treebd503eefc72a522cb4f239111e6a6105c4029501
parent85282ca56491e7514a7a04c019f1f795b0a86af6
BUG/MEDIUM: stconn: Block zero-copy forwarding if EOS/ERROR on consumer side

When the producer side (h1 for now) negociates with the consumer side to
perform a zero-copy forwarding, we now consider the consumer side as blocked
if it is closed and this was reported to the SE via a end-of-stream or a
(pending) error.

It is performed before calling ->nego_ff callback function, in se_nego_ff().
This way, all consumer are concerned automatically. The aim of this patch is
to fix an issue with the QUIC mux. Indeed, it is unexpected to send a frame
on an closed stream. This triggers a BUG_ON(). Other muxes are not affected
but it remains useless to try to send data if the stream is closed.

This patch should fix the issue #2372. It must be backported to 2.9.

(cherry picked from commit 2421c6fa7db5b06109a88bffa411c8ba8f948384)
Signed-off-by: Willy Tarreau <w@1wt.eu>
include/haproxy/stconn.h