]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mux-quic: wakeup tasklet to close on error
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 9 May 2023 16:20:45 +0000 (18:20 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 9 May 2023 16:42:34 +0000 (18:42 +0200)
commitda24bcfad3051749c56a6bbc16ea362d7a47915d
treec67c8d1f33a87ac5f37eb62a23414f3b26d7115e
parent58721f2192e0ff2cf8c2cd84cddd83d4de717314
BUG/MEDIUM: mux-quic: wakeup tasklet to close on error

A recent series of commit have been introduced to rework error
generation on QUIC MUX side. Now, all MUX/APP functions uses
qcc_set_error() to set the flag QC_CF_ERRL on error. Then, this flag is
converted to QC_CF_ERRL_DONE with a CONNECTION_CLOSE emission by
qc_send().

This has the advantage of centralizing the CONNECTION_CLOSE generation
in one place and reduces the link between MUX and quic-conn layer.
However, we must now ensure that every qcc_set_error() call is followed
by a QUIC MUX tasklet to invoke qc_send(). This was not the case, thus
when there is no active transfer, no CONNECTION_CLOSE frame is emitted
and the connection remains opened.

To fix this, add a tasklet_wakeup() directly in qcc_set_error(). This is
a brute force solution as this may be unneeded when already in the MUX
tasklet context. However, it is the simplest solution as it is too
tedious for the moment to list all qcc_set_error() invocation outside of
the tasklet.

This must be backported up to 2.7.
src/mux_quic.c