]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: quic: Move QUIC SSL BIO method related functions to quic_ssl.c
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 27 Nov 2023 10:54:05 +0000 (11:54 +0100)
committerFrédéric Lécaille <flecaille@haproxy.com>
Tue, 28 Nov 2023 14:37:50 +0000 (15:37 +0100)
Move __quic_conn_init() and __quic_conn_deinit() from quic_conn.c to quic_ssl.c.

src/quic_conn.c
src/quic_ssl.c

index 35c3c6fb7cd821063204b4faa72b582fe8d4164b..92d48fe2a344741f3a81bfa1d4563b8dcdc449bb 100644 (file)
@@ -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 <dcid> of length <dcid_len> belongs to <qc> local
  * CIDs. This can be used to determine if a datagram is addressed to the right
  * connection instance.
index e7279be7cd1460bea27c4f0abc322ce6da40eded..314f58797a18f1f66f5a3693e70e8b7567c21db8 100644 (file)
@@ -11,6 +11,8 @@
 #include <haproxy/ssl_sock.h>
 #include <haproxy/trace.h>
 
+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);