From 834399c24a97a1921dc3eef3da3d2910e9b3c437 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Mon, 25 Apr 2022 17:17:07 +0200 Subject: [PATCH] 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. --- src/xprt_quic.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xprt_quic.c b/src/xprt_quic.c index 9eeef9571..08bd88b13 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; } }