]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: As server, skip 0-RTT packet number space
authorFrédéric Lécaille <flecaille@haproxy.com>
Wed, 12 Jan 2022 14:32:55 +0000 (15:32 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 12 Jan 2022 17:08:29 +0000 (18:08 +0100)
This is true only when we are building packets. A QUIC server never
sends 0-RTT packets. So let't skip the associated TLS encryption level.

src/xprt_quic.c

index 07dcbd72e485517d806802a9d949d26c45d43ff9..4d0f75246a524a5ece8e2f8819658ba57358395e 100644 (file)
@@ -3200,7 +3200,10 @@ struct task *quic_conn_io_cb(struct task *t, void *context, unsigned int state)
 
        if (!qr)
                qr = MT_LIST_POP(qc->tx.qring_list, typeof(qr), mt_list);
-       if (!quic_get_tls_enc_levels(&tel, &next_tel, st, zero_rtt))
+       /* A listener does not send any O-RTT packet. O-RTT packet number space must not
+        * be considered.
+        */
+       if (!quic_get_tls_enc_levels(&tel, &next_tel, st, 0))
                goto err;
        ret = qc_prep_pkts(qc, qr, tel, next_tel);
        if (ret == -1)