BUG/MINOR: server: missing default server 'resolvers' setting duplication.
'resolvers' setting was not duplicated from default server setting to new server instances when parsing 'server' lines. This fix is simple: strdup() default resolvers <id> string argument after having allocated a new server when parsing 'server' lines. This patch must be backported to 1.7 and 1.6.
This commit is contained in:
parent
9f724edbd8
commit
daa2fe6621
@ -1813,6 +1813,8 @@ int parse_server(const char *file, int linenum, char **args, struct proxy *curpr
|
||||
newsrv->agent.fall = curproxy->defsrv.agent.fall;
|
||||
newsrv->agent.health = newsrv->agent.rise; /* up, but will fall down at first failure */
|
||||
newsrv->agent.server = newsrv;
|
||||
if (curproxy->defsrv.resolvers_id != NULL)
|
||||
newsrv->resolvers_id = strdup(curproxy->defsrv.resolvers_id);
|
||||
newsrv->dns_opts.family_prio = curproxy->defsrv.dns_opts.family_prio;
|
||||
if (newsrv->dns_opts.family_prio == AF_UNSPEC)
|
||||
newsrv->dns_opts.family_prio = AF_INET6;
|
||||
@ -1939,6 +1941,7 @@ int parse_server(const char *file, int linenum, char **args, struct proxy *curpr
|
||||
cur_arg += 2;
|
||||
}
|
||||
else if (!strcmp(args[cur_arg], "resolvers")) {
|
||||
free(newsrv->resolvers_id);
|
||||
newsrv->resolvers_id = strdup(args[cur_arg + 1]);
|
||||
cur_arg += 2;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user