]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: Avoid sending useless PADDING frame
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 25 Apr 2022 15:17:07 +0000 (17:17 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 28 Apr 2022 14:22:40 +0000 (16:22 +0200)
This may happen in rare cases with extreme packet loss (30% for both TX and RX)
which leads the congestion window to decrease down to its minimal value (two
datagrams). Under such circumtances, no ack-eliciting frame can be added to
a packet by qc_build_frms(). In this case we must cancel the packet building
process if there is no ACK or probe (PING frame) to send.

src/xprt_quic.c

index 9eeef9571ac6e031e589ac4f0b74dd1b93a0bbac..08bd88b13e23ee634a1052fefbfebc740ee2472b 100644 (file)
@@ -5758,6 +5758,8 @@ static int qc_do_build_pkt(unsigned char *pos, const unsigned char *end,
                                   end - pos, &len_frms, pos - beg, qel, qc)) {
                        TRACE_PROTO("Not enough room", QUIC_EV_CONN_HPKT,
                                    qc, NULL, NULL, &room);
+                       if (!ack_frm_len && !qel->pktns->tx.pto_probe)
+                               goto no_room;
                }
        }