]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Probe several packet number space upon timer expiration
authorFrédéric Lécaille <flecaille@haproxy.com>
Fri, 31 Dec 2021 15:35:28 +0000 (16:35 +0100)
committerFrédéric Lécaille <flecaille@haproxy.com>
Tue, 4 Jan 2022 16:30:00 +0000 (17:30 +0100)
When the loss detection timer expires, we SHOULD include new data in
our probing packets (RFC 9002 par 6.2.4. Sending Probe Packets).

src/xprt_quic.c

index 3152f27d362bde655c8902986d9e52053c4d57cc..9ab675c1dea7c64ec3d1069a6b9a17e0efe43601 100644 (file)
@@ -3302,7 +3302,7 @@ static struct task *process_timer(struct task *task, void *ctx, unsigned int sta
        struct ssl_sock_ctx *conn_ctx;
        struct quic_conn *qc;
        struct quic_pktns *pktns;
-       int st;
+       int i, st;
 
        conn_ctx = task->context;
        qc = conn_ctx->qc;
@@ -3338,6 +3338,17 @@ static struct task *process_timer(struct task *task, void *ctx, unsigned int sta
                if (iel->tls_ctx.rx.flags == QUIC_FL_TLS_SECRETS_SET)
                        iel->pktns->tx.pto_probe = 1;
        }
+
+       for (i = QUIC_TLS_ENC_LEVEL_INITIAL; i < QUIC_TLS_ENC_LEVEL_MAX; i++) {
+               int j;
+
+               if (i == QUIC_TLS_ENC_LEVEL_APP && !quic_peer_validated_addr(qc))
+                   continue;
+
+               for (j = 0; j < qc->els[i].pktns->tx.pto_probe; j++)
+                       qc_prep_fast_retrans(&qc->els[i], qc);
+       }
+
        tasklet_wakeup(conn_ctx->wait_event.tasklet);
        qc->path->loss.pto_count++;