Apply jitter test only on NTP sources for now

With refclocks it seems to fail easily, users would have to set the delay
option appropriately.
This commit is contained in:
Miroslav Lichvar 2010-12-16 13:28:44 +01:00
parent 98f79404d6
commit ff69e86559

View file

@ -611,11 +611,12 @@ SRC_SelectSource(unsigned long match_addr)
LOG(LOGS_INFO, LOGF_Sources, "min_distance=%f", min_distance); LOG(LOGS_INFO, LOGF_Sources, "min_distance=%f", min_distance);
#endif #endif
/* Now go through and prune any sources that have excessive /* Now go through and prune any NTP sources that have excessive
variance */ variance */
for (i=0; i<n_sel_sources; i++) { for (i=0; i<n_sel_sources; i++) {
index = sel_sources[i]; index = sel_sources[i];
if (sqrt(sources[index]->sel_info.variance) > min_distance) { if (sources[index]->type == SRC_NTP &&
sqrt(sources[index]->sel_info.variance) > min_distance) {
sel_sources[i] = INVALID_SOURCE; sel_sources[i] = INVALID_SOURCE;
sources[index]->status = SRC_JITTERY; sources[index]->status = SRC_JITTERY;
#if 0 #if 0