From: Frédéric Lécaille Date: Mon, 25 Apr 2022 15:17:07 +0000 (+0200) Subject: BUG/MINOR: quic: Avoid sending useless PADDING frame X-Git-Tag: v2.6-dev8~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=834399c24a97a1921dc3eef3da3d2910e9b3c437;p=thirdparty%2Fhaproxy.git BUG/MINOR: quic: Avoid sending useless PADDING frame 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. --- diff --git a/src/xprt_quic.c b/src/xprt_quic.c index 9eeef9571a..08bd88b13e 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -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; } }