Explicitly set the number of iburst samples to the size of the register
to make sure there are at least 7 reachability updates and the
initstepslew mode can be ended.
If acquisitionport is set to 0 (default), create and connect a new
socket for each server instead of using one socket per address family
for all servers.
If the remote stratum is higher than ours, try to lock on the peer's
polling to minimize our response time by slightly extending our delay or
waiting for the peer to catch up with us as the random part in the
actual interval is reduced. If the remote stratum is equal to ours, try
to interleave evenly with the peer.
If the remote peer uses a polling interval shorter than the local
minimum, the local peer will be unable to send any packets as the
timeout will be updated on every received valid packet and will never
expire.
Modify the delay calculation to aim at poll interval away since the last
transmit.
Also, share the delay calculation code with transmit_timeout().
This should prevent chronyd from getting stuck and refusing new samples
due to failing test4 when the current measured frequency offset is close
to 1.0. That can happen when the system clock is stepped forward behind
chronyd's back.
Allow different hash functions to be used in the NTP and cmdmon
protocols. This breaks the cmdmon protocol compatibility. Extended key
file format is used to specify the hash functions for chronyd and new
authhash command is added to chronyc. MD5 is the default and the only
function included in the chrony source code, other functions will be
available from libraries.
Add new flag to source struct to indicate when source is selectable
(packets with good headers are received) and use a reachability
register for last 8 samples instead of the reachable flag. Source
drivers now provide only reachability updates.
Split test7 into two and to accumulate the sample require that all tests
pass, except the one which checks packet stratum is not higher than ours.
Also, don't mark the source as unreachable when only test4c fails.
Require that the ratio of the increase in delay from the minimum one in
the stats data register to the standard deviation of the offsets in the
register is less than maxdelaydevratio or the difference between
measured offset and predicted offset is larger than the increase in
delay. In the allowed delay increase is included also skew and maximum
clock frequency error.
maxdelaydevratio is 10.0 by default.
Instead of following skew changes, adjust polling interval so that the
number of measurements used in the regression algorithm remains close to
a target value. It can be configured with a new polltarget option
(6 by default).
I tried running chronyd in valgrind and the result was that there are four
places where memory is not initialized. A patch fixing the errors is in the
attachment.
Further to the discussion with John Hasler, here are new diffs which
handles the incoming stratum 0 claim of a remote server by redefining the
incoming stratum as one bigger than the Max if it is zero, as per the NTP
version 4 documentation.
If the incoming stratum is zero it sets it to NTP_MAX_STRATUM+1 . If our
current stratum is larger than the NTP_MAX_STRATUM, the outgoing stratum is
also set to zero as per the suggestions in the NTP docs.
Introduces the new NTP_INVALID_STRATUM of 0 for doing these tests or
setting the outgoing stratum.
It is unclear whether chrony wants to follow NTP in setting the outgoing
stratum to zero if it is unknown or invalid, rather than a number larger
than the max stratum. Setting it to zero seems silly, since zero is already
used to define the stratum of a hardware clock (GPS, atomic, etc). This
seems ripe for confusion. But the fact that the ntp docs state to do this,
and that ntp servers (eg ntp.ubc.ca) are already doing this (using 0 to
mean invalid) means that chrony has to handle it on the incoming packets
from the servers.
Kevin Lyda writes:
I enclose the following patch which removes all but three of the warnings. i
don't have any non-linux systems handy to test a fix to the round() function.
but having it return a double should be fine.
It doesn't actually fix anything, it just shuts up -Wall, so it's certainly an
optional type of patch.
This is a verbatim copy of the files at that stage of the repository that was
built from the CVS import. It allows future development to see a bit of recent
history, but without carrying around the baggage going back to 1997. If that
is really required, git grafts can be used.