]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
sources: try to replace jittery sources
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 5 Jan 2017 11:03:36 +0000 (12:03 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 6 Jan 2017 12:12:19 +0000 (13:12 +0100)
Similarly to falsetickers, distant, and unreachable sources, try to
replace sources that have jitter larger than maxjitter.

sources.c

index 5c9bbe3d80e08497c28c3db21da3de2b8b30cb2b..f91ffb15be94e6fd786e70679443cc246a2ed69d 100644 (file)
--- a/sources.c
+++ b/sources.c
@@ -425,10 +425,11 @@ SRC_UpdateReachability(SRC_Instance inst, int reachable)
   }
 
   /* Try to replace NTP sources that are unreachable, falsetickers, or
-     have root distance larger than the allowed maximum */
+     have root distance or jitter larger than the allowed maximums */
   if (inst->type == SRC_NTP &&
       ((!inst->reachability && inst->reachability_size == SOURCE_REACH_BITS) ||
-       inst->status == SRC_FALSETICKER || inst->status == SRC_BAD_DISTANCE)) {
+       inst->status == SRC_BAD_DISTANCE || inst->status == SRC_JITTERY ||
+       inst->status == SRC_FALSETICKER)) {
     NSR_HandleBadSource(inst->ip_addr);
   }
 }