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:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user