]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 3434] ntpd clears STA_UNSYNC on start
authorJuergen Perlinger <perlinger@ntp.org>
Fri, 13 Apr 2018 20:57:11 +0000 (22:57 +0200)
committerJuergen Perlinger <perlinger@ntp.org>
Fri, 13 Apr 2018 20:57:11 +0000 (22:57 +0200)
bk: 5ad119a7P_IHknKQ8oI90K59UuyQGw

ChangeLog
ntpd/ntp_loopfilter.c

index 6558787a9a353eb1eb61cc7cd179fb5683ff2566..823949fd2fff5734403d9c2803237e54582465b8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -27,6 +27,8 @@
   - initial patch by Hal Murray; also fixed refclock_report() trouble
 * [Bug 3456] Use uintptr_t rather than size_t to store an integer in a pointer
   - According to Brooks Davis, there was only one location <perlinger@ntp.org>
+* [Bug 3434] ntpd clears STA_UNSYNC on start <perlinger@ntp.org>
+  - applied patch by Miroslav Lichvar
 * [Bug 2821] minor build issues <perlinger@ntp.org>
   - applied patches by Christos Zoulas, including real bug fixes
 
index 8d44fb17db4e06ce8311613ee8d1098224340c48..924d5738b1e47c0694128454a9f312ec8066b87d 100644 (file)
@@ -1099,10 +1099,14 @@ start_kern_loop(void)
        pll_control = TRUE;
        ZERO(ntv);
        ntv.modes = MOD_BITS;
-       ntv.status = STA_PLL;
-       ntv.maxerror = MAXDISPERSE;
-       ntv.esterror = MAXDISPERSE;
-       ntv.constant = sys_poll; /* why is it that here constant is unconditionally set to sys_poll, whereas elsewhere is is modified depending on nanosecond vs. microsecond kernel? */
+       ntv.status = STA_PLL | STA_UNSYNC;
+       ntv.maxerror = MAXDISPERSE * 1.0e6;
+       ntv.esterror = MAXDISPERSE * 1.0e6;
+       ntv.constant = sys_poll;
+       /*             ^^^^^^^^ why is it that here constant is
+        * unconditionally set to sys_poll, whereas elsewhere is is
+        * modified depending on nanosecond vs. microsecond kernel?
+        */
 #ifdef SIGSYS
        /*
         * Use sigsetjmp() to save state and then call ntp_adjtime(); if