]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
add serial number to "transfer ended" log messages
authorEvan Hunt <each@isc.org>
Thu, 27 Feb 2020 19:43:03 +0000 (11:43 -0800)
committerEvan Hunt <each@isc.org>
Fri, 6 Mar 2020 01:20:16 +0000 (17:20 -0800)
lib/dns/xfrin.c
lib/ns/xfrout.c

index 4c5f2e820cd7f77ca9f52e9c0ca28609ec9c707b..c5a6d2d351ec509bd536a2e07e28baa6d084850d 100644 (file)
@@ -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);
index 4178f9293ec7d4a59cf444f6613d2c9de6f15ae5..89bddad338045354f1ecddc195f1883a145d528d 100644 (file)
@@ -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 */