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
nicm
62564ff79f
Rename some imsg bits to make namespace collisions less likely buf to
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE.
ok henning gilles claudio jacekm deraadt
14 years ago
nicm
f68c72e36f
imsg.h does not need sys/tree.h.
ok eric
14 years ago
deraadt
70f0799f54
Get rid of MAXSENSORDEVICES. Gaps in sensordev lists are now handled
by returning ENXIO instead of ENOENT, to essentially indicate hotplug
sensor that has gone away. Accessing beyond the end of the sensordev
list still returns ENOENT, so that you can see there are no further devices.
ok kettenis oga
14 years ago
nicm
b70ec51c0d
Remove XXX comment and just close received fd if calloc() fails.
If this happens the imsg may no longer be usable as there may be queued
messages, but this is a) already the case with the code now, and b)
would be the case if recvmsg() fails anyway, so we can document that -1
from imsg_read() invalidates the struct imsgbuf.
discussed with and ok eric
14 years ago
jacekm
3a304260b4
Enclose repeated buffer draining code in a new msgbuf_drain()
function, which is additionally exported for use by others.
It will be needed by smtpd's SSL module when the SMTP client code
is changed to replace libevent's evbuffers with our msgbuf_* API.
ok gilles@ henning@ guenther@ eric@
15 years ago
nicm
1ce69afa27
Make imsg_clear close and free any fds in the received fd queue as well as
freeing the msgbuf.
While here also remove an unnecessary while loop.
ok eric pyr
15 years ago
eric
c6ea694786
make buf_write() behave like msgbuf_write(): send out only the
bytes that were filled, not the whole buffer.
ok pyr@ gilles@
15 years ago
deraadt
ca24495ec9
incorrect .PATH setting, discovered with nicm
15 years ago
henning
f4727d5d25
recvmsg ENOENT noncritical too
15 years ago
henning
c9840c00e0
ENOPROTOOPT is non-fatal on recvfrom, can apparently happen with ipvshit
15 years ago
henning
975a1387cb
effectively un-do r1.111, it fucks machines with bad clocks royally.
spotted the hard way by theo on armish, pinned to this changed by me.
no cookie for ckuethe for not testing on machines with bad clocks.
15 years ago
dlg
eb4aea697b
revert this change by eric@:
Make the imsg protocol network-safe.
it might be network safe, but half the imsg based daemons on my firewalls
dont run anymore.
15 years ago