]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
ntp: Fix syncing with local clock
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 15 Dec 2015 12:37:16 +0000 (12:37 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 15 Dec 2015 12:39:19 +0000 (12:39 +0000)
This is a bug that was introduced with the latest release
from upstream

Fixes #10997
Upstream: http://bugs.ntp.org/show_bug.cgi?id=2965

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/core/96/filelists/ntp [new symlink]
lfs/ntp
src/patches/ntp-fix-sycing-with-local-clock.patch [new file with mode: 0644]

diff --git a/config/rootfiles/core/96/filelists/ntp b/config/rootfiles/core/96/filelists/ntp
new file mode 120000 (symlink)
index 0000000..7542d86
--- /dev/null
@@ -0,0 +1 @@
+../../../common/ntp
\ No newline at end of file
diff --git a/lfs/ntp b/lfs/ntp
index c03624ea19ed57ed443a9b7884b428de1bdb0cfd..7c23a3c4077a8be422fa546197e5b8e5c1a1a211 100644 (file)
--- a/lfs/ntp
+++ b/lfs/ntp
@@ -70,6 +70,7 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/ntp-fix-sycing-with-local-clock.patch
        cd $(DIR_APP) && \
                ./configure \
                        --prefix=/usr \
diff --git a/src/patches/ntp-fix-sycing-with-local-clock.patch b/src/patches/ntp-fix-sycing-with-local-clock.patch
new file mode 100644 (file)
index 0000000..bdca2e7
--- /dev/null
@@ -0,0 +1,23 @@
+# http://bugs.ntp.org/show_bug.cgi?id=2965
+
+From 6f68f1f0fd764f0006506e3957a5b8116726d443 Mon Sep 17 00:00:00 2001
+From:  <burnicki/martin@pc-martin4.>
+Date: Mon, 16 Nov 2015 11:59:55 +0100
+Subject: [PATCH] [Bug 2965] Local clock didn't work since 4.2.8p4
+
+---
+ ntpd/refclock_local.c | 1 +
+ 1 files changed, 1 insertions(+)
+
+diff --git a/ntpd/refclock_local.c b/ntpd/refclock_local.c
+index d816c55..8c0f74f 100644
+--- a/ntpd/refclock_local.c
++++ b/ntpd/refclock_local.c
+@@ -205,6 +205,7 @@ local_poll(
+       pp->disp = 0;
+       pp->jitter = 0;
+ #else /* KERNEL_PLL LOCKCLOCK */
++      pp->leap = LEAP_NOWARNING;
+       pp->disp = DISPERSION;
+       pp->jitter = 0;
+ #endif /* KERNEL_PLL LOCKCLOCK */