]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Match skew in ntp_core to sourcestats skew
authorMiroslav Lichvar <mlichvar@redhat.com>
Fri, 12 Aug 2011 12:52:35 +0000 (14:52 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 12 Aug 2011 13:38:05 +0000 (15:38 +0200)
ntp_core.c

index 4915316c821ec0592362b683ea2d345ef87007b7..d2ba6d88d2b3e637de544b4307a98101bf246715 100644 (file)
@@ -894,7 +894,7 @@ receive_packet(NTP_Packet *message, struct timeval *now, double now_err, NCR_Ins
     sample_time = local_average;
     
     /* Calculate skew */
-    skew = source_freq_hi - source_freq_lo;
+    skew = (source_freq_hi - source_freq_lo) / 2.0;
     
     /* and then calculate peer dispersion */
     epsilon = LCL_GetSysPrecisionAsQuantum() + now_err + skew * local_interval;