BUG/MINOR: h3: properly handle alloc failure on finalize
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 15 Dec 2023 16:32:06 +0000 (17:32 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 2 Jan 2024 07:28:03 +0000 (08:28 +0100)
commitf50133bf30b1a3973f1b9f892786a7b19dca8aac
tree64650dfb570062aba9c9aa0b2a1b3385198c180b
parent939ce57672246d91ae9d9897a6d3e491b808394b
BUG/MINOR: h3: properly handle alloc failure on finalize

If H3 control stream Tx buffer cannot be allocated, return a proper
errur through h3_finalize(). This will cause the emission of a
CONNECTION_CLOSE with error H3_INTERNAL_ERROR and closure of the whole
connection.

This should be backported up to 2.6. Note that 2.9 has some difference
which will cause conflict. The main one is that qcc_get_stream_txbuf()
does not exist in this version. Instead the check in h3_control_send()
should be made after mux_get_buf(). Finally, it may be useful to first
pick previous commit (MINOR: h3: add traces for connection init stage)
to improve context similarity.

(cherry picked from commit 7a3602a1f55dacda5a669865e04474f5d503bab7)
[cf: H3_EV_TX_FRAME removed from trace messages because it does not exist]
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/h3.c