summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/recallocarray.c
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2021-03-18 11:06:41 +0000
committerbluhm <bluhm@openbsd.org>2021-03-18 11:06:41 +0000
commitacf512e2d5a23adbb90b1ee034021e27be6722d9 (patch)
tree8bd910f61326b93048951a052171b5d65ef8a5bc /lib/libc/stdlib/recallocarray.c
parentIn revision 1.91 of uhidev.c, jcs@ made sure to only detach devices (diff)
downloadwireguard-openbsd-acf512e2d5a23adbb90b1ee034021e27be6722d9.tar.xz
wireguard-openbsd-acf512e2d5a23adbb90b1ee034021e27be6722d9.zip
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 '')
0 files changed, 0 insertions, 0 deletions