]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Ignore reselectdist for refclocks
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 25 Jan 2011 16:51:19 +0000 (17:51 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 25 Jan 2011 16:51:19 +0000 (17:51 +0100)
sources.c

index 50a5470f0c3b91ba6b332f9f1649f8ea7509c147..634ede128fc68b3b9e8c8a02a308536aff08b2f0 100644 (file)
--- a/sources.c
+++ b/sources.c
@@ -772,8 +772,10 @@ SRC_SelectSource(unsigned long match_addr)
             continue;
           }
             
-          distance = sources[i]->sel_info.root_distance + reselect_distance +
+          distance = sources[i]->sel_info.root_distance +
             (sources[i]->sel_info.stratum - min_stratum) * stratum_weight;
+          if (sources[i]->type == SRC_NTP)
+            distance += reselect_distance;
 
           if (selected_source_index != INVALID_SOURCE) {