Miroslav Lichvar
5fc7674e36
ntp: set interface index in IP*_PKTINFO when responding
...
When a server with multiple interfaces in the same network is sending a
response, setting the ipi_spec_dst/ipi6_addr field of the IP*_PKTINFO
control message selects the source address, but not necessarily the
interface. The packet has the expected source address, but it may be
sent by an interface that doesn't have the address.
Set the ipi_ifindex/ipi6_ifindex field to respond on the same interface
as the request was received from to avoid asymmetries in delay and
timestamping.
2018-08-30 11:56:13 +02:00
Miroslav Lichvar
018977044a
test: add 133-hwtimestamp test
2018-08-30 08:08:19 +02:00
Miroslav Lichvar
cc49d8e6e6
test: add 132-logchange test
2018-08-28 18:27:43 +02:00
Miroslav Lichvar
933bd017b4
test: add 131-maxchange test
2018-08-28 18:27:43 +02:00
Miroslav Lichvar
d558b33d85
test: extend 108-peer test
2018-08-28 18:27:43 +02:00
Miroslav Lichvar
9268bf2cff
test: don't override user settings with default values
...
This fixes commit 671daf06b8
.
2018-08-28 18:27:43 +02:00
Miroslav Lichvar
dbf2c22467
test: extend ntp_core unit test
2018-08-28 18:27:03 +02:00
Miroslav Lichvar
af4fe92095
test: update hash unit test
2018-08-28 18:18:07 +02:00
Miroslav Lichvar
e034a07be8
test: enable unit tests to suspend logging
2018-08-28 18:18:07 +02:00
Miroslav Lichvar
eb8c9ad601
logging: allow reopening stderr
...
LOG_OpenFileLog(NULL) can be now used to reopen stderr.
2018-08-28 18:18:07 +02:00
Miroslav Lichvar
6847536669
logging: close previous file log after opening new one
...
Currently, the log is always opened only once, but that will change with
tests temporarily suspending logging.
2018-08-28 15:42:38 +02:00
Miroslav Lichvar
f5206db9b0
ntp: optimize MAC truncation
...
When generating a MAC for an NTP packet, request only the bytes that
will be sent.
2018-08-27 19:00:08 +02:00
Miroslav Lichvar
6ab2ed0da6
hash: allow truncated output
...
Tomcrypt, some NSS hash functions, and the internal MD5 require the
output buffer to be at least as long as the digest. To provide the same
hashing API with all four options, use an extra buffer for the digest
when necessary and copy only the requested bytes to the caller.
2018-08-27 19:00:08 +02:00
Miroslav Lichvar
7352e470e1
ntp: remove unnecessary constant
2018-08-27 17:30:47 +02:00
Miroslav Lichvar
5bc9c0d07a
sources: check maximum reach size before postponing update
...
Don't wait for other sources to be selectable when the maximum
selectable and non-selectable reachability registers happen to match
and a register is already full (e.g. after heavy packet loss).
2018-08-27 13:33:47 +02:00
Miroslav Lichvar
a2146e82ef
doc: improve description of LastRx column in chronyc sources
2018-08-27 11:26:51 +02:00
Miroslav Lichvar
6e10e6740c
test: add 130-quit test
2018-08-24 18:09:29 +02:00
Miroslav Lichvar
bfaa10f2b0
test: add 129-reload test
2018-08-24 18:09:29 +02:00
Miroslav Lichvar
9f167a7997
test: add 128-nocontrol test
2018-08-24 18:09:29 +02:00
Miroslav Lichvar
6908163464
test: separate client/server chronyd options
2018-08-24 18:09:29 +02:00
Miroslav Lichvar
671daf06b8
test: avoid using eval in shell scripts
2018-08-24 18:09:29 +02:00
Miroslav Lichvar
b189a5386b
test: extend util unit test
2018-08-24 18:09:29 +02:00
Miroslav Lichvar
7889d108c2
test: add samplefilt unit test
2018-08-24 18:09:29 +02:00
Miroslav Lichvar
3cfa8ce9d3
test: add sanitizers test
2018-08-24 18:09:29 +02:00
Miroslav Lichvar
570573fe28
test: detect configure errors in compilation test
2018-08-24 18:09:29 +02:00
Miroslav Lichvar
62b1a11736
test: add -Werror to CFLAGS in compilation test
2018-08-24 18:09:29 +02:00
Miroslav Lichvar
c00d517e12
doc: update description of -r option
2018-08-24 18:09:29 +02:00
Miroslav Lichvar
001f3d5e27
sourcestats: improve debug message in SST_GetTrackingData()
2018-08-24 18:09:29 +02:00
Miroslav Lichvar
6045023a49
sources: use SQUARE macro in combine_sources()
2018-08-24 18:09:29 +02:00
Miroslav Lichvar
bba29a0ee7
samplefilt: check for non-increasing sample times
...
Adopt the check from the refclock code to check also samples from NTP.
2018-08-24 18:09:29 +02:00
Miroslav Lichvar
cffc856b50
test: update hwclock unit test
2018-08-21 16:54:54 +02:00
Miroslav Lichvar
419077e04b
sys_linux: extend debug message
2018-08-21 15:52:35 +02:00
Miroslav Lichvar
7db9d4acea
sys_linux: improve support for upcoming kernel versions
...
Starting with Linux 4.19, the frequency of the system clock should be
updated immediately in the system call itself, which will significantly
reduce the maximum delay of the update.
Increase the assumed tick rate in order to reduce the dispersion
accumulated by the driver when it sets the frequency.
2018-08-21 15:52:35 +02:00
Miroslav Lichvar
8d5b86efe7
test: make 121-orphan more reliable
2018-08-21 15:52:35 +02:00
Miroslav Lichvar
6cf16aea7b
reference: refactor estimation of clock frequency
...
Reorder code in REF_SetReference(), clean it up a bit, and split off the
parts specific to the weighting and estimation of the new frequency.
2018-08-21 15:52:33 +02:00
Miroslav Lichvar
870545d3cb
reference: include skew in local sync status setting
2018-08-21 12:06:57 +02:00
Miroslav Lichvar
2a030c0d0c
sourcestats: include offset SD in tracking root dispersion
2018-08-21 12:06:57 +02:00
Miroslav Lichvar
0b709ab1bc
util: introduce SQUARE macro
2018-08-21 12:06:57 +02:00
Miroslav Lichvar
a1f2f17385
reference: fix offset SD to include elapsed time
...
This should slow down corrections based on old measurements with large
estimated error in frequency.
2018-08-21 12:06:57 +02:00
Miroslav Lichvar
2240eefbd0
sources: fix combined offset SD to include elapsed time
2018-08-21 12:06:44 +02:00
Miroslav Lichvar
706d0c281a
sources: combine frequencies by variance instead of skew
...
This seems to slightly improve the stability.
2018-08-21 10:15:19 +02:00
Miroslav Lichvar
ca73e34f30
sources: provide frequency SD to reference update
2018-08-17 17:40:06 +02:00
Miroslav Lichvar
cca2ef4649
sourcestats: provide frequency SD in tracking data
2018-08-17 17:40:06 +02:00
Miroslav Lichvar
05d9edbf8f
sourcestats: replace constant with macro
2018-08-17 17:40:06 +02:00
Miroslav Lichvar
c5bdc52a59
test: don't require exit message to be on last line
...
This is useful with enabled debug output.
2018-08-17 17:39:50 +02:00
Miroslav Lichvar
74f0c0924a
ntp: change maxdelay* info messages to use option names
2018-08-13 12:17:57 +02:00
Miroslav Lichvar
05492d1d23
test: improve 101-poll test
2018-08-10 16:46:38 +02:00
Miroslav Lichvar
eea343b93f
refclock: improve error messages
2018-08-09 14:52:08 +02:00
Miroslav Lichvar
afff06c88c
ntp: add options to set minsamples/maxsamples of hwclock
2018-08-09 14:52:08 +02:00
Miroslav Lichvar
c0717a27f6
hwclock: add parameters for minimum/maximum number of samples
...
Allocate the arrays which hold the samples dynamically and limit the
number of dropped samples to not fall below the minimum.
2018-08-09 14:52:08 +02:00