mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 02:05:06 -05:00
Further to the discussion with John Hasler, here are new diffs which handles the incoming stratum 0 claim of a remote server by redefining the incoming stratum as one bigger than the Max if it is zero, as per the NTP version 4 documentation. If the incoming stratum is zero it sets it to NTP_MAX_STRATUM+1 . If our current stratum is larger than the NTP_MAX_STRATUM, the outgoing stratum is also set to zero as per the suggestions in the NTP docs. Introduces the new NTP_INVALID_STRATUM of 0 for doing these tests or setting the outgoing stratum. It is unclear whether chrony wants to follow NTP in setting the outgoing stratum to zero if it is unknown or invalid, rather than a number larger than the max stratum. Setting it to zero seems silly, since zero is already used to define the stratum of a hardware clock (GPS, atomic, etc). This seems ripe for confusion. But the fact that the ntp docs state to do this, and that ntp servers (eg ntp.ubc.ca) are already doing this (using 0 to mean invalid) means that chrony has to handle it on the incoming packets from the servers.
57 KiB
57 KiB