From 00f83773169d9020a3ddcdaf88b198a27f571ff8 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 22 Jan 2009 05:06:33 +0000 Subject: [PATCH] 2535. [bug] dig +showsearh and +trace interacted badly. [RT #19091] --- CHANGES | 2 ++ bin/dig/dig.c | 17 ++++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/CHANGES b/CHANGES index f197f46e3e..78d0b7ed92 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +2535. [bug] dig +showsearh and +trace interacted badly. [RT #19091] + 2534. [func] Check NAPTR records regular expressions and replacement strings to ensure they are syntactically valid and consistant. [RT #18168] diff --git a/bin/dig/dig.c b/bin/dig/dig.c index cc3b988309..e5de98f2d0 100644 --- a/bin/dig/dig.c +++ b/bin/dig/dig.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dig.c,v 1.227 2009/01/17 23:47:42 tbox Exp $ */ +/* $Id: dig.c,v 1.228 2009/01/22 05:06:33 marka Exp $ */ /*! \file */ @@ -801,7 +801,9 @@ plus_option(char *option, isc_boolean_t is_batchfile, switch (cmd[1]) { case 'e': /* defname */ FULLCHECK("defname"); - usesearch = state; + if (!lookup->trace) { + usesearch = state; + } break; case 'n': /* dnssec */ FULLCHECK("dnssec"); @@ -941,7 +943,9 @@ plus_option(char *option, isc_boolean_t is_batchfile, switch (cmd[1]) { case 'e': /* search */ FULLCHECK("search"); - usesearch = state; + if (!lookup->trace) { + usesearch = state; + } break; case 'h': if (cmd[2] != 'o') @@ -962,8 +966,10 @@ plus_option(char *option, isc_boolean_t is_batchfile, break; case 'w': /* showsearch */ FULLCHECK("showsearch"); - showsearch = state; - usesearch = state; + if (!lookup->trace) { + showsearch = state; + usesearch = state; + } break; default: goto invalid_option; @@ -1022,6 +1028,7 @@ plus_option(char *option, isc_boolean_t is_batchfile, lookup->section_additional = ISC_FALSE; lookup->section_authority = ISC_TRUE; lookup->section_question = ISC_FALSE; + usesearch = ISC_FALSE; } break; case 'i': /* tries */