]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: ssl: change visibility of ssl_stats_module
authorWilliam Lallemand <wlallemand@haproxy.com>
Mon, 23 Dec 2024 09:58:56 +0000 (10:58 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Mon, 23 Dec 2024 10:23:00 +0000 (11:23 +0100)
In order to add stats from other files, the ssl_stats_module need to be
visible from other files.

This moves the ssl_counters definition in ssl_sock-t.h and removes the
static of ssl_stats_module.

include/haproxy/ssl_sock-t.h
include/haproxy/ssl_sock.h
src/ssl_sock.c

index f864595f75a2c68ee4218c1472eb44f818525527..410a789a164856e518c33db6f92702b3acd8e325 100644 (file)
@@ -327,5 +327,11 @@ extern const char *SSL_SOCK_KEYTYPE_NAMES[];
 
 extern struct pool_head *ssl_sock_client_sni_pool;
 
+struct ssl_counters {
+       long long sess;
+       long long reused_sess;
+       long long failed_handshake;
+};
+
 #endif /* USE_OPENSSL */
 #endif /* _HAPROXY_SSL_SOCK_T_H */
index b4a7e3af9dd01c04ab76edc4c8aecd70b934a3f7..bd32ef2f900484b83e931934da3d971a21c057c1 100644 (file)
@@ -54,6 +54,7 @@ extern int ssl_client_sni_index;
 extern struct pool_head *pool_head_ssl_keylog;
 extern struct pool_head *pool_head_ssl_keylog_str;
 extern struct list openssl_providers;
+extern struct stats_module ssl_stats_module;
 
 int ssl_sock_prep_ctx_and_inst(struct bind_conf *bind_conf, struct ssl_bind_conf *ssl_conf,
                               SSL_CTX *ctx, struct ckch_inst *ckch_inst, char **err);
index 7e8603a4b0fb0a971321fd38f5b7337cc4f8c1da..45d34b246c440f099be733c7026ed9693c95a2ff 100644 (file)
@@ -169,11 +169,7 @@ static struct stat_col ssl_stats[] = {
                                      .desc = "Total number of failed handshake" },
 };
 
-static struct ssl_counters {
-       long long sess;
-       long long reused_sess;
-       long long failed_handshake;
-} ssl_counters;
+static struct ssl_counters ssl_counters;
 
 static int ssl_fill_stats(void *data, struct field *stats, unsigned int *selected_field)
 {
@@ -208,7 +204,7 @@ static int ssl_fill_stats(void *data, struct field *stats, unsigned int *selecte
        return 1;
 }
 
-static struct stats_module ssl_stats_module = {
+struct stats_module ssl_stats_module = {
        .name          = "ssl",
        .fill_stats    = ssl_fill_stats,
        .stats         = ssl_stats,