summaryrefslogtreecommitdiff
path: root/usr.sbin/ntpd
AgeCommit message (Collapse)Author
2005-05-26Ensure previous adjust has completed before clearing alarm flag; ok henning@Darren Tucker
2005-05-24ifa->ifa_addr can be NULL in some cases, pt out by Kurt RoeckxHenning Brauer
<kurt@roeckx.be> / bugs.debian.org/310586
2005-05-23no need for endpwent(0 here eitherHenning Brauer
2005-05-11don't touch *hn in failure case. no real change due to the way we use itHenning Brauer
but more correct. from Michael Knudsen <e@molioner.dk>
2005-05-03setres[ug]id; ok deraadt@Damien Miller
2005-04-26unify shared code a bit again to make future syncs easierHenning Brauer
From: Alexander von Gernler <grunk@pestilenz.org>
2005-04-19move the "reply from ... " log msg in -d mdoe uop a bit so it actuallyHenning Brauer
comes before the "adjusting local clock by..." one, joerg
2005-04-18extra paranoia, from a discussion with joergHenning Brauer
2005-04-18correctness: only account for offset after settime in next and deadlineHenning Brauer
when those timers are actually running. due to the way ntpd's logic works this does not really make a difference, but correctness is good. spotted by me, joerg agrees
2005-04-18after setting the clock hard correct the "next" and "deadline" timestampsHenning Brauer
by the offset From: Joerg Sonnenberger <joerg@britannica.bec.de>
2005-04-18prevent replies with negative delay from being used, could happen with -sHenning Brauer
From: Joerg Sonnenberger <joerg@britannica.bec.de> of dragonfly
2005-03-31zap includes, grunkHenning Brauer
2005-03-31zap includes, Alexander von Gernler <grunk@pestilenz.org>Henning Brauer
2005-03-24one more fatal/fatalx, alexanderHenning Brauer
2005-03-24fatal vs fatalx, Alexander von GernlerHenning Brauer
2005-03-23remove now osolete comment, from a mail exchange withHenning Brauer
Alexander von Gernler <grunk@pestilenz.org>
2005-03-23wpos in struct buf_read and datalen in imsg_get should be size_t and notHenning Brauer
ssize_t From: Alexander von Gernler <grunk@pestilenz.org>
2005-03-13Fixes in ntpd_settime (ie ntpd -s):Darren Tucker
- Handle errors from syscalls better - Prevent curtime.tv_usec from being negative for negative offsets. - Don't claim to have done settimeofday if it fails. ok henning@
2005-03-09nasty: host_dns used to run before forking and chrooting etc, so it wasHenning Brauer
guaranteed that its res_init() call was done once before fork etc... that is no longer the case. call res_init() in main() early.
2005-03-09when, after processing all complete imsgs we found in the buffer,Henning Brauer
there are some bytes left (less than an imsg header, or less than the imsg header len field says) we copy it to the very beginning of the buffer. use memmove instead of memcpy since it is not guaranteed that there's no overlap. while memcpy on OpenBSD is safe, it might not elsewhere, and we want our code to be correct anyways. funny enough theo and I talked at length about that last week in dublin, and I said I believe I had no memcpys with the chance of overlap in ntpd/bgpd - well, here is one, and Alexander von Gernler <grunk@pestilenz.org> pointed me to it.
2005-03-08when trying short-circuit the wait for the first reply for -s, onlyHenning Brauer
do so when -we tried to send at least one query (that is the change) -we could not send ou a single one without failure (this was already in place but catched too much) problem independently noticed by nick and danh, ok mickey danh, testing by many
2005-03-08knfTheo de Raadt
2005-03-08from the "shut the fuck up, ntpd" department:Henning Brauer
don't whine about temporary dns errors
2005-03-08missing break spotted by lintTheo de Raadt
2005-03-08from the "shut the fuck up, ntpd" department:Henning Brauer
move log_debug call to tell about skipping the settime due to lack of answers down slightly below the 2nd (and final) log_init call so it becomes a -d only thing. tested by dlg and me
2005-03-08let client_query return 0 if it requested dns resolutionHenning Brauer
2005-03-06fix error message, Benedikt Steinbusch <bsteinb@hamazone.de>Henning Brauer
2005-02-22when sending a query already returns a failure, we're not going to seeHenning Brauer
a reply to that query. if we get errors for all queries and the initial settime() is still due and thus the parent process still waits (not yet daemonized!), send an IMSG_SETTIME with offset 0. shortens the delay dramatically when you boot without network idea from a discussion with theo
2005-02-21fix an error messageHenning Brauer
2005-02-03Implement simple duplicate suppression of peer errors; ok henning@Darren Tucker
2005-02-02KNFHenning Brauer
2005-02-02buffer structs and API ssize_t -> size_t; from bgpdHenning Brauer
2005-02-02usage() is __deadHenning Brauer
pt out by Alexander v Gernler
2005-01-28Simplify interval scaling and randomize query intervals; ok henning@Darren Tucker
2005-01-28fatal() if daemon() fails, Alexander von Gernler <grunk@pestilenz.org>Henning Brauer
2005-01-28Make network unreachable errors non-fatal; ok henning@Darren Tucker
2005-01-27Scale query interval by the overall offset not per-peer offset, so weDarren Tucker
don't query outliers more often than any other server. ok henning@
2005-01-27Delay before retrying a query on timeout; ok henning@Darren Tucker
2004-12-23KNFHenning Brauer
2004-12-22d can be negative, take that into account when comparing to the loggingHenning Brauer
threshold. spotted by Constantine Murenin <mureninc@gmail.com>, mickey ok
2004-12-22Save original value returned by getifaddrs to free later; ok henning@Darren Tucker
2004-12-22if our first getpwnam(), testing for NTPD_USER, succeeded, but the secondHenning Brauer
returns NULL, we don't need loooong explanations, but at least some indicator what went wrong, From: Michael Knudsen <e@molioner.dk>
2004-12-20some typos in log messages.Moritz Jodeit
ok henning@
2004-12-16Limit the number of addresses used by the 'servers' directive to 8; ok henning@Darren Tucker
2004-12-15Poll unsynchronized servers at the maximum interval and log a message aboutDarren Tucker
them when in debug mode; ok henning@
2004-12-15Factor out interval scaling code; ok henning@Darren Tucker
2004-12-14If polling a server results in an error, drop that server to the maximumDarren Tucker
poll interval; ok henning@
2004-12-14sendto() takes socklen_t as an argument; ok henning@Darren Tucker
2004-12-13Sanity check owner and permissions of privsep directory, like sshd does;Darren Tucker
ok henning@
2004-12-13Check for error status from poll() too; ok henning@Darren Tucker