From: Harlan Stenn Date: Wed, 13 Oct 2004 01:08:44 +0000 (-0400) Subject: Fixes from Dave Mills X-Git-Tag: NTP_4_2_3~100^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ea7efdf6c2df7aa5dfcd61535903660f378bd20;p=thirdparty%2Fntp.git Fixes from Dave Mills bk: 416c801crXuvXvp5JGvkuf9t8FNd4w --- diff --git a/ntpd/ntp_loopfilter.c b/ntpd/ntp_loopfilter.c index 21aa552df3..f2f78b33d2 100644 --- a/ntpd/ntp_loopfilter.c +++ b/ntpd/ntp_loopfilter.c @@ -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 */ diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c index a63cc203a3..091fe79e82 100644 --- a/ntpd/ntp_proto.c +++ b/ntpd/ntp_proto.c @@ -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;