From: Hugo Landau Date: Thu, 9 Nov 2023 10:27:13 +0000 (+0000) Subject: QUIC PORT: Add SRTM wiring X-Git-Tag: openssl-3.3.0-alpha1~430 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4be37b8ce8ed4cc809b45c0177cb47670ed4224;p=thirdparty%2Fopenssl.git QUIC PORT: Add SRTM wiring Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/22674) --- diff --git a/ssl/quic/quic_port.c b/ssl/quic/quic_port.c index ee4b2900e05..b128477c0a8 100644 --- a/ssl/quic/quic_port.c +++ b/ssl/quic/quic_port.c @@ -9,6 +9,8 @@ #include "internal/quic_port.h" #include "internal/quic_channel.h" +#include "internal/quic_lcidm.h" +#include "internal/quic_srtm.h" #include "quic_port_local.h" #include "quic_channel_local.h" #include "../ssl_local.h" @@ -82,6 +84,9 @@ static int port_init(QUIC_PORT *port) port_default_packet_handler, port); + if ((port->srtm = ossl_quic_srtm_new(port->libctx, port->propq)) == 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; @@ -95,8 +100,12 @@ err: static void port_cleanup(QUIC_PORT *port) { assert(ossl_list_ch_num(&port->channel_list) == 0); + ossl_quic_demux_free(port->demux); port->demux = NULL; + + ossl_quic_srtm_free(port->srtm); + port->srtm = NULL; } QUIC_REACTOR *ossl_quic_port_get0_reactor(QUIC_PORT *port) diff --git a/ssl/quic/quic_port_local.h b/ssl/quic/quic_port_local.h index ad6638eb2f0..bfcc5896e14 100644 --- a/ssl/quic/quic_port_local.h +++ b/ssl/quic/quic_port_local.h @@ -52,6 +52,12 @@ struct quic_port_st { /* Special TSERVER channel. To be removed in the future. */ QUIC_CHANNEL *tserver_ch; + /* LCIDM used for incoming packet routing by DCID. */ + QUIC_LCIDM *lcidm; + + /* SRTM used for incoming packet routing by SRT. */ + QUIC_SRTM *srtm; + /* DCID length used for incoming short header packets. */ unsigned char rx_short_dcid_len; /* For clients, CID length used for outgoing Initial packets. */