]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] dig +trace could fail when retrying with TCP
authorEvan Hunt <each@isc.org>
Sat, 1 Mar 2014 23:32:25 +0000 (15:32 -0800)
committerEvan Hunt <each@isc.org>
Sat, 1 Mar 2014 23:32:25 +0000 (15:32 -0800)
3770. [bug] "dig +trace" could fail with an assertion when it
needed to fall back to TCP due to a truncated
response. [RT #24660]

CHANGES
bin/dig/dighost.c

diff --git a/CHANGES b/CHANGES
index f1fff7c4cdc570bf4411bd60f54c4594313608c8..c2c2eac21248f030484aa464072dd536a0e4875a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+3770.  [bug]           "dig +trace" could fail with an assertion when it
+                       needed to fall back to TCP due to a truncated
+                       response. [RT #24660]
+
 3769.  [doc]           Improved documentation of "rndc signing -list".
                        [RT #30652]
 
index b3f176fb498c855f91f066af6146dfde082c8dfa..3bc81aff45d26769b10029d56303506f78f6a680 100644 (file)
@@ -811,6 +811,7 @@ make_empty_lookup(void) {
 #ifdef ISC_PLATFORM_USESIT
        looknew->sitvalue = NULL;
 #endif
+       dns_fixedname_init(&looknew->fdomain);
        ISC_LINK_INIT(looknew, link);
        ISC_LIST_INIT(looknew->q);
        ISC_LIST_INIT(looknew->connecting);
@@ -899,6 +900,9 @@ clone_lookup(dig_lookup_t *lookold, isc_boolean_t servers) {
                memmove(looknew->ecs_addr, lookold->ecs_addr, len);
        }
 
+       dns_name_copy(dns_fixedname_name(&lookold->fdomain),
+                     dns_fixedname_name(&looknew->fdomain), NULL);
+
        if (servers)
                clone_server_list(lookold->my_server_list,
                                  &looknew->my_server_list);
@@ -1883,7 +1887,6 @@ followup_lookup(dns_message_t *msg, dig_query_t *query, dns_section_t section)
                                lookup->trace_root = ISC_FALSE;
                                if (lookup->ns_search_only)
                                        lookup->recurse = ISC_FALSE;
-                               dns_fixedname_init(&lookup->fdomain);
                                domain = dns_fixedname_name(&lookup->fdomain);
                                dns_name_copy(name, domain, NULL);
                        }