sources: consider only reachable orphans for selection
Ignore orphan sources that are unreachable (but still have usable stats) to have a quick and consistent source selection between orphans. This also fixes the "Unknown local refid in orphan mode" error appearing when a selected orphan source is removed, as the source is marked as unreachable and the selection runs with disabled NTP instance before the source instance is actually removed.
This commit is contained in:
parent
1834ee05e5
commit
26b87b844d
1 changed files with 1 additions and 1 deletions
|
@ -719,7 +719,7 @@ SRC_SelectSource(SRC_Instance updated_inst)
|
|||
if (si->stratum >= orphan_stratum && sources[i]->type == SRC_NTP) {
|
||||
sources[i]->status = SRC_ORPHAN;
|
||||
|
||||
if (si->stratum == orphan_stratum &&
|
||||
if (si->stratum == orphan_stratum && sources[i]->reachability &&
|
||||
(orphan_source == INVALID_SOURCE ||
|
||||
sources[i]->ref_id < sources[orphan_source]->ref_id))
|
||||
orphan_source = i;
|
||||
|
|
Loading…
Reference in a new issue