From: Harlan Stenn Date: Wed, 18 Apr 2007 10:05:04 +0000 (-0400) Subject: [Bug 740] Fix kernel/daemon startup drift anomaly X-Git-Tag: NTP_4_2_5P23~1^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab9187aadaf29df80596b091b5d1d48907cbb2ab;p=thirdparty%2Fntp.git [Bug 740] Fix kernel/daemon startup drift anomaly bk: 4625ed50-xPPKLD1DyAU97_mucKT5A --- diff --git a/ChangeLog b/ChangeLog index b8fbc4299..61691ff40 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* [Bug 740] Fix kernel/daemon startup drift anomaly. * refclock_wwv.c fixes from Dave Mills. * [Bug 810] Fix ntp-keygen documentation. * [Bug 789] Fix multicast client crypto authentication and make sure arriving diff --git a/conf/beauregard.conf b/conf/beauregard.conf index 72f735b17..ea80c02a6 100644 --- a/conf/beauregard.conf +++ b/conf/beauregard.conf @@ -1,6 +1,6 @@ # # NTP configuration file (ntp.conf) -# bearegard.udel.edu +# beauregard.udel.edu # server 127.127.18.1 # NIST ACTS modem driver fudge 127.127.18.1 time1 .0035 diff --git a/ntpd/cmd_args.c b/ntpd/cmd_args.c index c71167ec1..5f1651117 100644 --- a/ntpd/cmd_args.c +++ b/ntpd/cmd_args.c @@ -179,9 +179,10 @@ getCmdOpts( } while (--ct > 0); } - if (HAVE_OPT( SLEW )) + if (HAVE_OPT( SLEW )) { clock_max = 600; - + kern_enable = 0; + } if (HAVE_OPT( UPDATEINTERVAL )) { long val = OPT_VALUE_UPDATEINTERVAL; diff --git a/ntpd/ntp_loopfilter.c b/ntpd/ntp_loopfilter.c index 84d789027..62d68366a 100644 --- a/ntpd/ntp_loopfilter.c +++ b/ntpd/ntp_loopfilter.c @@ -143,9 +143,9 @@ int pll_status; /* status bits for kernel pll */ /* * Clock state machine control flags */ -int ntp_enable; /* clock discipline enabled */ +int ntp_enable = 1; /* clock discipline enabled */ int pll_control; /* kernel support available */ -int kern_enable; /* kernel support enabled */ +int kern_enable = 1; /* kernel support enabled */ int pps_enable; /* kernel PPS discipline enabled */ int ext_enable; /* external clock enabled */ int pps_stratum; /* pps stratum */ @@ -338,8 +338,6 @@ local_clock( */ clock_frequency = flladj = plladj = 0; mu = peer->epoch - sys_clocktime; - if (clock_max == 0 || clock_max > 0.5) - kern_enable = 0; rval = 1; if (fabs(fp_offset) > clock_max && clock_max > 0) { switch (state) { @@ -1002,6 +1000,8 @@ loop_config( */ case LOOP_MAX: /* step threshold */ clock_max = freq; + if (clock_max == 0 || clock_max > 0.5) + kern_enable = 0; break; case LOOP_PANIC: /* panic threshold */ diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c index 506ae8a77..5976ecc97 100644 --- a/ntpd/ntp_proto.c +++ b/ntpd/ntp_proto.c @@ -3210,14 +3210,6 @@ init_proto(void) #ifdef OPENSSL sys_automax = 1 << NTP_AUTOMAX; #endif /* OPENSSL */ - - /* - * Default these to enable - */ - ntp_enable = 1; -#ifndef KERNEL_FLL_BUG - kern_enable = 1; -#endif pps_enable = 0; stats_control = 1; }