projects
/
haproxy-2.3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ac1c60f
)
MINOR: server: Copy configuration file and line for server templates
author
Christopher Faulet
<cfaulet@haproxy.com>
Mon, 2 Nov 2020 21:04:55 +0000
(22:04 +0100)
committer
Christopher Faulet
<cfaulet@haproxy.com>
Tue, 3 Nov 2020 09:44:38 +0000
(10:44 +0100)
When servers based on server templates are initialized, the configuration file
and line are now copied. This helps to emit understandable warning and alert
messages.
This patch may be backported if needed, as far as 1.8.
src/server.c
patch
|
blob
|
history
diff --git
a/src/server.c
b/src/server.c
index
4b7d7d7
..
42c2e54
100644
(file)
--- a/
src/server.c
+++ b/
src/server.c
@@
-1862,6
+1862,9
@@
static int server_template_init(struct server *srv, struct proxy *px)
if (!newsrv)
goto err;
+ newsrv->conf.file = strdup(srv->conf.file);
+ newsrv->conf.line = srv->conf.line;
+
srv_settings_cpy(newsrv, srv, 1);
srv_prepare_for_resolution(newsrv, srv->hostname);
#ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME