chrony/test/unit
Miroslav Lichvar 14b8df3702 clientlog: separate NTP timestamps from IP addresses
Instead of keeping one pair of RX and TX timestamp for each address, add
a separate RX->TX map using an ordered circular buffer. Save the RX
timestamps as 64-bit integers and search them with a combined linear
interpolation and binary algorithm.

This enables the server to support multiple interleaved clients sharing
the same IP address (e.g. NAT) and it will allow other improvements to
be implemented later. A drawback is that a single broken client sending
interleaved requests at a high rate (without spoofing the source
address) can now prevent clients on other addresses from getting
interleaved responses.

The total number of saved timestamps does not change. It's still
determined by the clientloglimit directive. A new option may be added
later if needed. The whole buffer is allocated at once, but only on
first use to not waste memory on client-only configurations.
2021-10-14 16:42:20 +02:00
..
addrfilt.c test: fix DEBUG_LOG use in unit tests 2017-03-13 12:04:26 +01:00
clientlog.c clientlog: separate NTP timestamps from IP addresses 2021-10-14 16:42:20 +02:00
cmac.c cmac+hash: change parameter types 2020-07-09 14:47:33 +02:00
hash.c hash: allow non-security MD5 use in FIPS mode 2021-09-02 15:17:08 +02:00
hwclock.c update copyright years 2018-09-12 11:38:10 +02:00
keys.c ntp: drop precompensation of TX timestamp 2020-07-09 14:46:57 +02:00
Makefile.in test: disable object dependencies in main makefile 2020-06-08 15:27:57 +02:00
ntp_auth.c test: drop logging suspension 2021-03-11 11:47:31 +01:00
ntp_core.c test: drop logging suspension 2021-03-11 11:47:31 +01:00
ntp_core.keys test: include CMAC keys in ntp_core unit test 2020-09-23 15:10:43 +02:00
ntp_ext.c test: add ntp_ext unit test 2020-03-05 16:02:15 +01:00
ntp_sources.c update copyright years 2021-05-12 13:06:15 +02:00
nts_ke.crt test: add nts unit tests 2020-03-05 16:02:15 +01:00
nts_ke.key test: add nts unit tests 2020-03-05 16:02:15 +01:00
nts_ke_client.c nts: add support for multiple sets of trusted certificates 2021-02-18 17:44:04 +01:00
nts_ke_server.c nts: fix error response to NTS-KE request 2020-07-23 15:53:24 +02:00
nts_ke_session.c nts: add support for multiple sets of trusted certificates 2021-02-18 17:44:04 +01:00
nts_ntp_auth.c nts: check for negative length in NNA_DecryptAuthEF() 2020-07-09 14:47:33 +02:00
nts_ntp_client.c nts: add support for multiple sets of trusted certificates 2021-02-18 17:44:04 +01:00
nts_ntp_server.c nts: improve NTS-KE server/client code 2020-07-16 16:02:08 +02:00
regress.c test: add regress unit test 2017-06-27 15:29:01 +02:00
samplefilt.c sources: update stratum with leap status 2021-02-04 17:43:47 +01:00
siv.c siv: return error if key is not set 2020-09-10 09:36:35 +02:00
smooth.c main: don't require root privileges with -Q option 2017-07-13 16:10:54 +02:00
sources.c sources: update stratum with leap status 2021-02-04 17:43:47 +01:00
test.c test: fix incorrect use of RAND_MAX 2021-09-23 15:51:35 +02:00
test.h test: drop logging suspension 2021-03-11 11:47:31 +01:00
util.c update copyright years 2021-05-12 13:06:15 +02:00