From 0d05867e78d13a61b54576b5185f30b6cb50fff2 Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Wed, 16 Mar 2022 15:44:42 +0100 Subject: [PATCH] MINOR: server: export server_parse_sni_expr() function Export the server_parse_sni_expr() function in order to create a SNI expression in a server which was not parsed from the configuration. --- include/haproxy/server.h | 1 + src/server.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/haproxy/server.h b/include/haproxy/server.h index 69507c7c7..2572b7230 100644 --- a/include/haproxy/server.h +++ b/include/haproxy/server.h @@ -46,6 +46,7 @@ int srv_lastsession(const struct server *s); int srv_getinter(const struct check *check); int parse_server(const char *file, int linenum, char **args, struct proxy *curproxy, const struct proxy *defproxy, int parse_flags); int srv_update_addr(struct server *s, void *ip, int ip_sin_family, const char *updater); +int server_parse_sni_expr(struct server *newsrv, struct proxy *px, char **err); const char *srv_update_addr_port(struct server *s, const char *addr, const char *port, char *updater); const char *srv_update_check_addr_port(struct server *s, const char *addr, const char *port); const char *srv_update_agent_addr_port(struct server *s, const char *addr, const char *port); diff --git a/src/server.c b/src/server.c index 83295b656..d3f86b058 100644 --- a/src/server.c +++ b/src/server.c @@ -1955,7 +1955,7 @@ static struct sample_expr *srv_sni_sample_parse_expr(struct server *srv, struct return sample_parse_expr((char **)args, &idx, file, linenum, err, &px->conf.args, NULL); } -static int server_parse_sni_expr(struct server *newsrv, struct proxy *px, char **err) +int server_parse_sni_expr(struct server *newsrv, struct proxy *px, char **err) { struct sample_expr *expr;