From 93d6eed9a48a509e910fb4e248a70de9cdc15f0c Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 15 Dec 2015 12:37:16 +0000 Subject: [PATCH] ntp: Fix syncing with local clock 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 --- config/rootfiles/core/96/filelists/ntp | 1 + lfs/ntp | 1 + .../ntp-fix-sycing-with-local-clock.patch | 23 +++++++++++++++++++ 3 files changed, 25 insertions(+) create mode 120000 config/rootfiles/core/96/filelists/ntp create mode 100644 src/patches/ntp-fix-sycing-with-local-clock.patch diff --git a/config/rootfiles/core/96/filelists/ntp b/config/rootfiles/core/96/filelists/ntp new file mode 120000 index 000000000..7542d86cb --- /dev/null +++ b/config/rootfiles/core/96/filelists/ntp @@ -0,0 +1 @@ +../../../common/ntp \ No newline at end of file diff --git a/lfs/ntp b/lfs/ntp index c03624ea1..7c23a3c40 100644 --- 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 index 000000000..bdca2e7a8 --- /dev/null +++ b/src/patches/ntp-fix-sycing-with-local-clock.patch @@ -0,0 +1,23 @@ +# http://bugs.ntp.org/show_bug.cgi?id=2965 + +From 6f68f1f0fd764f0006506e3957a5b8116726d443 Mon Sep 17 00:00:00 2001 +From: +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 */ -- 2.39.2