From: Miroslav Lichvar Date: Tue, 25 Jul 2017 09:27:24 +0000 (+0200) Subject: reference: don't report zero stratum when synchronised X-Git-Tag: 3.2-pre1~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e8fb11c4330f70f620353c5ba2292edf8068281c;p=thirdparty%2Fchrony.git reference: don't report zero stratum when synchronised If synchronised to a stratum 15 source, return stratum of 16 instead of 0 in the tracking report. It will not match the value in server mode packets, but it should be less confusing. --- diff --git a/reference.c b/reference.c index 488e58c7..6b9ccc16 100644 --- a/reference.c +++ b/reference.c @@ -1366,7 +1366,7 @@ REF_GetTrackingReport(RPT_TrackingReport *rep) &rep->ref_id, &rep->ref_time, &rep->root_delay, &rep->root_dispersion); - if (rep->stratum == NTP_MAX_STRATUM) + if (rep->stratum == NTP_MAX_STRATUM && !synchronised) rep->stratum = 0; rep->ip_addr.family = IPADDR_UNSPEC;