From 084ba95b083dc55fd10631ad43fa8fff48707648 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Sat, 1 Mar 2014 15:32:25 -0800 Subject: [PATCH] [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] --- CHANGES | 4 ++++ bin/dig/dighost.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index f1fff7c4cd..c2c2eac212 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 b3f176fb49..3bc81aff45 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); }