Commit acfbd7a4 authored by Mark Andrews's avatar Mark Andrews
Browse files

report type and class when logging failures via add_bad

parent 79da8302
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: resolver.c,v 1.251 2002/09/10 00:53:30 marka Exp $ */
/* $Id: resolver.c,v 1.252 2002/09/12 04:42:46 marka Exp $ */
#include <config.h>
......@@ -37,6 +37,7 @@
#include <dns/peer.h>
#include <dns/rcode.h>
#include <dns/rdata.h>
#include <dns/rdataclass.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
#include <dns/rdatastruct.h>
......@@ -1331,6 +1332,8 @@ static void
add_bad(fetchctx_t *fctx, isc_sockaddr_t *address, isc_result_t reason) {
char namebuf[DNS_NAME_FORMATSIZE];
char addrbuf[ISC_SOCKADDR_FORMATSIZE];
char classbuf[64];
char typebuf[64];
char code[64];
isc_buffer_t b;
isc_sockaddr_t *sa;
......@@ -1372,12 +1375,14 @@ add_bad(fetchctx_t *fctx, isc_sockaddr_t *address, isc_result_t reason) {
sep2 = "";
}
dns_name_format(&fctx->name, namebuf, sizeof(namebuf));
dns_rdatatype_format(fctx->type, typebuf, sizeof(typebuf));
dns_rdataclass_format(fctx->res->rdclass, classbuf, sizeof(classbuf));
isc_sockaddr_format(address, addrbuf, sizeof(addrbuf));
isc_log_write(dns_lctx, DNS_LOGCATEGORY_LAME_SERVERS,
DNS_LOGMODULE_RESOLVER, ISC_LOG_INFO,
"%s %s%s%sresolving '%s': %s",
"%s %s%s%sresolving '%s/%s/%s': %s",
dns_result_totext(reason), sep1, code, sep2,
namebuf, addrbuf);
namebuf, typebuf, classbuf, addrbuf);
}
static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment