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.
This commit is contained in:
Frédéric Lécaille 2023-01-20 15:33:50 +01:00
parent a0658c3cf3
commit d18025eeef

View File

@ -2836,6 +2836,17 @@ static int qc_parse_pkt_frms(struct quic_conn *qc, struct quic_rx_packet *pkt,
} }
else { else {
TRACE_DEVEL("No mux for new stream", QUIC_EV_CONN_PRSHPKT, qc); 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)) if (!qc_stop_sending_frm_enqueue(qc, stream->id))
TRACE_ERROR("could not enqueue STOP_SENDING frame", QUIC_EV_CONN_PRSHPKT, qc); TRACE_ERROR("could not enqueue STOP_SENDING frame", QUIC_EV_CONN_PRSHPKT, qc);
/* This packet will not be acknowledged */ /* This packet will not be acknowledged */