]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Fixes from Dave Mills
authorHarlan Stenn <stenn@ntp.org>
Wed, 13 Oct 2004 01:08:44 +0000 (21:08 -0400)
committerHarlan Stenn <stenn@ntp.org>
Wed, 13 Oct 2004 01:08:44 +0000 (21:08 -0400)
bk: 416c801crXuvXvp5JGvkuf9t8FNd4w

ntpd/ntp_loopfilter.c
ntpd/ntp_proto.c

index 21aa552df3dcf04b084988c5681c273bedee2d31..f2f78b33d2081c5d56d4b028e5af24bc1af832ce 100644 (file)
@@ -808,11 +808,11 @@ loop_config(
                 * microseconds.
                 *
                 * Call out the safety patrol. If ntpdate mode or if the
-                * step threshold has been changed by the -x option or
+                * step threshold has been increased by the -x option or
                 * tinker command, kernel discipline is unsafe, so don't
                 * do any of this stuff.
                 */
-               if (mode_ntpdate || clock_max != CLOCK_MAX)
+               if (mode_ntpdate || clock_max > CLOCK_MAX)
                        break;
 
                pll_control = 1;
@@ -885,22 +885,16 @@ loop_config(
 
 #ifdef KERNEL_PLL
                /*
-                * Sanity check. If the kernel is enabled, load the
-                * frequency and light up the loop. If not, set the
-                * kernel frequency to zero and leave the loop dark. In
-                * either case set the time to zero to cancel any
-                * previous nonsense.
+                * Sanity check. If the kernel is available, load the
+                * frequency and light up the loop. Make sure the offset
+                * is zero to cancel any previous nonsense. If you don't
+                * want this initialization, remove the ntp.drift file.
                 */
                if (pll_control) {
                        memset((char *)&ntv, 0, sizeof(ntv));
-                       ntv.modes = MOD_OFFSET | MOD_FREQUENCY;
-                       if (kern_enable) {
-                               ntv.modes |= MOD_STATUS;
-                               ntv.status = STA_PLL;
-                               ntv.freq = (int32)(drift_comp *
-                                   65536e6);
-                       }
-                       (void)ntp_adjtime(&ntv);
+                       ntv.modes = MOD_FREQUENCY;
+                       ntv.freq = (int32)(drift_comp * 65536e6);
+                       ntp_adjtime(&ntv);
                }
 #endif /* KERNEL_PLL */
 #endif /* LOCKCLOCK */
index a63cc203a34f9917674cfad40ee8653714ac2d8d..091fe79e82ac531a95cf80f898b6de91631e53de 100644 (file)
@@ -1268,7 +1268,7 @@ process_packet(
                        if (peer->hmode == MODE_CLIENT)
                                return;
 
-                       peer->flags &= ~FLAG_MCAST;
+                       peer->flags &= ~(FLAG_MCAST | FLAG_BURST);
                }
                p_offset += peer->estbdelay;
                p_del = peer->delay;