diff --git a/CHANGES b/CHANGES index 3903b0b1c2..fde55804d4 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +1145. [func] "host" no longer reports a NOERROR/NODATA response + by printing nothing. [RT #2065] + 1144. [bug] rndc-confgen would crash if both the -a and -t options were specified. [RT #2159] diff --git a/bin/dig/host.c b/bin/dig/host.c index 2052e9c45b..927855c720 100644 --- a/bin/dig/host.c +++ b/bin/dig/host.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: host.c,v 1.80 2001/11/29 01:14:35 gson Exp $ */ +/* $Id: host.c,v 1.81 2001/11/29 01:21:19 gson Exp $ */ #include #include @@ -459,6 +459,15 @@ printmessage(dig_query_t *query, dns_message_t *msg, isc_boolean_t headers) { if (!short_form) printf("\n"); + if (short_form && ISC_LIST_EMPTY(msg->sections[DNS_SECTION_ANSWER])) { + char namestr[DNS_NAME_FORMATSIZE]; + char typestr[DNS_RDATATYPE_FORMATSIZE]; + dns_name_format(query->lookup->name, namestr, sizeof(namestr)); + dns_rdatatype_format(query->lookup->rdtype, typestr, + sizeof(typestr)); + printf("%s has no %s record\n", namestr, typestr); + } + return (result); }