From: Christopher Faulet Date: Mon, 4 May 2026 12:53:58 +0000 (+0200) Subject: BUG/MINOR: resolvers: Fix lookup for a hostname in the state-file tree X-Git-Tag: v3.4-dev11~62 X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=3b1db89283612b6a80965113e1bb987c7d9cdf9e;p=haproxy.git BUG/MINOR: resolvers: Fix lookup for a hostname in the state-file tree In resolv_check_response(), the condition 'if (!srvrq->named_servers)' was inverted - it ran the named server lookup when the tree was empty/NULL instead of when it was populated. This prevented proper hostname-based matching of SRV records to servers from the state file. The issue was introduced when tree of servers was replaced by a cebis tree (fdf6fd5b45). This patch must be backported to 3.3. --- diff --git a/src/resolvers.c b/src/resolvers.c index 7049ca8d6..de93fea1a 100644 --- a/src/resolvers.c +++ b/src/resolvers.c @@ -864,7 +864,7 @@ static void resolv_check_response(struct resolv_resolution *res) /* If not empty we try to match a server * in server state file tree with the same hostname */ - if (!srvrq->named_servers) { + if (srvrq->named_servers) { srv = NULL; /* convert the key to lookup in lower case */