]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: quic: report closing state for the MUX
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 6 Apr 2022 08:28:43 +0000 (10:28 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 7 Apr 2022 08:37:45 +0000 (10:37 +0200)
commitb515b0af1d1bebda0def3028c213bd874f131c0d
treeef4ab71a7fb262ebc53fe92b58a28764e69c9035
parentfe035eca3a24ea0f031fdcdad23809bea5de32e4
MEDIUM: quic: report closing state for the MUX

Define a new API to notify the MUX from the quic-conn when the
connection is about to be closed. This happens in the following cases :
- on idle timeout
- on CONNECTION_CLOSE emission or reception

The MUX wake callback is called on these conditions. The quic-conn
QUIC_FL_NOTIFY_CLOSE is set to only report once. On the MUX side,
connection flags CO_FL_SOCK_RD_SH|CO_FL_SOCK_WR_SH are set to interrupt
future emission/reception.

This patch is the counterpart to
  "MEDIUM: mux-quic: report CO_FL_ERROR on send".
Now the quic-conn is able to report its closing, which may be translated
by the MUX into a CO_FL_ERROR on the connection for the upper layer.
This allows the MUX to properly react to the QUIC closing mechanism for
both idle-timeout and closing/draining states.
include/haproxy/xprt_quic-t.h
include/haproxy/xprt_quic.h
src/mux_quic.c
src/xprt_quic.c