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.
This commit is contained in:
Miroslav Lichvar 2017-07-25 11:27:24 +02:00
parent 01a29c7a11
commit e8fb11c433

View file

@ -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;