]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1332. [func] Log TSIG key used w/ outgoing zone transfers.
authorMark Andrews <marka@isc.org>
Tue, 25 Jun 2002 04:08:43 +0000 (04:08 +0000)
committerMark Andrews <marka@isc.org>
Tue, 25 Jun 2002 04:08:43 +0000 (04:08 +0000)
CHANGES
bin/named/xfrout.c

diff --git a/CHANGES b/CHANGES
index d70406f2647b410e60b7a48409cd791a88d9c89a..f0fe8fdf7ded4a9ed1d18accea5122c29555e3a1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+1332.  [func]          Log TSIG key used w/ outgoing zone transfers.
+
 1331.  [bug]           lwres_getrrsetbyname leaked memory.  [RT #3159]
 
 1330.  [bug]           'rndc stop' failed to cause zones to be flushed
index 6661fbd9a30d68fdbf119fe19ffa2409bf0bf578..988fac1a8f000ec05fedcfecd5798cf2b762b6e2 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: xfrout.c,v 1.107 2001/11/30 01:58:51 gson Exp $ */
+/* $Id: xfrout.c,v 1.108 2002/06/25 04:08:43 marka Exp $ */
 
 #include <config.h>
 
@@ -38,6 +38,7 @@
 #include <dns/result.h>
 #include <dns/soa.h>
 #include <dns/timer.h>
+#include <dns/tsig.h>
 #include <dns/view.h>
 #include <dns/zone.h>
 #include <dns/zt.h>
@@ -889,6 +890,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
        char *journalfile;
        char msg[DNS_RDATACLASS_FORMATSIZE + DNS_NAME_FORMATSIZE
                 + sizeof("zone transfer '/'")];
+       char keyname[DNS_NAME_FORMATSIZE];
        isc_boolean_t is_poll = ISC_FALSE;
 
        switch (reqtype) {
@@ -1134,12 +1136,18 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype) {
 
        CHECK(xfr->stream->methods->first(xfr->stream));
 
+       if (xfr->tsigkey != NULL) {
+               dns_name_format(&xfr->tsigkey->name, keyname, sizeof(keyname));
+       } else
+               keyname[0] = '\0';
        if (is_poll)
                xfrout_log1(client, question_name, question_class,
-                           ISC_LOG_DEBUG(1), "IXFR poll up to date");
+                           ISC_LOG_DEBUG(1), "IXFR poll up to date%s",
+                           (xfr->tsigkey != NULL) ? ": TSIG " : "", keyname);
        else
                xfrout_log1(client, question_name, question_class,
-                           ISC_LOG_INFO, "%s started", mnemonic);
+                           ISC_LOG_INFO, "%s started%s%s", mnemonic,
+                           (xfr->tsigkey != NULL) ? ": TSIG " : "", keyname);
 
        /*
         * Hand the context over to sendstream().  Set xfr to NULL;