summaryrefslogtreecommitdiff
path: root/usr.sbin/ntpd
AgeCommit message (Collapse)Author
2004-09-15kill another unused function and two debugging printfsHenning Brauer
2004-09-15remove the unused variable/macro code, ok theoHenning Brauer
2004-09-15unused variables, theoHenning Brauer
2004-09-15missing include, from theoHenning Brauer
2004-09-15remove buf_write(), not used in ntpd. found by theoHenning Brauer
2004-09-14paranoia: reset query->fd to -1 after close, from canacar some time agoHenning Brauer
2004-09-09correctly track peer count. fixes a memory corruption.Henning Brauer
with & ok otto millert claudio, ok deraadt canacar
2004-09-07ignore ntp_sendmsg()s return value in server_dispatch. could result inHenning Brauer
ntpd exiting on sendmsg() failures, which is not desired.
2004-08-30don't forget to set *hn... theo okHenning Brauer
2004-08-30skip early DNS lookups -- they are deferred to later; ok otto ho henningTheo de Raadt
2004-08-30ENOBUFS, EHOSTUNREACH, ENETDOWN and EHOSTDOWN are bad reasons to log; ok ↵Theo de Raadt
otto henning
2004-08-24don't fatal() if getaddrinfo() returns EAI_NONAMEHenning Brauer
2004-08-16Be more careful setting next and deadline, they should not both be != 0Otto Moerbeek
at the same time. ok henning@
2004-08-13Reset deadline on failed transmit. Avoids a spinning process ifOtto Moerbeek
all sends fail. ok henning@
2004-08-12do not try to getaddrinfo() in the unprivileged process, send an imsgHenning Brauer
asking the privileged one to do it. sends back an imsg with the resulting addresses in a bunch of struct sockaddr_storage in the data part. this should fix all remaining issues with dns (non-)availability at ntpd startup, be it due to named on localhost or something else. tested by marco@ and Chris Paul <chris.paul@sentinare.com>
2004-08-10order #includes, Brian Poole <raj@cerias.purdue.edu>Henning Brauer
2004-08-10wrong sizeof; Brian Poole <raj@cerias.purdue.edu>Henning Brauer
2004-08-10in the pool case ("servers somepool.somewhere"), we add new peers whileHenning Brauer
looping over the addresses returned by the dns lookup, as each address is one new peer. however, if the lookup fails with a temporary error, we will try to lookup later again. for that, we obviously need to insert one peer with the hostname in addr_head... change one for() loop into a do { } while() one
2004-08-10move memory allocation for new peers into a new function, makes ID allocationHenning Brauer
easier
2004-07-29keep an ID per server we talk toHenning Brauer
2004-07-28prevent unresolvable hostnames in "listen on" statementsHenning Brauer
2004-07-28when a dns lookup fails at parse time, do not abort but try againHenning Brauer
to resolve the hostname every 60 seconds fixes ntpd invocations before e. g. a dialup link is established and such. as we want ntpd to be a "fire and forget" background daemon it should cope with such situations. tested by many
2004-07-25remove unused functionHenning Brauer
2004-07-21no multiple free(); "John L. Scarfone" <j0@cox.net>Henning Brauer
2004-07-20wrap the heads for the linked list of addresses into a new ntp_addr_wrapHenning Brauer
which, besides the head pointer for the list of course, stores the original address as specified (i. e. as hostname instead of resolved IPs) and flags and such.
2004-07-18there are a few recvfrom(2) errors we do not want to panic onHenning Brauer
2004-07-18query interval scaling, episode IIHenning Brauer
1) base the interval calculation on the offset from the last reply, not from the last peer update. Allows us to send more queries again faster when the local clock diverges too much 2) every time we form a peer update (for which we need 8 replies) check wether we have a ready peer update for all peers that are currently trusted, and if so, calculate the total offset and call adjtime(). that means that adjtime is no longer called in fixed intervals but whenever we have enough data to reliably calculate the local clock offset. In practice, that means we call adjtime() less often, but with probably better data. 3) invalidate peer updates after beeing used. no point in re-using them - this resulted in calling adjtime() multiple times with the same offset, which doesn't make sense tested by many
2004-07-14do not do the stratum guessing dance.Henning Brauer
stratum is pretty much pointless anyway these days, and we certainly do not want to send out illegal packets (stratum=0) until synced...
2004-07-13tweaks; ok henning@Jason McIntyre
2004-07-13Respond to client queries with better server statistics. We now outputAlexander Guy
a close-to-reality stratum, a real reference time, and a leap indicator that will indicate if the local clock isn't synchronized. This also means that until the server feels it's synchronized, it will tell the clients it isn't. This is normal, and correct. ok henning@
2004-07-13ignore obviously malformed queries; ok henning@Alexander Guy
2004-07-13liek bgpd, use a socketpair(2) instead of a pipe(2)Henning Brauer
2004-07-12Add missing newlinesDarren Tucker
2004-07-12Replace errx with equivalent fprintf+exit to make porting easier; ok henning@Darren Tucker
2004-07-11Use SA_LEN(sa) instead of sa->sa_len; ok henning@Darren Tucker
2004-07-11Start collecting the remote server state along with the calculatedAlexander Guy
offsets, in preparation for having correct server statistics in responses to client queries. ok henning@
2004-07-10KNF; ok henning@Alexander Guy
2004-07-10short fixed point <-> double conversion routines; ok henning@Alexander Guy
2004-07-10correct leap indicator mask; ok henning@Alexander Guy
2004-07-10missing {}Henning Brauer
2004-07-10check wether we have enough data to form a peer update on receiptionHenning Brauer
of each packet, not only after each 8th (where we have enough for sure)
2004-07-10oupsHenning Brauer
2004-07-10scale query interval based on local clock offset. tested by manyHenning Brauer
not as efficient as I want it to be yet, but more is coming
2004-07-09make lint a wee bit happierTheo de Raadt
2004-07-09make date(1), rdate(8), ntpd(8), and timed(8) .Xr themselves;Jason McIntyre
mostly from Andreas Kahari (PR #3846);
2004-07-09Do not forget to initialize head. ok henning@Otto Moerbeek
2004-07-09too chatty; ok henningTheo de Raadt
2004-07-09don't panic when sendto() fails; for the client part just re-scheduleHenning Brauer
noticed & fix tested by fries@
2004-07-09don't try to update the clock when we have no dataHenning Brauer
2004-07-09various cleanup:Jared Yanovich
- mention '#' comments - fix macros for directives - typos - change list display - ntp -> NTP - slight rewording help and ok jmc ok henning otto