mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-05 03:15:06 -05:00
sources: try to replace NTP sources with bad distance
Similarly to unreachable sources and falsetickers, try to replace sources with distance larger than the limit set by the maxdistance directive with a newly resolved address of the hostname.
This commit is contained in:
@@ -429,9 +429,11 @@ SRC_UpdateReachability(SRC_Instance inst, int reachable)
|
||||
REF_SetUnsynchronised();
|
||||
}
|
||||
|
||||
/* Try to replace NTP sources that are unreachable or falsetickers */
|
||||
if (inst->type == SRC_NTP && (inst->status == SRC_FALSETICKER ||
|
||||
(!inst->reachability && inst->reachability_size == SOURCE_REACH_BITS))) {
|
||||
/* Try to replace NTP sources that are unreachable, falsetickers, or
|
||||
have root distance larger than the allowed maximum */
|
||||
if (inst->type == SRC_NTP &&
|
||||
((!inst->reachability && inst->reachability_size == SOURCE_REACH_BITS) ||
|
||||
inst->status == SRC_FALSETICKER || inst->status == SRC_BAD_DISTANCE)) {
|
||||
NSR_HandleBadSource(inst->ip_addr);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user