From 666cfcab36aa00d4e39e64a776ffcb3c55dbca99 Mon Sep 17 00:00:00 2001 From: Juergen Perlinger Date: Fri, 13 Apr 2018 22:57:11 +0200 Subject: [PATCH] [Bug 3434] ntpd clears STA_UNSYNC on start bk: 5ad119a7P_IHknKQ8oI90K59UuyQGw --- ChangeLog | 2 ++ ntpd/ntp_loopfilter.c | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6558787a9..823949fd2 100644 --- 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 +* [Bug 3434] ntpd clears STA_UNSYNC on start + - applied patch by Miroslav Lichvar * [Bug 2821] minor build issues - applied patches by Christos Zoulas, including real bug fixes diff --git a/ntpd/ntp_loopfilter.c b/ntpd/ntp_loopfilter.c index 8d44fb17d..924d5738b 100644 --- a/ntpd/ntp_loopfilter.c +++ b/ntpd/ntp_loopfilter.c @@ -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 -- 2.47.3