naddy
281ec163e9
Switch drift file format to ppm for compatibility with the ntp.org
daemon.
Old drift files will be interpreted as a minuscule adjustment and
ntpd will proceed to rediscover the drift, like starting from zero
on a newly installed machine.
ok deraadt@
10 years ago
bcook
3f937ba631
bump failure to set the initial time from debug to warning
from Paul B. Henson, ok phessler@
10 years ago
bcook
70297880a3
fix some memory leaks in dns handling.
- Nothing seems to free the result of host_dns(), so add host_dns_free() and
call after each query.
- If imsg_add() fails, it frees buf. Avoid subsequently dereferencing the
freed buf in imsg_close().
ok millert@ deraadt@
10 years ago
bcook
53a61ebe90
prefer sizeof(thing) to sizeof(type)
ok tedu@ deraadt@
10 years ago
tedu
ff1d6653e1
don't check for a return value that host() doesn't return, so future
generations don't try to change any of the values and break the code.
ok deraadt
10 years ago
bcook
d66f723105
revert host() back to correct behavior.
unbreak config file address parsing
10 years ago
bcook
e32816bab7
return -1 on host() address parsing failure, not 1.
Match what parse.y expects it to return.
ok millert@
10 years ago
deraadt
eb02123984
remove excessive/wrong use of sys/param.h
peanuts -- but all work has to start somewhere.
10 years ago
bcook
2c934bd111
log as LOG_DAEMON in log_init again.
I mirrored from smtpd a little too literally.
10 years ago
bcook
e69bd15d31
sync log.c from smtpd.
Reduces the number of log.c snowflakes by a little, and gives ntpd a
variadic fatal() function to be used later.
ok deraadt@
10 years ago
bcook
950986b2ca
use the correct format string for refid
ok deraadt@
10 years ago
bcook
f04311c2a3
use MAXIMUM as the canonical local MAX macro.
suggested by deraadt@ re: more general MIN/MAX cleanups
10 years ago
bcook
2b0bc47767
rename sockaddr_un variables from 'sun' to the more common 'sa'.
This avoids a namespace conflict with Solaris build environments.
discussed with deraadt@ and kettenis@
10 years ago
bcook
63d93971e4
don't rely on sys/param.h having a MAX macro.
Switch to local definitions where MAX is needed.
discussed with deraadt@
10 years ago
bcook
1f5712d8d6
Remove the unused dns_pid variable.
Nothing is done with the return value from ntp_dns, and it already calls
fatal() on failure.
ok deraadt@
10 years ago
bcook
d25ace0611
removed unused libevent header and structures in ntpd.h
ok deraadt@ phessler@
10 years ago
bcook
d33f0cc042
Add a missing include for time.h to get the definitions of clock_gettime and strftime.
ok jsing@ phessler@ naddy@
10 years ago
jsg
7f4721fbaf
Don't allow embedded nul characters in strings.
Fixes a pfctl crash with an anchor name containing
an embedded nul found with the afl fuzzer.
pfctl parse.y patch from and ok deraadt@
10 years ago
doug
146b86bde3
Add gcc printf format attributes to yyerror() in parse.y files.
No yyerror() calls needed to be changed.
ok bluhm@
10 years ago
bluhm
0f1121e6f9
Convert the logic in yyerror(). Instead of creating a temporary
format string, create a temporary message.
OK claudio@
10 years ago
lteo
b8d6959e84
Remove unnecessary netinet/in_systm.h include.
ok millert@
10 years ago
deraadt
8fbccf1905
easy realloc() -> reallocarray() which gives us mult int overflow checking
for free, FREE, FREEEEE
ok doug
10 years ago
chl
059cda96b7
remove set but not used variable
found while building portable OpenNTPD
ok henning@
10 years ago
miod
65ef63a7ad
Fix format strings involving time_t arguments, fixes `ntpd -d' on sparc (and
probably more 32-bit platforms).
Problem noticed by tobiasu@; ok tobiasu@ dtucker@ sthen@ benno@
10 years ago
schwarze
22595e2034
Remove the bogus author "U. Delaware" from RFC 5905
as noticed by Arto Jonsson <ajonsson at kapsi dot fi>.
While here, give the full author names, which costs no additional work
because i had to cross-check against the original documents anyway.
11 years ago
dtucker
c438f027ad
Run the serving and privileged ntpd processes at high priority and the
dns process at normal priority. Should improve latency on loaded machines.
ok henning@
11 years ago
sthen
8b3ce8e88e
typo in errx() string
11 years ago
benno
a6df84bdf5
allow -s<abrev> in addition to -s <word> in ntpctl commandline, like
all the other tools do. changes option 'sensors' to 'Sensors'.
ok henning@, and grudgingly phessler@
11 years ago
deraadt
5d614be5df
improve ntpctl usage so that the manual page does not need to be read
every time
ok jmc
11 years ago
benno
bbbe1469c8
use u_char for buffers in yylex, for ctype calls
found by millert@, ok deraadt@
11 years ago
benno
b7644de136
from sthen: handle msgbuf_write() returning EAGAIN
ok krw
11 years ago
phessler
590be54dcd
remove the IPv4-only check for rdomains, allows IPv6 to use them
OK claudio@ henning@
11 years ago
jmc
1ceaa18b3a
tidy up the "modifier" list a little and sync usage();
NB: this utility has only one option, and it's not optional! i haven;t
marked -s as being mandatory, since hopefully someone will make
ntpctl run without arguments do something useful;
11 years ago
krw
b4d8d01803
Remove stray (long) cast of value being assigned to tv_secs.
ok guenther@
11 years ago
deraadt
27354bc9e5
improve ntpctl argv parsing
11 years ago
deraadt
cfa24d6ccc
shorten output; ok henning phessler
11 years ago
jmc
e22aa50ab0
tweak previous;
11 years ago
schwarze
c595a4fa35
Tweak previous:
* For time_t values, use the printf("%lld", (long long)t) idiom.
* Don't print "Invalid program name" in usage() when main() just runs ntpd.
* Make "Show/Shows" consistent in the manual, sort .Xr and correct .Ox.
OK phessler@
11 years ago
phessler
36ee6e401f
Add ntpctl(8), which allows us to query the locally running ntpd(8) process
diff from Mike Miller <mmiller mgm51 com> (many thanks!)
OK phessler@, henning@, todd@
11 years ago
phessler
9d257760ca
Resolve the uncertainty in the REFID assignment.
Previously, when there is an even number of offsets, we did the average
of the two middle offets but would set the REFID from one of them.
Instead, we simply select the middle offset with the lowest delay.
diff from Mike Miller <mmiller mgm51 com> (many thanks!)
OK phessler@, henning@
11 years ago
jmc
002e0f6e70
no longer any need to quote macro lines with >9 args;
From: Jan Stary
11 years ago
mglocker
27f85bb7b7
Remove unused function argument variables 'len' and 'auth' from
ntp_sendmsg(). They have been removed from the function body in the past
but not from the argument list.
From Maxime Villard
11 years ago
jmc
2c27302534
last stage of rfc changes, using consistent Rs/Re blocks, and moving the
references into a STANDARDS section;
12 years ago
patrick
bb4b345cc6
Allow ntpd.conf to assign a stratum to a sensor with the syntax stratum <level>.
OK markus@ henning@ phessler@ jmc@
12 years ago
henning
824638f799
clarify which process writes out stats upong SIGINFO reception.
pointed out by Frank Brodbeck <fab at guug.de>, actual change with & ok jmc
12 years ago
jmc
12b562f515
rfc 5905 replaces rfc 2030; for now, the reference to 2030 in ntpd.conf
stays;
ok henning
12 years ago
phessler
b318654d5a
only add the rdomain for hostname lookups, when we have a hostname to lookup.
noticed by zepard at gmail
OK henning@
13 years ago
phessler
70681d307c
fix the two most offensive indentation violations in here.
pointed out by sthen@
13 years ago
phessler
a32e45b068
Add rdomain support to NTPd.
This basically adds the "rtable %d" keyword to "listen on", "server",
"servers" keywords, to specify which routing table to use.
OK henning@ claudio@ sthen@
manpage reviewed by jmc@
13 years ago
jmc
38829c6b69
tweak previous;
13 years ago