From e8fb11c4330f70f620353c5ba2292edf8068281c Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 25 Jul 2017 11:27:24 +0200 Subject: [PATCH] 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. --- reference.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference.c b/reference.c index 488e58c..6b9ccc1 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;