]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: Do not request h3 clients to close its unidirection streams
authorFrédéric Lécaille <flecaille@haproxy.com>
Fri, 20 Jan 2023 14:33:50 +0000 (15:33 +0100)
committerFrédéric Lécaille <flecaille@haproxy.com>
Fri, 20 Jan 2023 14:49:52 +0000 (15:49 +0100)
It is forbidden to request h3 clients to close its Control and QPACK unidirection
streams. If not, the client closes the connection with H3_CLOSED_CRITICAL_STREAM(0x104).
Perhaps this could prevent some clients as Chrome to come back for a while.

But at quic_conn level there is no mean to identify the streams for which we cannot
send STOP_SENDING frame. Such a possibility is even not mentionned in RFC 9000.
At this time there is no choice than stopping sending STOP_SENDING frames for
all the h3 unidirectional streams inspecting the ->app_opps quic_conn value.

Must be backported to 2.7 and 2.6.

src/quic_conn.c

index d4a9c18f5d25bd24b6c2833063929d07f61a074c..795c1ab924453891df31d3825ae1baa7073c1a3b 100644 (file)
@@ -2836,6 +2836,17 @@ static int qc_parse_pkt_frms(struct quic_conn *qc, struct quic_rx_packet *pkt,
                                }
                                else {
                                        TRACE_DEVEL("No mux for new stream", QUIC_EV_CONN_PRSHPKT, qc);
+                                       if (qc->app_ops == &h3_ops && quic_stream_is_uni(stream->id)) {
+                                               /* Do not send STOP_SENDING frames for h3 unidirectional streams.
+                                                * TODO: this test should be removed when the connection closure
+                                                * will be more clean.
+                                                * At quic_conn level there is no mean to know that an application
+                                                * want to forbid stream closure requests to receivers. This is the
+                                                * case for the Control and QPACK h3 unidirectional streams.
+                                                */
+                                               goto leave;
+                                       }
+
                                        if (!qc_stop_sending_frm_enqueue(qc, stream->id))
                                                TRACE_ERROR("could not enqueue STOP_SENDING frame", QUIC_EV_CONN_PRSHPKT, qc);
                                        /* This packet will not be acknowledged */