From: Harlan Stenn Date: Sat, 27 Jun 2015 05:12:21 +0000 (+0000) Subject: [Bug 2855] Report leap smear in the REFID. Harlan Stenn. X-Git-Tag: NTP_4_2_8P3_RC3~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1495dce0b6fe39710fb995bc0dcf47a67959405;p=thirdparty%2Fntp.git [Bug 2855] Report leap smear in the REFID. Harlan Stenn. bk: 558e30b540vJOAA_EfUq9dQ7Z_JqNw --- diff --git a/ChangeLog b/ChangeLog index 6b85e0197..d35dd9422 100644 --- 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 diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c index 6642af5fd..406240667 100644 --- a/ntpd/ntp_proto.c +++ b/ntpd/ntp_proto.c @@ -14,6 +14,7 @@ #include "ntp_control.h" #include "ntp_string.h" #include "ntp_leapsec.h" +#include "refidsmear.h" #include #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);