2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

2169. [bug] nslookup: when reporting NXDOMAIN report the given

name and not the last name searched for. [RT #16763]
This commit is contained in:
Mark Andrews
2007-04-24 07:20:45 +00:00
parent 43da756591
commit aaa42824d2
3 changed files with 12 additions and 6 deletions

View File

@@ -1,3 +1,6 @@
2169. [bug] nslookup: when reporting NXDOMAIN report the given
name and not the last name searched for. [RT #16763]
2168. [bug] nsupdate: in non-interactive mode treat syntax errors
as fatal errors. [RT #16785]

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: host.c,v 1.112 2007/02/26 23:46:54 tbox Exp $ */
/* $Id: host.c,v 1.113 2007/04/24 07:20:45 marka Exp $ */
/*! \file */
@@ -426,8 +426,10 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
if (msg->rcode != 0) {
char namestr[DNS_NAME_FORMATSIZE];
dns_name_format(query->lookup->name, namestr, sizeof(namestr));
printf("Host %s not found: %d(%s)\n", namestr,
msg->rcode, rcodetext[msg->rcode]);
printf("Host %s not found: %d(%s)\n",
(msg->rcode != dns_rcode_nxdomain) ? namestr :
query->lookup->textname, msg->rcode,
rcodetext[msg->rcode]);
return (ISC_R_SUCCESS);
}

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: nslookup.c,v 1.114 2006/12/07 05:52:16 marka Exp $ */
/* $Id: nslookup.c,v 1.115 2007/04/24 07:20:45 marka Exp $ */
#include <config.h>
@@ -410,8 +410,9 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) {
char nametext[DNS_NAME_FORMATSIZE];
dns_name_format(query->lookup->name,
nametext, sizeof(nametext));
printf("** server can't find %s: %s\n", nametext,
rcodetext[msg->rcode]);
printf("** server can't find %s: %s\n",
(msg->rcode != dns_rcode_nxdomain) ? nametext :
query->lookup->textname, rcodetext[msg->rcode]);
debug("returning with rcode == 0");
return (ISC_R_SUCCESS);
}