Revert "MINOR: quic: Useless TX buffer size reduction in closing state"
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 3 Oct 2025 07:40:14 +0000 (09:40 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 3 Oct 2025 07:40:14 +0000 (09:40 +0200)
By chasing a QUIC regression on 3.0, we found this commit. We don't if it
introduced a regression or not but the context is quite different. So let's
revert it for now, especially because it is not a bug fix, to review it
later.

This reverts commit 6edc24a81f9347d49f674c9fdd6641e922b85132.

src/quic_tx.c

index 171525d..55a5a09 100644 (file)
@@ -565,7 +565,10 @@ static int qc_prep_pkts(struct quic_conn *qc, struct buffer *buf,
                        if (!prv_pkt) {
                                /* Leave room for the datagram header */
                                pos += QUIC_DGRAM_HEADLEN;
-                               if (!quic_peer_validated_addr(qc) && qc_is_listener(qc)) {
+                               if (cc) {
+                                       end = pos + QUIC_MIN_CC_PKTSIZE;
+                               }
+                               else if (!quic_peer_validated_addr(qc) && qc_is_listener(qc)) {
                                        end = pos + QUIC_MIN(qc->path->mtu, quic_may_send_bytes(qc));
                                }
                                else {