From 15a436ba2885320169dce05eef1df8a04f91c2c5 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Tue, 1 Sep 2026 17:51:07 +0200 Subject: [PATCH] BUG/MEDIUM: resolvers: Use the right server to init DNS streams During TCP nameservers parsing, the wrong server was selected to initialize the DNS stream. After the server addition, the first server of the proxy was selected instead of the last one. So when several TCP nameservers was defined, only the first one was properly initialized. All others was using the server created for the first one. The regression was introduced when the server insertion in the proxy's list was inverted. The change was not made on the resolvers part. The proxy_last_server() function must be used instead. It is a 3.5-specific issue. No backported needed. --- src/resolvers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resolvers.c b/src/resolvers.c index 06fb19c41..b4812f3a0 100644 --- a/src/resolvers.c +++ b/src/resolvers.c @@ -3803,7 +3803,7 @@ int cfg_parse_resolvers(const char *file, int linenum, char **args, int kwm) goto out; } - if (dns_stream_init(newnameserver, proxy_first_server(curr_resolvers->px)) < 0) { + if (dns_stream_init(newnameserver, proxy_last_server(curr_resolvers->px)) < 0) { ha_alert("parsing [%s:%d] : out of memory.\n", file, linenum); err_code |= ERR_ALERT|ERR_ABORT; free(newnameserver); -- 2.47.3