From 3b91756ebea62eaa730ad1b9c81d90a0c006202b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Mon, 27 Nov 2023 11:54:05 +0100 Subject: [PATCH] REORG: quic: Move QUIC SSL BIO method related functions to quic_ssl.c Move __quic_conn_init() and __quic_conn_deinit() from quic_conn.c to quic_ssl.c. --- src/quic_conn.c | 14 -------------- src/quic_ssl.c | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/quic_conn.c b/src/quic_conn.c index 35c3c6fb7..92d48fe2a 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -130,8 +130,6 @@ const struct quic_version *preferred_version; */ const struct quic_version quic_version_VN_reserved = { .num = 0, }; -static BIO_METHOD *ha_quic_meth; - DECLARE_STATIC_POOL(pool_head_quic_conn, "quic_conn", sizeof(struct quic_conn)); DECLARE_STATIC_POOL(pool_head_quic_cc_conn, "quic_cc_conn", sizeof(struct quic_cc_conn)); DECLARE_STATIC_POOL(pool_head_quic_cids, "quic_cids", sizeof(struct eb_root)); @@ -1553,18 +1551,6 @@ const struct quic_version *qc_supported_version(uint32_t version) return NULL; } -static void __quic_conn_init(void) -{ - ha_quic_meth = BIO_meth_new(0x666, "ha QUIC methods"); -} -INITCALL0(STG_REGISTER, __quic_conn_init); - -static void __quic_conn_deinit(void) -{ - BIO_meth_free(ha_quic_meth); -} -REGISTER_POST_DEINIT(__quic_conn_deinit); - /* Check if connection ID of length belongs to local * CIDs. This can be used to determine if a datagram is addressed to the right * connection instance. diff --git a/src/quic_ssl.c b/src/quic_ssl.c index e7279be7c..314f58797 100644 --- a/src/quic_ssl.c +++ b/src/quic_ssl.c @@ -11,6 +11,8 @@ #include #include +static BIO_METHOD *ha_quic_meth; + DECLARE_POOL(pool_head_quic_ssl_sock_ctx, "quic_ssl_sock_ctx", sizeof(struct ssl_sock_ctx)); /* Set the encoded version of the transport parameter into the TLS @@ -774,3 +776,15 @@ int qc_alloc_ssl_sock_ctx(struct quic_conn *qc) pool_free(pool_head_quic_ssl_sock_ctx, ctx); goto leave; } + +static void __quic_conn_init(void) +{ + ha_quic_meth = BIO_meth_new(0x666, "ha QUIC methods"); +} +INITCALL0(STG_REGISTER, __quic_conn_init); + +static void __quic_conn_deinit(void) +{ + BIO_meth_free(ha_quic_meth); +} +REGISTER_POST_DEINIT(__quic_conn_deinit);