Skip to content

Commit b5efe79

Browse files
haproxyFredwtarreau
authored andcommitted
BUG/MINOR: quic: Do not use ack delay during the handshakes
As revealed by GH haproxy#2120 opened by @Tristan971, there are cases where ACKs have to be sent without packet to acknowledge because the ACK timer has been triggered and the connection needs to probe the peer at the same time. Indeed Thank you to @Tristan971 for having reported this issue. Must be backported to 2.6 and 2.7.
1 parent 75b954f commit b5efe79

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/quic_conn.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4505,9 +4505,13 @@ int qc_treat_rx_pkts(struct quic_conn *qc, struct quic_enc_level *cur_el,
45054505
struct quic_arng ar = { .first = pkt->pn, .last = pkt->pn };
45064506

45074507
if (pkt->flags & QUIC_FL_RX_PACKET_ACK_ELICITING) {
4508+
int arm_ack_timer =
4509+
qc->state >= QUIC_HS_ST_COMPLETE &&
4510+
qel->pktns == &qc->pktns[QUIC_TLS_PKTNS_01RTT];
4511+
45084512
qel->pktns->flags |= QUIC_FL_PKTNS_ACK_REQUIRED;
45094513
qel->pktns->rx.nb_aepkts_since_last_ack++;
4510-
qc_idle_timer_rearm(qc, 1, 1);
4514+
qc_idle_timer_rearm(qc, 1, arm_ack_timer);
45114515
}
45124516
if (pkt->pn > largest_pn) {
45134517
largest_pn = pkt->pn;

0 commit comments

Comments
 (0)