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.
This commit is contained in:
Frédéric Lécaille 2022-01-17 14:26:12 +01:00 committed by Amaury Denoyelle
parent ce6602d887
commit 0fa553d0c2

View file

@ -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];