]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
ntp: include message precision in peer dispersion
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 28 May 2015 10:58:20 +0000 (12:58 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 28 May 2015 11:49:43 +0000 (13:49 +0200)
ntp_core.c

index f77758effb8a23358fd3e51ba564e011d6c2524d..80213cdc80828d3cfba28024df5bc5a829ebccc4 100644 (file)
@@ -1230,7 +1230,8 @@ receive_packet(NTP_Packet *message, struct timeval *now, double now_err, NCR_Ins
     inst->local_ntp_tx.hi = inst->local_ntp_tx.lo = 0;
 
   if (valid_packet) {
-    precision = LCL_GetSysPrecisionAsQuantum();
+    precision = LCL_GetSysPrecisionAsQuantum() +
+                UTI_Log2ToDouble(message->precision);
 
     SRC_GetFrequencyRange(inst->source, &source_freq_lo, &source_freq_hi);