]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Report the key name that failed in retry_keyfetch
authorMark Andrews <marka@isc.org>
Wed, 9 Nov 2022 12:12:07 +0000 (12:12 +0000)
committerMark Andrews <marka@isc.org>
Mon, 13 Feb 2023 23:10:05 +0000 (10:10 +1100)
When there are multiple managed trust anchors we need to know the
name of the trust anchor that is failing.  Extend the error message
to include the trust anchor name.

lib/dns/zone.c

index 76f6dc4bc317fedd95d56a70a7ec1263512006c3..951bbfd34c7f4fd6eab9ac2d8cb942a1f4b82520 100644 (file)
@@ -10642,6 +10642,11 @@ retry_keyfetch(dns_keyfetch_t *kfetch, dns_name_t *kname) {
        isc_time_t timenow, timethen;
        dns_zone_t *zone = kfetch->zone;
        bool free_needed;
+       char namebuf[DNS_NAME_FORMATSIZE];
+
+       dns_name_format(kname, namebuf, sizeof(namebuf));
+       dnssec_log(zone, ISC_LOG_WARNING,
+                  "Failed to create fetch for %s DNSKEY update", namebuf);
 
        /*
         * Error during a key fetch; cancel and retry in an hour.
@@ -10653,8 +10658,6 @@ retry_keyfetch(dns_keyfetch_t *kfetch, dns_name_t *kname) {
        dns_rdataset_disassociate(&kfetch->keydataset);
        dns_name_free(kname, zone->mctx);
        isc_mem_putanddetach(&kfetch->mctx, kfetch, sizeof(*kfetch));
-       dnssec_log(zone, ISC_LOG_WARNING,
-                  "Failed to create fetch for DNSKEY update");
 
        if (!DNS_ZONE_FLAG(zone, DNS_ZONEFLG_EXITING)) {
                /* Don't really retry if we are exiting */