summaryrefslogtreecommitdiff
path: root/usr.sbin/ntpd
AgeCommit message (Collapse)Author
2007-12-04revert SIGQUIT catching; requested by deraadtFederico G. Schwindt
2007-12-04catch SIGQUIT too. ckuethe@ and henning@ ok.Federico G. Schwindt
2007-11-22be a bit less aggressive retrying; this keeps the message queueOtto Moerbeek
empty while in the -s period, so the poll timeout actually times out if there are no interfaces available. ok henning@
2007-11-22if the drift file is missing, reset adjfreq to zero; iirc diff from GlaserOtto Moerbeek
from a long time ago. ok ckuethe@
2007-11-12Remove space/tab compression function from lgetc() and replaceMarco Pfatschbacher
it with a simple filter in the yylex() loop. The compression in lgetc() didn't happen for quoted strings, thus creating a regression when tabs were used in variables. Some testing by todd@ and pyr@ OK deraadt@
2007-10-20ntpd and bgpd's turn to behave like the others.Pierre-Yves Ritschard
ok henning@
2007-10-19don't fill the logs; spotted by deraadt@ ok henning@Otto Moerbeek
2007-10-16Allow '=' to end a number in all lexers.Marco Pfatschbacher
Requested and OK deraadt@
2007-10-16in the lex... even inside quotes, a \ followed by space or tab shouldTheo de Raadt
expand to space or tab, and a \ followed by newline should be ignored (as a line continuation). compatible with the needs of hoststated (which has the most strict quoted string requirements), and ifstated (where one commonly does line continuations in strings). pointed out by mpf, discussed with pyr
2007-10-15Allow ntpd to report the status of peers and sensors to syslog. ThisOtto Moerbeek
happens when a SIGINFO is received, or when the majority of peers or sensors is bad. The latter with a maximum of once per 24 hour. ok henning@ ckuethe@ mbalmer@
2007-10-13in all these programs using the same pfctl-derived parse.y, re-unify theTheo de Raadt
yylex implementation and the code which interacts with yylex. this also brings the future potential for include support to all of the parsers. in the future please do not silly modifications to one of these files without checking if you are de-unifying the code. checked by developers in all these areas.
2007-10-11next step in the yylex unification: handle quoted strings in a nicer fashionTheo de Raadt
as found in hoststated, and make all the code diff as clean as possible. a few issues remain mostly surrounding include support, which will likely be added to more of the grammers soon. ok norby pyr, others
2007-09-14use a setup function for options, cleaner; ok cloderTheo de Raadt
2007-09-14Correctly assign a default weight of 1 to sensors and servers.Chris Kuethe
ok beck
2007-09-13add -n to usage();Jason McIntyre
2007-09-13Provide the -n switch like in the other imsg daemons for testingPierre-Yves Ritschard
the configuration file. "yes please, ok" henning@
2007-09-13one more missed change;Jason McIntyre
2007-09-13Small style tweak, from jmc and Maurice JanssenChris Kuethe
2007-09-12Add a knob to compensate for a refclock that is early or late. Based on aChris Kuethe
diff from Maurice Janssen. Manpage help from jmc and Maurice, other nits from deraadt and otto. ok deraadt, otto
2007-09-12default weight has to remain 1; seen by Maurice JanssenTheo de Raadt
2007-09-11this is where it all started, since future ntpd.conf commands will requireTheo de Raadt
negative parameters. extend lex to spot numbers in the stream. as well, make it easier to add parameters on command line in any order later ok otto ckuethe
2007-08-22Allow ntpd to log sensor offsets and adjtime calls to syslog at LOG_DEBUGChris Kuethe
priority. ok gwk, mbalmer, weingart "explicit non-ok from" henning
2007-08-04This diff makes ntpd poll for sensors more aggressively when the use ofChris Kuethe
sensors is requested, but no sensors are found. ok henning
2007-05-31convert to new .Dd format;Jason McIntyre
2007-05-26use __packed structs for the on-the-wire packets and just memcpy at onceHenning Brauer
instead of kind-of manual copyin/out. increases accuracy in server mode. collecting dust in my tree for some time, result of a conversation with somebody i really want to give credit to, but I can't find the mails now :( okey dokey sez theo
2007-05-01if resolving a name fails, be more aggressive retrying, but with care:Otto Moerbeek
do not have more than one dns request outstanding per peer. resolves slow recovery when resolving fails initially, without clogging the pipe with lots of dns requests; tested by Jason George; ok deraadt@
2007-04-30aggressive spelling fix, spotted by jbgTheo de Raadt
2007-03-27Normalize tv so that tv_usec is positive. The kernel also normalizes,Otto Moerbeek
but this might increase portability since some other systems do not grok negative tv_usec well. ok henning@
2007-03-23Increase sensor polling interval to 30s, just like ntp polls. ThisChris Kuethe
improves sensor timekeeping significantly. Before this patch my test system's frequency adjustment would range between -350 and +250, with timedelta rarely getting close to 0. After, frequency adjustmens is on the order of +/- 0.05ppm, with time +/- a few microseconds away from 0 ok henning, mbalmer, otto
2007-03-19when our red/recv/recvmsg in imsg_read gives EINTR or EAGAIN, do notHenning Brauer
signal "connection closed" upstream. spotted by Valentin Kozamernik <tin@komna.com>
2007-03-01read buffer size must be >= max imsg size.Henning Brauer
after release we should revisit this issue, we can probably safely shrink the max imsg size. Valentin Kozamernik in PR5401
2007-02-24xref adjfreq(2); from Igor ZinovikOtto Moerbeek
2007-01-23Typo in fatal() message found by dunceor @ gmail dot comClaudio Jeker
2007-01-15the new sensors tre can give us the number of sensors per type.Henning Brauer
With this patch, we give up without bothering sysctl kern_sensors.c::sensor_find() unless we know for sure that timedelta sensor is present. From: "Constantine A. Murenin" <cnst+openbsd@bugmail.mojo.ru>
2007-01-15Although Unix compilers accept more than one definition of a globalOtto Moerbeek
symbol, follow the guidelines from K&R: only one definition of a global symbol (and possibly more declarations). Rename some vars here and there to avoid shadowing. ok henning@
2007-01-14Esape from the Mouth of Madness by adjusting stored sensor offsetsOtto Moerbeek
when we adjust time. This prevents ntpd from going wild when using sensor time sources; ok henning@ (on an earlier version) and a LOT of testing by naddy@
2007-01-14Add some comments on the expresssion which converts sensor timedeltasOtto Moerbeek
to ntp offsets; also, rewrite the expression to make it more clear with no change in semantics. ok henning@
2006-12-28forgot a dereference in the previous conversion; ok deraadt@Christian Weisgerber
2006-12-23adapt to new two-level sensor sysctl framework; by Constantine A. MureninTheo de Raadt
2006-12-20let ntpd use sensors immediately after system boot by special casingHenning Brauer
last_sensor_scan == 0. monotime might be very close to 0 after boot. source unknown, maybe from naddy, rediscovered & ok mblamer
2006-11-30Allow sensors in a sensors-only configuration to set the time at startup.Chris Kuethe
2006-11-20with usig the meadian offset froma number of measurements the recordingHenning Brauer
of the last sensor update time got broken, doesn't show up with gps since it updates often (more often than we read), but naddy ran into it with dcf. record time of last sensor datum seperately. ok naddy balmer
2006-10-27use clock_gettime(CLOCK_MONOTONIC, ..) to get a monotonically increasingHenning Brauer
time, and make ntpd use that to send the next uery to an ntp peer and the like. this has the advantage that changes to the clock do not interfere with the intervals. for example, when we start on machines without an RTC and the initial settime (-s) kicks in, intervals were strange. idea from amandal@entrisphere.com, this implementation by me tested ckuethe, phessler, mbalmer, ok mbalmer
2006-10-24timedelta sensors are usually updated very often, but we used to queryHenning Brauer
them only every 30 seconds. now query them every 5,and take the median value from 7 queries as sensor value. this takes outliers out of the equation and makes the overall result much better, especially for sensors with heavy jitter (like nmea for now)
2006-10-21in client_nextaddr, check fd != -1 before close, just nicer this wayHenning Brauer
From: amandal@entrisphere.com
2006-10-21 Found that even if client fd (i.e to NTP source) is set toHenning Brauer
-1 because of error, it may still participate in poll() causing poll() to repeatedly wake up on error fd. so make sure w edon't add -1 fds to pollevents to avoid unnecessary wakeups From: amandal@entrisphere.com
2006-10-21when ntp_sendmsg fails, reset trustlevel to TRUSTLEVEL_PATHETICHenning Brauer
From: amandal@entrisphere.com
2006-10-21EADDRNOTAVAIL after connect is one of the soft errors where we don't abortHenning Brauer
too. from amandal@entrisphere.com
2006-10-12need to call adjtime once in a while here too, otherwise sensor-onlyHenning Brauer
servers never update the system clock
2006-10-12internally, ntpd doesn't work with absolute offsets to system time, butHenning Brauer
takes the offset it adjtime() is already correcting for into account when taking the offset from a sensor, we need to correct it by the offset between system time and ntpd view.