]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Try to accept 0-RTT connections
authorFrédéric Lécaille <flecaille@haproxy.com>
Fri, 28 Jan 2022 20:38:45 +0000 (21:38 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 31 Jan 2022 15:40:23 +0000 (16:40 +0100)
When a listener managed to derive 0-RTT RX secrets we consider it accepted
the early data. So we enqueue the connection into the accept queue.

src/xprt_quic.c

index a1fa7dbdecdf918658c5e79b84a284c7f34e8369..d7e680526570808194eaae0e5f16d5d5e3d53c49 100644 (file)
@@ -779,6 +779,12 @@ int ha_quic_set_encryption_secrets(SSL *ssl, enum ssl_encryption_level_t level,
        }
 
        rx->flags |= QUIC_FL_TLS_SECRETS_SET;
+       /* Enqueue this connection asap if we could derive O-RTT secrets as
+        * listener. Note that a listener derives only RX secrets for this
+        * level.
+        */
+       if (qc_is_listener(qc) && level == ssl_encryption_early_data)
+               quic_accept_push_qc(qc);
 
        if (!write_secret)
                goto tp;