]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux-quic: set both EOI EOS for stream fin
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 24 May 2023 08:48:52 +0000 (10:48 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 24 May 2023 12:23:22 +0000 (14:23 +0200)
A recent review was done to rationalize ERR/EOS/EOI flags on stream
endpoint. A common definition for both H1/H2/QUIC mux have been written
in the following documentation :
 ./doc/internals/stconn-close.txt

Always set EOS with EOI flag to conform to this specification. EOI is
set whenever the proper stream end has been encountered : with QUIC it
corresponds to a STREAM frame with FIN bit. At this step, RESET_STREAM
frames are ignored by QUIC MUX as allowed by RFC 9000. This means we can
always set EOS at the same time with EOI.

This should be backported up to 2.7.

src/mux_quic.c

index 24a5279187837bfe3127203de37e469d903ef013..ed1d6a360ea65a9388860fb593538bfd0aeb6493 100644 (file)
@@ -682,7 +682,7 @@ struct stconn *qc_attach_sc(struct qcs *qcs, struct buffer *buf, char fin)
 
        if (fin) {
                TRACE_STATE("report end-of-input", QMUX_EV_STRM_RECV, qcc->conn, qcs);
-               se_fl_set(qcs->sd, SE_FL_EOI);
+               se_fl_set(qcs->sd, SE_FL_EOI|SE_FL_EOS);
        }
 
        return qcs->sd->sc;
@@ -2726,7 +2726,7 @@ static size_t qc_recv_buf(struct stconn *sc, struct buffer *buf,
                /* Set end-of-input when full message properly received. */
                if (fin) {
                        TRACE_STATE("report end-of-input", QMUX_EV_STRM_RECV, qcc->conn, qcs);
-                       se_fl_set(qcs->sd, SE_FL_EOI);
+                       se_fl_set(qcs->sd, SE_FL_EOI|SE_FL_EOS);
 
                        /* If request EOM is reported to the upper layer, it means the
                         * QCS now expects data from the opposite side.