]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
ntp: reset tentative flag only when sample was accumulated
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 3 Aug 2016 10:13:22 +0000 (12:13 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 11 Aug 2016 08:45:48 +0000 (10:45 +0200)
When selecting sources from a pool, ignore responses which didn't
produce a new sample. Sources with acceptable delay (as configured by
the maxdelay* options) should be prefered.

ntp_core.c
ntp_sources.c

index ae42b5b575310ed9fa0d50f17932ae4b621a8b31..7ea4a6c7b3736be8e2434a2a3d0fa356dd21a90f 100644 (file)
@@ -1519,7 +1519,7 @@ receive_packet(NTP_Packet *message, struct timeval *now, double now_err, NCR_Ins
             pkt_root_delay, pkt_root_dispersion);
   }            
 
-  return valid_packet;
+  return good_packet;
 }
 
 /* ================================================== */
index dbd4748639fed35ba10b97f566dee220ea09466f..32407b4f2821abebe62bac02566011a07faa8b1f 100644 (file)
@@ -792,7 +792,7 @@ NSR_ProcessReceive(NTP_Packet *message, struct timeval *now, double now_err, NTP
       return;
 
     if (record->tentative) {
-      /* This was the first valid reply from the source */
+      /* This was the first good reply from the source */
       record->tentative = 0;
 
       if (record->pool != INVALID_POOL) {