From: Frédéric Lécaille Date: Mon, 17 Jan 2022 13:26:12 +0000 (+0100) Subject: MINOR: quic: Send two ack-eliciting packets when probing packet number spaces X-Git-Tag: v2.6-dev1~114 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0fa553d0c2249d95c128636ed5c96912a9f3dbfd;p=thirdparty%2Fhaproxy.git MINOR: quic: Send two ack-eliciting packets when probing packet number spaces This is to avoid too much PTO timer expirations for 01RTT and Handshake packet number spaces. Furthermore we are not limited by the anti-amplication for 01RTT packet number space. According to the RFC we can send up to two packets. --- diff --git a/src/xprt_quic.c b/src/xprt_quic.c index f56ea0cd2d..e5b7c7d62b 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -3394,11 +3394,14 @@ static struct task *process_timer(struct task *task, void *ctx, unsigned int sta st = HA_ATOMIC_LOAD(&qc->state); if (qc->path->in_flight) { pktns = quic_pto_pktns(qc, st >= QUIC_HS_ST_COMPLETE, NULL); - if (qc_is_listener(qc) && - pktns == &qc->pktns[QUIC_TLS_PKTNS_HANDSHAKE] && - qc->pktns[QUIC_TLS_PKTNS_INITIAL].tx.in_flight) - qc->pktns[QUIC_TLS_PKTNS_INITIAL].tx.pto_probe = 1; - pktns->tx.pto_probe = 1; + if (pktns == &qc->pktns[QUIC_TLS_PKTNS_INITIAL]) { + pktns->tx.pto_probe = 1; + if (qc->pktns[QUIC_TLS_PKTNS_HANDSHAKE].tx.in_flight) + qc->pktns[QUIC_TLS_PKTNS_HANDSHAKE].tx.pto_probe = 1; + } + else { + pktns->tx.pto_probe = 2; + } } else if (!qc_is_listener(qc) && st <= QUIC_HS_ST_COMPLETE) { struct quic_enc_level *iel = &qc->els[QUIC_TLS_ENC_LEVEL_INITIAL];