]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 2855] Report leap smear in the REFID. Harlan Stenn.
authorHarlan Stenn <stenn@ntp.org>
Sat, 27 Jun 2015 05:12:21 +0000 (05:12 +0000)
committerHarlan Stenn <stenn@ntp.org>
Sat, 27 Jun 2015 05:12:21 +0000 (05:12 +0000)
bk: 558e30b540vJOAA_EfUq9dQ7Z_JqNw

ChangeLog
ntpd/ntp_proto.c

index 6b85e01976198ffae30253f532e8f42684445b7a..d35dd9422937d522ab953fe39730b55fe5447a20 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 ---
 
 * [Bug 2855] Parser fix for conditional leap smear code.  Harlan Stenn.
+* [Bug 2855] Report leap smear in the REFID.  Harlan Stenn.
 * refidsmear test cleanup.  Tomasz Flendrich.
 * refidsmear function support and tests.  Harlan Stenn.
 * sntp/tests/Makefile.am: remove g_nameresolution.cpp as it tested
index 6642af5fd7a7e21595eaebdc94984d195ec4a2ec..40624066746f5456da9da0f939286f927c8f46ba 100644 (file)
@@ -14,6 +14,7 @@
 #include "ntp_control.h"
 #include "ntp_string.h"
 #include "ntp_leapsec.h"
+#include "refidsmear.h"
 
 #include <stdio.h>
 #ifdef HAVE_LIBSCF_H
@@ -3534,11 +3535,16 @@ fast_xmit(
                xpkt.rootdelay = HTONS_FP(DTOFP(sys_rootdelay));
                xpkt.rootdisp = HTONS_FP(DTOUFP(sys_rootdisp));
 
-
 #ifdef LEAP_SMEAR
                this_ref_time = sys_reftime;
-               if (leap_smear.in_progress)
+               if (leap_smear.in_progress) {
                        leap_smear_add_offs(&this_ref_time, NULL);
+                       xpkt.refid = convertLFPToRefID(leap_smear.offset);
+                       DPRINTF(2, ("fast_xmit: leap_smear.in_progress: refid %8x, smear %s\n",
+                               ntohl(xpkt.refid),
+                               lfptoa(&leap_smear.offset, 8)
+                               ));
+               }
                HTONL_FP(&this_ref_time, &xpkt.reftime);
 #else
                HTONL_FP(&sys_reftime, &xpkt.reftime);