]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: DNS: resolution structure change
authorBaptiste Assmann <bedis9@gmail.com>
Tue, 5 Apr 2016 19:19:51 +0000 (21:19 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 5 Apr 2016 19:35:42 +0000 (21:35 +0200)
060e57301db98853eef91b344b6ace187b657190 introduced a bug, related to a
dns option structure change and an improper rebase.

Thanks Lukas Tribus for reporting it.

backport: 1.7 and above

src/dns.c

index 4603e21f70f48183f106fedf25928f2ecceefebd..3906742bce3644c3fa16cef5a207820bf70eb9a7 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
@@ -1194,8 +1194,8 @@ struct task *dns_process_resolve(struct task *t)
 
                resolution->try -= 1;
 
-               res_preferred_afinet = resolution->resolver_family_priority == AF_INET && resolution->query_type == DNS_RTYPE_A;
-               res_preferred_afinet6 = resolution->resolver_family_priority == AF_INET6 && resolution->query_type == DNS_RTYPE_AAAA;
+               res_preferred_afinet = resolution->opts->family_prio == AF_INET && resolution->query_type == DNS_RTYPE_A;
+               res_preferred_afinet6 = resolution->opts->family_prio == AF_INET6 && resolution->query_type == DNS_RTYPE_AAAA;
 
                /* let's change the query type if needed */
                if (res_preferred_afinet6) {