From: Linux Karlsson Date: Wed, 18 Aug 2010 09:26:41 +0000 (+0200) Subject: [BUG 1573] Miscalculation of offset in sntp. X-Git-Tag: NTP_4_2_6P3_BETA1~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=025e5ae6000f43236ad542e33e95b7ccf6a6f141;p=thirdparty%2Fntp.git [BUG 1573] Miscalculation of offset in sntp. bk: 4c6ba751oCXzWDVxHcKKbt9ahnpamw --- diff --git a/ChangeLog b/ChangeLog index 0cca80e8e..1c3368670 100644 --- 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. diff --git a/sntp/main.c b/sntp/main.c index fd4ff8ecc..943e64319 100644 --- a/sntp/main.c +++ b/sntp/main.c @@ -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;