From: Evan Hunt Date: Sat, 1 Mar 2014 23:32:25 +0000 (-0800) Subject: [master] dig +trace could fail when retrying with TCP X-Git-Tag: v9.10.0b2~72 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=084ba95b083dc55fd10631ad43fa8fff48707648;p=thirdparty%2Fbind9.git [master] dig +trace could fail when retrying with TCP 3770. [bug] "dig +trace" could fail with an assertion when it needed to fall back to TCP due to a truncated response. [RT #24660] --- diff --git a/CHANGES b/CHANGES index f1fff7c4cdc..c2c2eac2124 100644 --- 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] diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index b3f176fb498..3bc81aff45d 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -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); }