From: Evan Hunt Date: Thu, 27 Feb 2020 19:43:03 +0000 (-0800) Subject: add serial number to "transfer ended" log messages X-Git-Tag: v9.17.1~71^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89615c2ab5abe1156fb90a743e68e73eda3134ff;p=thirdparty%2Fbind9.git add serial number to "transfer ended" log messages --- diff --git a/lib/dns/xfrin.c b/lib/dns/xfrin.c index 4c5f2e820cd..c5a6d2d351e 100644 --- a/lib/dns/xfrin.c +++ b/lib/dns/xfrin.c @@ -1521,10 +1521,10 @@ maybe_free(dns_xfrin_ctx_t *xfr) { xfrin_log(xfr, ISC_LOG_INFO, "Transfer completed: %d messages, %d records, " "%" PRIu64 " bytes, " - "%u.%03u secs (%u bytes/sec)", + "%u.%03u secs (%u bytes/sec) (serial %u)", xfr->nmsg, xfr->nrecs, xfr->nbytes, (unsigned int)(msecs / 1000), (unsigned int)(msecs % 1000), - (unsigned int)persec); + (unsigned int)persec, xfr->end_serial); if (xfr->socket != NULL) { isc_socket_detach(&xfr->socket); diff --git a/lib/ns/xfrout.c b/lib/ns/xfrout.c index 4178f9293ec..89bddad3380 100644 --- a/lib/ns/xfrout.c +++ b/lib/ns/xfrout.c @@ -667,6 +667,7 @@ typedef struct { bool shuttingdown; bool poll; const char *mnemonic; /* Style of transfer */ + uint32_t end_serial; /* Serial number after XFR is done */ struct xfr_stats stats; /*%< Transfer statistics */ } xfrout_ctx_t; @@ -1089,6 +1090,7 @@ have_stream: (format == dns_many_answers) ? true : false, &xfr); } + xfr->end_serial = current_serial; xfr->mnemonic = mnemonic; stream = NULL; quota = NULL; @@ -1705,10 +1707,11 @@ xfrout_senddone(isc_nmhandle_t *handle, isc_result_t result, void *arg) { "%s ended: " "%" PRIu64 " messages, %" PRIu64 " records, " "%" PRIu64 " bytes, " - "%u.%03u secs (%u bytes/sec)", + "%u.%03u secs (%u bytes/sec) (serial %u)", xfr->mnemonic, xfr->stats.nmsg, xfr->stats.nrecs, xfr->stats.nbytes, (unsigned int)(msecs / 1000), - (unsigned int)(msecs % 1000), (unsigned int)persec); + (unsigned int)(msecs % 1000), (unsigned int)persec, + xfr->end_serial); xfrout_ctx_destroy(&xfr); /* We're done, unreference the handle */