]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: server: Don't reset resolver options on a new default-server line
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 24 May 2024 14:30:59 +0000 (16:30 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 24 May 2024 14:31:01 +0000 (16:31 +0200)
When a new "default-server" line is parsed, some resolver options are reset.
Thus previously defined default options cannot be inherited. There is no
reason to do so. First because other server options are inherited. And then
because not all resolver options are reset. It is not consistent.

This patch should fix issue #2559. It should be backported to all stable
versions.

src/server.c

index a12f7fe62adda73b249dde16f2d9b1eeaacb83bb..caf2f40bb537cf0cfb55ecf9390d630dbe9f7b0d 100644 (file)
@@ -3459,8 +3459,6 @@ static int _srv_parse_init(struct server **srv, char **args, int *cur_arg,
        else {
                *srv = newsrv = &curproxy->defsrv;
                *cur_arg = 1;
-               newsrv->resolv_opts.family_prio = AF_INET6;
-               newsrv->resolv_opts.accept_duplicate_ip = 0;
        }
 
        free(fqdn);