mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-24 10:21:10 -05:00
1145. [func] host no longer reports a NOERROR/NODATA response
by printing nothing. [RT #2065]
This commit is contained in:
parent
db080b7310
commit
06a949d2ce
2 changed files with 13 additions and 1 deletions
3
CHANGES
3
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]
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <config.h>
|
||||
#include <stdlib.h>
|
||||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue