]> git.ipfire.org Git - thirdparty/chrony.git/commit
clientlog: undo clock adjustments in updated TX timestamps
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 25 Oct 2021 15:00:28 +0000 (17:00 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Wed, 27 Oct 2021 14:22:12 +0000 (16:22 +0200)
commitbc33e1cda11c93097dfa726d7dd7870dec172158
tree4a0b1fd57fbbe9bf138bdb09795278d96583510b
parent189bf9c53612998515c3f131925c95f0fcf9de52
clientlog: undo clock adjustments in updated TX timestamps

When the server clock was updated between saving of the RX timestamp and
updating the TX timestamp, a client using interleaved mode with the four
timestamps which minimize error in measured delay (e.g. chrony) had the
server clock adjustment included in the measured delay, which could
disrupt the sample filtering and weighting.

Add a handler to track the slew epoch and remember the last offset. Undo
the adjustment in TX timestamps which have their RX timestamp in the
previous epoch to fix the delay observed by the clients.

If an unknown clock step is detected, drop all timestamps.
clientlog.c
clientlog.h
ntp_core.c
test/unit/clientlog.c