From: Frédéric Lécaille Date: Fri, 20 Jan 2023 14:33:50 +0000 (+0100) Subject: BUG/MINOR: quic: Do not request h3 clients to close its unidirection streams X-Git-Tag: v2.8-dev2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d18025eeef03dd82d60860d60245c93dc4feadb7;p=thirdparty%2Fhaproxy.git BUG/MINOR: quic: Do not request h3 clients to close its unidirection streams 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. --- diff --git a/src/quic_conn.c b/src/quic_conn.c index d4a9c18f5d..795c1ab924 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -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 */