]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[BUG 1573] Miscalculation of offset in sntp.
authorLinux Karlsson <karlsson@ntp.org>
Wed, 18 Aug 2010 09:26:41 +0000 (11:26 +0200)
committerLinux Karlsson <karlsson@ntp.org>
Wed, 18 Aug 2010 09:26:41 +0000 (11:26 +0200)
bk: 4c6ba751oCXzWDVxHcKKbt9ahnpamw

ChangeLog
sntp/main.c

index 0cca80e8e18748ecf3e28be878d17776d3f93d48..1c3368670eecb5fe03d5f38eec38d38c7167b6ff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 ---
 
+* [Bug 1573] Miscalculation of offset in sntp.
 * [Bug 1595] empty last line in key file causes duplicate key to be added
 * [Bug 1597] packet processing ignores RATE KoD packets, because of
   a bug in string comparison.
index fd4ff8eccc0ffb6736d284a022dd4843f6e3a080..943e64319d462fa08791005ab3ee1ed10a9a1206 100644 (file)
@@ -324,8 +324,8 @@ on_wire (
                        L_SUB(&tmp, &p_org);
                        LFPTOD(&tmp, t21);
                        TVTOTS(&tv_dst, &dst);
-                       tmp = dst;
-                       L_SUB(&tmp, &p_xmt);
+                       tmp = p_xmt;
+                       L_SUB(&tmp, &dst);
                        LFPTOD(&tmp, t34);
                        offset = (t21 + t34) / 2.;
                        delta = t21 - t34;