Miroslav Lichvar
e225ac68bc
test: update 110-chronyc
2017-01-27 11:54:12 +01:00
Miroslav Lichvar
58060c40a5
doc: improve FAQ
2017-01-27 11:45:50 +01:00
Miroslav Lichvar
2ac1b3d5c4
client: print tracking delay/dispersion in nanosecond resolution
2017-01-27 11:35:38 +01:00
Miroslav Lichvar
c174566982
ntp: check supported flags before enabling HW timestamping
2017-01-27 11:35:38 +01:00
Miroslav Lichvar
60fca19d40
ntp: log info message when HW timestamping is enabled
2017-01-27 10:55:28 +01:00
Miroslav Lichvar
8bcb15b02f
doc: improve description of some server options
2017-01-27 10:55:28 +01:00
Miroslav Lichvar
65c2cebcd5
reference: report zero root dispersion with local reference
...
The server's precision is supposed to be included in client's
dispersion. Don't include it in the server's dispersion.
2017-01-27 10:55:28 +01:00
Miroslav Lichvar
2a51b45a43
test: fix memory leaks in unit tests
2017-01-27 10:55:28 +01:00
Miroslav Lichvar
5ac791665e
doc: update NEWS
2017-01-24 15:03:24 +01:00
Miroslav Lichvar
a4e3f83611
update copyright years
2017-01-24 15:01:38 +01:00
Miroslav Lichvar
8a837f9c2b
test: extend 119-smoothtime
2017-01-23 16:17:39 +01:00
Miroslav Lichvar
da2d33e9a8
ntp: fix time smoothing in interleaved mode
...
When the server's transmit timestamp was updated with a kernel/HW
timestamp, it didn't include the time smoothing offset. If the offset
was larger than one second, the update failed and clients using the
interleaved mode received less accurate timestamps. If the update
succeeded, the clients received timestamps that were not adjusted for
the time smoothing offset, which added an error of up to 0.5s/1s to
their measured offset/delay.
Fix the update to include the smoothing offset in the new timestamp.
2017-01-23 15:58:55 +01:00
Miroslav Lichvar
4b98dadae9
ntp: simplify UTI_Ntp64ToTimespec() callers
...
Since UTI_Ntp64ToTimespec() was modified to handle zero timestamps, some
of its callers don't need to do that anymore.
2017-01-23 15:58:55 +01:00
Miroslav Lichvar
86acea5c46
ntp: add interface index to NTP_Local_Address
...
This will allow us to get the interface index when sending responses to
clients.
2017-01-23 15:58:55 +01:00
Miroslav Lichvar
a60fc73e7b
refclock_phc: add nocrossts option
2017-01-23 15:58:55 +01:00
Miroslav Lichvar
50f99ec5f4
conf: add nocrossts option to hwtimestamp directive
...
This option disables the use of the PTP_SYS_OFFSET_PRECISE ioctl.
2017-01-23 15:58:55 +01:00
Miroslav Lichvar
31b6a14444
sys_linux: add support for PTP_SYS_OFFSET_PRECISE
...
This is for hardware that can precisely cross timestamp the PHC with the
system clock.
2017-01-23 15:58:55 +01:00
Miroslav Lichvar
9df4d36157
refclock_phc: use sys_linux code for reading PHC
...
This drops support for non-ioctl reading of PHC.
2017-01-23 15:58:55 +01:00
Miroslav Lichvar
b70f0b674f
ntp: move PHC-specific code to sys_linux
...
This will allow sharing of the code with the PHC refclock driver.
2017-01-23 15:58:55 +01:00
Miroslav Lichvar
510784077f
conf: add minpoll option to hwtimestamp directive
2017-01-23 15:58:55 +01:00
Miroslav Lichvar
9800e397fb
hwclock: make minimum sampling separation configurable
2017-01-23 15:58:55 +01:00
Miroslav Lichvar
1436d9961f
conf: add precision option to hwtimestamp directive
2017-01-23 15:58:55 +01:00
Miroslav Lichvar
98f5d05925
ntp: include precision of PHC readings in their selection
...
Include a fixed non-zero precision (100 nanosecond) in the selection of
PHC readings.
2017-01-23 15:58:55 +01:00
Miroslav Lichvar
7a937c7652
conf: return hwtimestamp data in struct
2017-01-23 15:58:55 +01:00
Miroslav Lichvar
b198d76676
ntp: include precision in maxdelay test
2017-01-23 15:58:55 +01:00
Miroslav Lichvar
97d4203354
ntp: adapt sampling separation for short polling intervals
2017-01-23 15:58:55 +01:00
Miroslav Lichvar
beaaaad162
ntp: allow sub-second polling intervals
...
Change the minimum minpoll to -4, but keep the minimum maxpoll at 0 in
order to not make it too easy to flood distant servers.
2017-01-23 15:58:55 +01:00
Miroslav Lichvar
4e78975909
ntp: use current poll when backing off on KoD RATE
2017-01-23 15:58:55 +01:00
Miroslav Lichvar
99147ed8f2
ntp: rename maxdelay constants
2017-01-23 15:58:55 +01:00
Miroslav Lichvar
dec0d3bfc2
ntp: reset ntpdata report on address change
2017-01-23 15:58:55 +01:00
Miroslav Lichvar
cd84c99e70
examples: improve chronyd.service
2017-01-23 15:58:55 +01:00
Miroslav Lichvar
d5c507975c
doc: update README
2017-01-12 16:34:28 +01:00
Miroslav Lichvar
b4235abd36
update copyright years
2017-01-12 16:34:28 +01:00
Miroslav Lichvar
1966085a97
test: add ntp_core unit test
2017-01-12 16:34:28 +01:00
Miroslav Lichvar
e31e7af48f
test: make 119-smoothtime more reliable
2017-01-12 16:34:28 +01:00
Miroslav Lichvar
adb9123fc3
test: extend util unit test
2017-01-12 16:34:28 +01:00
Miroslav Lichvar
b0f7efd59e
util: handle zero in conversion of NTP timestamps
...
Handle zero NTP timestamp in UTI_Ntp64ToTimespec() as a special value to
make it symmetric with UTI_TimespecToNtp64(). This is needed since
commit d75f6830f1
, in which a timestamp is
converted back and forth without checking for zero.
It also makes zero NTP timestamps more apparent in debug output.
2017-01-12 16:34:28 +01:00
Miroslav Lichvar
e28dfada8c
rtc: check for backward RTC steps
...
When accumulating a new sample, check if the new RTC time is newer the
last sample time. If it is not, discard all previous samples, assuming
something has stepped the RTC, or it's a broken RTC/driver.
2017-01-12 16:34:28 +01:00
Miroslav Lichvar
ac0b28cce6
sourcestats: align sample time used for source report
...
This reduces leak of sample times (and receive timestamps which are
related to sample times), which could be useful in off-path attacks on
unauthenticated symmetric interleaved mode.
2017-01-12 16:34:28 +01:00
Miroslav Lichvar
48b16ae66c
local: add assertion for precision
2017-01-12 16:34:28 +01:00
Miroslav Lichvar
061579ec28
ntp: don't send packets with RX equal to TX
...
Before sending an NTP packet, check whether the TX timestamp is not
equal to the RX timestamp. If it is, generate a new TX timestamp and try
again. This is extremely unlikely to happen in normal operation, but it
is needed for reliable detection of the interleaved mode.
2017-01-12 16:34:28 +01:00
Miroslav Lichvar
f2f834e7e7
ntp: limit maxdelay parameters
2017-01-12 16:34:27 +01:00
Miroslav Lichvar
a7802e9a76
fix some coverity warnings
2017-01-12 16:34:27 +01:00
Miroslav Lichvar
8f7ab95ff0
doc: update NEWS
2017-01-06 13:12:19 +01:00
Miroslav Lichvar
042c670747
doc: improve chrony.conf man page
2017-01-06 13:12:19 +01:00
Miroslav Lichvar
cacbe9976f
ntp: add options for compensating HW timestamping errors
2017-01-06 13:12:19 +01:00
Miroslav Lichvar
8efec1d640
ntp: add sanity check for HW timestamps
...
Accept HW timestamp only if it doesn't differ from the kernel/daemon
timestamp by more than one second.
2017-01-06 13:12:19 +01:00
Miroslav Lichvar
c44d282f0b
ntp: ignore zero HW timestamps
...
Apparently, zero HW timestamps are possible with buggy drivers/HW.
2017-01-06 13:12:19 +01:00
Miroslav Lichvar
4432f29bd2
sources: try to replace jittery sources
...
Similarly to falsetickers, distant, and unreachable sources, try to
replace sources that have jitter larger than maxjitter.
2017-01-06 13:12:19 +01:00
Miroslav Lichvar
5fee3ed5e9
client: print refid also as string in ntpdata output
2017-01-06 13:12:19 +01:00