2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

Merge branch '1058-also-log-the-tsig-name-when-sending-notify' into 'master'

Resolve "Also log the TSIG name when sending notify"

Closes #1058

See merge request isc-projects/bind9!1963
This commit is contained in:
Mark Andrews
2019-06-04 20:34:58 -04:00
3 changed files with 16 additions and 3 deletions

View File

@@ -1,3 +1,6 @@
5246. [func] Log TSIG if appropriate in 'sending notify to' message.
[GL #1058]
5245. [cleanup] Reduce logging level for IXFR up-to-date poll
responses. [GL #1009]

View File

@@ -230,6 +230,8 @@ do
done
grep "test string" dig.out.b.ns5.test$n > /dev/null || ret=1
grep "test string" dig.out.c.ns5.test$n > /dev/null || ret=1
grep "sending notify to 10.53.0.5#[0-9]* : TSIG (b)" ns5/named.run > /dev/null || ret=1
grep "sending notify to 10.53.0.5#[0-9]* : TSIG (c)" ns5/named.run > /dev/null || ret=1
[ $ret = 0 ] || echo_i "failed"
status=`expr $ret + $status`

View 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;