]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 861] leap info was not being transmitted
authorHarlan Stenn <stenn@ntp.org>
Sun, 10 Aug 2008 07:11:51 +0000 (03:11 -0400)
committerHarlan Stenn <stenn@ntp.org>
Sun, 10 Aug 2008 07:11:51 +0000 (03:11 -0400)
bk: 489e94b7y9FDoTokpGCTAJN8mW9hpA

ChangeLog
ntpd/ntp_crypto.c
ntpd/ntp_timer.c
ntpd/refclock_local.c

index d024b2a95b8fe8bd3b6e441d57e41e2abd3765b1..23968058f2565086f498cfa51e1121303bc43a76 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+* [Bug 861] leap info was not being transmitted.
 * [Bug 1046] refnumtoa.c is using the wrong header file.
 * [Bug 1047] enable/disable options processing fix.
 * header file cleanup.
index 9c0b251a47a9a15d9f125fdee3ce0cc43843eb94..8929fa80b47c01d245c6486e013452225f4d1d61 100644 (file)
@@ -572,7 +572,7 @@ crypto_recv(
                                fstamp |= CRYPTO_FLAG_COOK;
                        else if (hismode == MODE_SERVER)
                                fstamp |= CRYPTO_FLAG_AUTO;
-                       if (!(fstamp & CRYPTO_FLAG_LEAP))
+                       if (!(fstamp & CRYPTO_FLAG_TAI))
                                fstamp |= CRYPTO_FLAG_LEAP;
                        RAND_bytes((u_char *)&peer->hcookie, 4);
                        peer->crypto = fstamp;
@@ -1844,7 +1844,7 @@ crypto_update(void)
        if (EVP_SignFinal(&ctx, tai_leap.sig, &len, sign_pkey))
                tai_leap.siglen = htonl(len);
        if (leap_sec > 0)
-               crypto_flags |= CRYPTO_FLAG_LEAP;
+               crypto_flags |= CRYPTO_FLAG_TAI;
        snprintf(statstr, NTP_MAXSTRLEN, "signature update ts %u",
            ntohl(hostval.tstamp)); 
        record_crypto_stats(NULL, statstr);
index 40753a8722c8722f1f60108b8ddc55b7d8ab7566..b28b9caf0edab4e372db94e8c177443d4053580a 100644 (file)
@@ -349,7 +349,7 @@ timer(void)
         */
        if (leapsec > 0) {
                leapsec--;
-               if (leap_sec == 0) {
+               if (leapsec == 0) {
                        sys_leap = LEAP_NOWARNING;
                        sys_tai = leap_tai;
 #ifdef KERNEL_PLL
index 7538a780b3569c878521a2317150d74bcb3ab616..ffc052c0a9f7d0f683d564949141e0a93ae63980 100644 (file)
@@ -239,7 +239,10 @@ local_poll(
        pp->disp = 0;
        pp->jitter = 0;
 #else /* KERNEL_PLL LOCKCLOCK */
-       pp->leap = LEAP_NOWARNING;
+       if (pp->sloppyclockflag & CLK_FLAG1)
+               pp->leap = LEAP_ADDSECOND;
+       else
+               pp->leap = LEAP_NOWARNING;
        pp->disp = DISPERSION;
        pp->jitter = 0;
 #endif /* KERNEL_PLL LOCKCLOCK */