]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 740] Fix kernel/daemon startup drift anomaly
authorHarlan Stenn <stenn@ntp.org>
Wed, 18 Apr 2007 10:05:04 +0000 (06:05 -0400)
committerHarlan Stenn <stenn@ntp.org>
Wed, 18 Apr 2007 10:05:04 +0000 (06:05 -0400)
bk: 4625ed50-xPPKLD1DyAU97_mucKT5A

ChangeLog
conf/beauregard.conf
ntpd/cmd_args.c
ntpd/ntp_loopfilter.c
ntpd/ntp_proto.c

index b8fbc42997dfb1aaaab1d5ab798c12e1e9278570..61691ff4004d1d3d996a3be608aa36b2e4708c0f 100644 (file)
--- 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
index 72f735b17eae45d6e0e4829355ab223863524faf..ea80c02a6bbead377a1930f2679cf85beaf8e127 100644 (file)
@@ -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
index c71167ec1bb6a69b34b03897b8dabf89d60fcab6..5f1651117fd0246c76bea3cb785407956bb7b932 100644 (file)
@@ -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;
                          
index 84d7890273cff605810c8a4929e0567844b5e942..62d68366ab3412e9fc3dd5a231d523a5f436d7e1 100644 (file)
@@ -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 */
index 506ae8a770fc6166d8c90d15a7af1e6f1031f4df..5976ecc97449bd16fa6de92e4bbd4b539499907f 100644 (file)
@@ -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;
 }