]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: acknowledge STREAM frame even if MUX is released
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 20 Feb 2023 09:32:16 +0000 (10:32 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 20 Feb 2023 09:54:27 +0000 (10:54 +0100)
When the MUX is freed, the quic-conn layer may stay active until all
streams acknowledgment are processed. In this interval, if a new stream
is opened by the client, the quic-conn is thus now responsible to handle
it. This is done by the emission of a STOP_SENDING + RESET_STREAM.

Prior to this patch, the received packet was not acknowledged. This is
undesirable if the quic-conn is able to properly reject the request as
this can lead to unneeded retransmission from the client.

This must be backported up to 2.6.

src/quic_conn.c

index 81b111903fe646c6bd6009f548fcdc43122be96a..9661cc6fdc43e298c028eb70947cac1a5cbe8da3 100644 (file)
@@ -2958,11 +2958,16 @@ 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) {
-                                               if (!qc_h3_request_reject(qc, stream->id))
-                                                       TRACE_ERROR("could not enqueue STOP_SENDING frame", QUIC_EV_CONN_PRSHPKT, qc);
+                                               if (!qc_h3_request_reject(qc, stream->id)) {
+                                                       TRACE_ERROR("error on request rejection", QUIC_EV_CONN_PRSHPKT, qc);
+                                                       /* This packet will not be acknowledged */
+                                                       goto leave;
+                                               }
+                                       }
+                                       else {
+                                               /* This packet will not be acknowledged */
+                                               goto leave;
                                        }
-                                       /* This packet will not be acknowledged */
-                                       goto leave;
                                }
                        }