diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-03-18 11:06:42 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-03-18 11:06:42 +0000 |
commit | 9b255247878256ae9af29334aad8d346f8b72309 (patch) | |
tree | 5ac007121f932a16513ff470d00e1147a2f15ac6 /lib/libc | |
parent | c68cf00eeeae6689fafe77c552a455c9ade3eb5e (diff) |
The ntpd client code corrects both T1 and T4 with the current offset
returned by adjtime(2) from the kernel. T1 is local time when the
NTP packet is sent and T4 when the response is received. If between
these events a NTP reply from another server is received, it may
change the kernel offset with adjtime(2). Then the calulation of
the client offset was done with different bases, the result was
wrong and the system time started moving around.
So instead of correcting T1 and T4 individually at different events,
correct their sum once.
Error handling was missing if there is no timestamp in the response.
As this should not happen in our kernel, fatal() is appropriate.
tested by weerd@; OK claudio@
Diffstat (limited to 'lib/libc')
0 files changed, 0 insertions, 0 deletions