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@
9 years ago
bcook
950986b2ca
use the correct format string for refid
ok deraadt@
9 years ago
bcook
f04311c2a3
use MAXIMUM as the canonical local MAX macro.
suggested by deraadt@ re: more general MIN/MAX cleanups
9 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@
9 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@
9 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@
9 years ago
bcook
d25ace0611
removed unused libevent header and structures in ntpd.h
ok deraadt@ phessler@
9 years ago
bcook
d33f0cc042
Add a missing include for time.h to get the definitions of clock_gettime and strftime.
ok jsing@ phessler@ naddy@
9 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.
10 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@
10 years ago
sthen
8b3ce8e88e
typo in errx() string
10 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@
10 years ago
deraadt
5d614be5df
improve ntpctl usage so that the manual page does not need to be read
every time
ok jmc
10 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
henning
cd6e519e99
improve -s description. the major points are set vs adjust and stay in
the forground until we receive a reply or hit the 15 second timeout.
with theo, evolved out of sth completely different
13 years ago
jmc
6abc52961d
tweak previous;
13 years ago
deraadt
3fe791be41
timed's time is up. use ntpd(8). Even our own fossil developers
switched a while back.
ok miod, kettenis
13 years ago
henning
42e087b3c6
close pipe_prnt[0] earlier, foremost before forking the dns process
pointed out by Running Razor <runningrazor at web dot de>
13 years ago
henning
2d925b01d9
clamp stratum to NTP_MAXSTRATUM. lingering in my tree for ages. someone likely
deserves to get credited for this, but I have no idea where that came from
13 years ago
okan
59189da029
use timerclear macro
ok henning@
13 years ago
henning
029fb73afa
fix linecount bug with comments spanning multiple lines
problem reported with the obvious fix for bgpd by Sebastian Benoit
<benoit-lists at fb12.de>, also PR 6432
applied to all the others by yours truly. ok theo
isn't it amazing how far this parser (and more) spread?
14 years ago
eric
6f6b8fa1fb
don't need to setup the resolver early now that dns lookups are done
by the dns engine.
ok henning@
14 years ago
nicm
8b7d56fe29
Move imsg into libutil and add a man page.
Minor bump for libutil.
Previous versions of this diff and man page looked at by various people.
"you should just commit" deraadt
14 years ago