]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] Prevent junk from being logged when using "also-notify { <ip> key <keyname...
authorMichał Kępień <michal@isc.org>
Wed, 8 Nov 2017 08:21:23 +0000 (09:21 +0100)
committerMichał Kępień <michal@isc.org>
Wed, 8 Nov 2017 08:21:23 +0000 (09:21 +0100)
lib/dns/zone.c

index b62dad1ecca2d53c2ba7425d171881f2c0c7fccd..37be1630df8ef6d78c7f7575ef5b666b8d19a3a1 100644 (file)
@@ -10947,13 +10947,13 @@ notify_send_toaddr(isc_task_t *task, isc_event_t *event) {
        if (result != ISC_R_SUCCESS)
                goto cleanup;
 
+       isc_sockaddr_format(&notify->dst, addrbuf, sizeof(addrbuf));
        if (notify->key != NULL) {
                /* Transfer ownership of key */
                key = notify->key;
                notify->key = NULL;
        } else {
                isc_netaddr_fromsockaddr(&dstip, &notify->dst);
-               isc_sockaddr_format(&notify->dst, addrbuf, sizeof(addrbuf));
                result = dns_view_getpeertsig(notify->zone->view, &dstip, &key);
                if (result != ISC_R_SUCCESS && result != ISC_R_NOTFOUND) {
                        notify_log(notify->zone, ISC_LOG_ERROR,