From ff27d0258d21c55c68670e95f327723ce6554e9d Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Sat, 12 Sep 2015 09:04:37 +1000 Subject: [PATCH] 4204. [bug] 'dig +trace' failed to lookup the correct type if the initial root ns query was retried. [RT #40296] ` (cherry picked from commit 295a711b72b075a77065b7a952860269b5ae5d1d) --- CHANGES | 3 +++ bin/dig/dighost.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/CHANGES b/CHANGES index da1a255dfc..31ba49da03 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +4204. [bug] 'dig +trace' failed to lookup the correct type if + the initial root ns query was retried. [RT #40296] + 4203. [test] The rrchecker system test now tests conversion to and from unkonwn-type format. [RT #40584] diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index ca82f8eafa..cd3dfef93c 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -3757,6 +3757,8 @@ recv_done(isc_task_t *task, isc_event_t *event) { l->edns = newedns; n = requeue_lookup(l, ISC_TRUE); n->origin = query->lookup->origin; + if (l->trace && l->trace_root) + n->rdtype = l->qrdtype; dns_message_destroy(&msg); isc_event_free(&event); clear_query(query); @@ -3776,6 +3778,8 @@ recv_done(isc_task_t *task, isc_event_t *event) { n = requeue_lookup(l, ISC_TRUE); n->tcp_mode = ISC_TRUE; n->origin = query->lookup->origin; + if (l->trace && l->trace_root) + n->rdtype = l->qrdtype; dns_message_destroy(&msg); isc_event_free(&event); clear_query(query);