]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: mux-quic: differentiate failure on qc_stream_desc alloc
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 12 May 2023 14:19:32 +0000 (16:19 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 12 May 2023 14:26:20 +0000 (16:26 +0200)
commit6c501ed23bea953518059117e7dd19e8d6cb6bd8
treef82f267512859e980af0053f504c54b2e14a5afe
parent50fe00650f5a874a69a321ff371f8b2ee6f61403
BUG/MINOR: mux-quic: differentiate failure on qc_stream_desc alloc

qc_stream_buf_alloc() can fail for two reasons :
* limit of Tx buffer per connection reached
* allocation failure

The first case is properly treated. A flag QC_CF_CONN_FULL is set on the
connection to interrupt emission. It is cleared when a buffer became
available after in order ACK reception and the MUX tasklet is woken up.

The allocation failure was handled with the same mechanism which in this
case is not appropriate and could lead to a connection transfer freeze.
Instead, prefer to close the connection with a QUIC internal error code.

To differentiate the two causes, qc_stream_buf_alloc() API was changed
to return the number of available buffers to the caller.

This must be backported up to 2.6.
include/haproxy/quic_stream.h
src/mux_quic.c
src/quic_stream.c