]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
report type and class when logging failures via add_bad
authorMark Andrews <marka@isc.org>
Thu, 12 Sep 2002 04:42:46 +0000 (04:42 +0000)
committerMark Andrews <marka@isc.org>
Thu, 12 Sep 2002 04:42:46 +0000 (04:42 +0000)
lib/dns/resolver.c

index 2c35a6736cd7023000c438173cc14bb33cd23431..b2fd1f9d73f031e517e5068bf9043f1f23342f22 100644 (file)
@@ -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