[ntp] fix automatic broadcast delay calibration
Miroslav Lichvar
mlichvar at fedoraproject.org
Thu Nov 25 16:11:09 UTC 2010
commit 2bf10432da6bfcdd375ca5e51b47663716e5402e
Author: Miroslav Lichvar <mlichvar at redhat.com>
Date: Thu Nov 25 16:42:07 2010 +0100
fix automatic broadcast delay calibration
ntp-4.2.6p3-delaycalib.patch | 12 ++++++++++++
ntp.spec | 3 +++
2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/ntp-4.2.6p3-delaycalib.patch b/ntp-4.2.6p3-delaycalib.patch
new file mode 100644
index 0000000..4380a09
--- /dev/null
+++ b/ntp-4.2.6p3-delaycalib.patch
@@ -0,0 +1,12 @@
+diff -up ntp-4.2.6p3/ntpd/ntp_proto.c.delaycalib ntp-4.2.6p3/ntpd/ntp_proto.c
+--- ntp-4.2.6p3/ntpd/ntp_proto.c.delaycalib 2010-11-25 15:21:52.578492466 +0100
++++ ntp-4.2.6p3/ntpd/ntp_proto.c 2010-11-25 15:21:55.987625500 +0100
+@@ -1498,7 +1498,7 @@ process_packet(
+ */
+ if (peer->cast_flags & MDF_BCLNT) {
+ peer->cast_flags &= ~MDF_BCLNT;
+- peer->delay = (peer->offset - p_offset) * 2;
++ peer->delay = fabs(peer->offset - p_offset) * 2;
+ }
+ p_del = peer->delay;
+ p_offset += p_del / 2;
diff --git a/ntp.spec b/ntp.spec
index d825e69..d59a21a 100644
--- a/ntp.spec
+++ b/ntp.spec
@@ -76,6 +76,8 @@ Patch15: ntp-4.2.6p2-multiopts.patch
Patch16: ntp-4.2.6p3-nosyspeer.patch
# ntpbz #1670
Patch17: ntp-4.2.6p3-broadcastdelay.patch
+# ntpbz #1671
+Patch18: ntp-4.2.6p3-delaycalib.patch
# handle unknown clock types
Patch50: ntpstat-0.2-clksrc.patch
@@ -163,6 +165,7 @@ cp %{SOURCE11} include
%patch15 -p1 -b .multiopts
%patch16 -p1 -b .nosyspeer
%patch17 -p1 -b .broadcastdelay
+%patch18 -p1 -b .delaycalib
# set default path to sntp KoD database
sed -i 's|/var/db/ntp-kod|%{_localstatedir}/lib/ntp/sntp-kod|' sntp/{sntp.1,main.c}
More information about the scm-commits
mailing list