mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-21 22:28:41 -04:00
MINOR: server: Copy configuration file and line for server templates
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.
This commit is contained in:
parent
ac1c60fd9c
commit
75bef00538
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue