QUIC PORT: Create a LCIDM
authorHugo Landau <hlandau@openssl.org>
Thu, 9 Nov 2023 10:27:13 +0000 (10:27 +0000)
committerHugo Landau <hlandau@openssl.org>
Thu, 21 Dec 2023 08:11:59 +0000 (08:11 +0000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22674)

ssl/quic/quic_port.c

index bf351e923c5e9e48a850ebf6698539d8c06262e1..64cee54c8b410ea648339d875b9a067f41530ddf 100644 (file)
@@ -87,6 +87,9 @@ static int port_init(QUIC_PORT *port)
     if ((port->srtm = ossl_quic_srtm_new(port->libctx, port->propq)) == NULL)
         goto err;
 
+    if ((port->lcidm = ossl_quic_lcidm_new(port->libctx, rx_short_dcid_len)) == NULL)
+        goto err;
+
     ossl_quic_reactor_init(&port->rtor, port_tick, port, ossl_time_zero());
     port->rx_short_dcid_len = (unsigned char)rx_short_dcid_len;
     port->tx_init_dcid_len  = INIT_DCID_LEN;
@@ -106,6 +109,9 @@ static void port_cleanup(QUIC_PORT *port)
 
     ossl_quic_srtm_free(port->srtm);
     port->srtm = NULL;
+
+    ossl_quic_lcidm_free(port->lcidm);
+    port->lcidm = NULL;
 }
 
 QUIC_REACTOR *ossl_quic_port_get0_reactor(QUIC_PORT *port)