]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: mux-quic: do not free conn if attached streams
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 27 Jul 2022 09:39:01 +0000 (11:39 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 1 Aug 2022 12:23:19 +0000 (14:23 +0200)
commit09ec3e09bd6bf6ab83199ef3ddc7e20b69d99f02
treebea161b1263105cfbfa9d0b47df0df891fcda78d
parent4ea5090f55c65b19e31c3cd5b823e609b808dad8
BUG/MINOR: mux-quic: do not free conn if attached streams

Ensure via qcc_is_dead() that a connection is not released instance
until all of qcs streams are detached by the upper layer, even if an
error has been reported or the timeout has fired.

On the other side, as qc_detach() always check the connection status,
this should ensure that we do not keep a connection if not necessary.

Without this patch, a qcc instance may be freed with some of its qcs
streams not detached. This is an incorrect behavior and will lead to a
BUG_ON fault. Note however that no occurence of this bug has been
produced currently. This patch is mainly a safety against future
occurences.

This should be backported up to 2.6.
src/mux_quic.c