From 055e82657ed10017017d4d9f0d6b2bfe96bc0a07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Tue, 31 Jan 2023 10:10:06 +0100 Subject: [PATCH] BUG/MINOR: quic: Do not ignore coalesced packets in qc_prep_fast_retrans() This function is called only when probing only one packet number space (Handshake) or two times the same one (Application). So, there is no risk to prepare two times the same frame when uneeded because we wanted to probe two packet number spaces. The condition "ignore the packets which has been coalesced to another one" is not necessary. More importantly the bug is when we want to prepare a Application packet which has been coalesced to an Handshake packet. This is always the case when the first Application packet is sent. It is always coalesced to an Handshake packet with an ACK frame. So, when lost, this first application packet was never resent. It contains the HANDSHAKE_DONE frame to confirm the completion of the handshake to the client. Must be backported to 2.6 and 2.7. --- src/quic_conn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quic_conn.c b/src/quic_conn.c index e4f1d1290..a660eab1c 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -2474,7 +2474,7 @@ static void qc_prep_fast_retrans(struct quic_conn *qc, TRACE_PRINTF(TRACE_LEVEL_DEVELOPER, QUIC_EV_CONN_SPPKTS, qc, 0, 0, 0, "--> pn=%llu (%d %d)", (ull)pkt->pn_node.key, LIST_ISEMPTY(&pkt->frms), !!(pkt->flags & QUIC_FL_TX_PACKET_COALESCED)); - if (!LIST_ISEMPTY(&pkt->frms) && !(pkt->flags & QUIC_FL_TX_PACKET_COALESCED)) + if (!LIST_ISEMPTY(&pkt->frms)) break; }