]> git.ipfire.org Git - thirdparty/chrony.git/commit
ntp: optimize detection of clients using interleaved mode
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 14 Oct 2021 10:03:49 +0000 (12:03 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 14 Oct 2021 15:17:05 +0000 (17:17 +0200)
commit5f4cbaab7e0e01c165fff657f2b53489c949fee4
tree7fcb6b3d48ec6a8f18b73302d811306c80cb7971
parent7a80647fb44a733ba5895898003376c319aea888
ntp: optimize detection of clients using interleaved mode

Use the lowest bit of the server RX and TX timestamp as a flag
indicating RX timestamp. This allows the server to detect potential
interleaved requests without having to save all its RX timestamps. It
significantly reduces the amount of memory needed to support clients
using the interleaved mode if most of the server's clients are using the
basic mode (e.g. a public server).

Capture the TX timestamp on the first response to the request which has
the flag set to not further delay the first interleaved response.

False positives are possible with broken clients which set the origin
timestamp to something else than zero or the server RX or TX timestamp.
This causes an unnecessary RX timestamp to be saved and TX timestamp
captured and saved.
doc/chrony.conf.adoc
ntp_core.c