From: Miroslav Lichvar Date: Thu, 16 Dec 2010 12:28:44 +0000 (+0100) Subject: Apply jitter test only on NTP sources for now X-Git-Tag: 1.25-pre1~23 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ff69e865597429013f379107cb0872b43c35a966;p=thirdparty%2Fchrony.git 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. --- diff --git a/sources.c b/sources.c index 473eeeeb..10e42959 100644 --- a/sources.c +++ b/sources.c @@ -611,11 +611,12 @@ SRC_SelectSource(unsigned long match_addr) LOG(LOGS_INFO, LOGF_Sources, "min_distance=%f", min_distance); #endif - /* Now go through and prune any sources that have excessive + /* Now go through and prune any NTP sources that have excessive variance */ for (i=0; isel_info.variance) > min_distance) { + if (sources[index]->type == SRC_NTP && + sqrt(sources[index]->sel_info.variance) > min_distance) { sel_sources[i] = INVALID_SOURCE; sources[index]->status = SRC_JITTERY; #if 0