From 57e84efd67a29783d4caa833bfa9c01cf1b9ae9f Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Sat, 26 Oct 2024 07:50:23 +1100 Subject: [PATCH] Update zone transfer summary Print the expire option in the zone transfer summary. This is currently emitted in a DEBUG(1) message. (cherry picked from commit 5253c75b7a51bd39521755a487658deba2402f9e) --- lib/dns/xfrin.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/dns/xfrin.c b/lib/dns/xfrin.c index 1c95441e1d..2a18dad441 100644 --- a/lib/dns/xfrin.c +++ b/lib/dns/xfrin.c @@ -1998,6 +1998,8 @@ static void xfrin_destroy(dns_xfrin_t *xfr) { uint64_t msecs, persec; isc_time_t now = isc_time_now(); + char expireopt[sizeof("4000000000")] = { 0 }; + const char *sep = ""; REQUIRE(VALID_XFRIN(xfr)); @@ -2024,15 +2026,22 @@ xfrin_destroy(dns_xfrin_t *xfr) { msecs = 1; } persec = (atomic_load_relaxed(&xfr->nbytes) * 1000) / msecs; + + if (xfr->expireoptset) { + sep = ", expire option "; + snprintf(expireopt, sizeof(expireopt), "%u", xfr->expireopt); + } + xfrin_log(xfr, ISC_LOG_INFO, "Transfer completed: %d messages, %d records, " "%" PRIu64 " bytes, " - "%u.%03u secs (%u bytes/sec) (serial %" PRIuFAST32 ")", + "%u.%03u secs (%u bytes/sec) (serial %" PRIuFAST32 "%s%s)", atomic_load_relaxed(&xfr->nmsg), atomic_load_relaxed(&xfr->nrecs), atomic_load_relaxed(&xfr->nbytes), (unsigned int)(msecs / 1000), (unsigned int)(msecs % 1000), - (unsigned int)persec, atomic_load_relaxed(&xfr->end_serial)); + (unsigned int)persec, atomic_load_relaxed(&xfr->end_serial), + sep, expireopt); /* Cleanup unprocessed IXFR data */ struct cds_wfcq_node *node, *next;