]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
log TSIG key name when sending notify
authorMark Andrews <marka@isc.org>
Mon, 27 May 2019 01:00:34 +0000 (11:00 +1000)
committerMark Andrews <marka@isc.org>
Wed, 5 Jun 2019 00:18:36 +0000 (10:18 +1000)
lib/dns/zone.c

index 721f160ffbb9e74d2f743c85c3e75e649521be44..97c0c40985ab521a80b830541a0f9dae61ae9fde 100644 (file)
@@ -11474,9 +11474,17 @@ notify_send_toaddr(isc_task_t *task, isc_event_t *event) {
                }
        }
 
-       /* XXX: should we log the tsig key too? */
-       notify_log(notify->zone, ISC_LOG_DEBUG(3), "sending notify to %s",
-                  addrbuf);
+       if (key != NULL) {
+               char namebuf[DNS_NAME_FORMATSIZE];
+
+               dns_name_format(&key->name, namebuf, sizeof(namebuf));
+               notify_log(notify->zone, ISC_LOG_DEBUG(3),
+                          "sending notify to %s : TSIG (%s)",
+                          addrbuf, namebuf);
+       } else {
+               notify_log(notify->zone, ISC_LOG_DEBUG(3),
+                          "sending notify to %s", addrbuf);
+       }
        options = 0;
        if (notify->zone->view->peers != NULL) {
                dns_peer_t *peer = NULL;