henning
c24767cca2
scan for new timedelta sensors every five minutes for now, ok deraadt
18 years ago
henning
9bb919c475
ntpd does timedelta sensors now too
18 years ago
henning
fe9a290e7a
document timedelat sensors. ok deraadt
18 years ago
henning
f687c4f193
config file bits for timedelta sensors, so one can specify which devices
to use. "sensors *" just uses all. untested due to lack of hardware.
hacked on the road somewhere between vancouver and calgary
18 years ago
deraadt
1036a9d27a
\<char> is <char> except for \<newline> -- no exceptions. much like how
other things work. ok henning
18 years ago
henning
21382f5e23
add support for timedelta sensors, which pretty much means udcf(4) right
now. untested due to lack of hardware, and it wouldn't have worked in the
plane anyways. work in progress, currently picks up and uses all sensors
it finds, config file bits to be added soon. theo fine with this going in
18 years ago
henning
1d2ad6e90a
more bits from transatlanic flight:
make priv_adjtime() deal with offsets, not peers.
18 years ago
henning
309a243757
figure out the refid to send to NTP v3 clients early and store it
first bits from a way to long flight
18 years ago
henning
926119b732
make listen on example idiot proof
suggested by "Karsten W. Rohrbach" <karsten@rohrbach.de>
18 years ago
henning
a139e32a41
PFD_MAX betterer than harcoded 1
18 years ago
stevesk
b020f35b9f
handle -1 return from host_dns(); ok henning@
19 years ago
dtucker
a37ee71683
Do not attempt to listen on interfaces with a wildcard address; ok henning@
19 years ago
dtucker
d71b0751da
Check SA_LEN(sa) after sa is checked for NULL. Pointed out by solar at
openwall.com, ok henning@
19 years ago
dtucker
73c6d5ec9f
Log source address for 'malformed packet' errors. ok henning@
19 years ago
wvdputte
33dc34f1c7
when running ntpd with "-s" as it's argument from /etc/rc.conf, make sure the
output goes to syslog and not console by moving around log_init
OK henning@, markus@ and mblamer@
19 years ago
henning
04339771ec
on writing, we actually can deal with ENOBUFS just as well as with EAGAIN
and EINTR, so do it, more or less from bgpd
19 years ago
henning
3b0d5b83e8
check for EINTR too after writev(), pt out by Alexander Farber
19 years ago
dtucker
f31cfdaa27
Propogate server's leap indicator flags to clients; ok henning@
19 years ago
henning
4cc3be5e18
with -s, do not wait if we don't have any peers at all.
From: Thomas Jarosch <thomas.jarosch@intra2net.com>
19 years ago
dtucker
020dd82b59
Skip invalid interfaces during 'listen on *'; ok henning@
19 years ago
henning
2d70ef1866
shrink read buffer size from 64k to 4k, this is not bgpd and we're dealing
with way less data
19 years ago
henning
b315af7289
remove recently added "using privsep user X" message, spams console in -s
mode, noticed by kettenis
19 years ago
henning
015104437f
fix a function name in an error message
why this was rotting in my tree for so long, I dunno - and I dunno where it
came from
19 years ago
dtucker
98e724b50a
More descriptive error if a signal causes the child to exit; ok henning@
19 years ago
dtucker
c6fbdd6b60
Print privsep user and dir when in debug mode; ok henning@
19 years ago
dtucker
4eaa821e76
Print actual error when in debug mode; ok henning@
19 years ago
dtucker
b5f096de27
add another non-fatal error for recvfrom; ok henning@
19 years ago
dtucker
f9299bb123
Save transmit time for each peer for later use as refid for SNTPv4
replies. ok henning@
19 years ago
deraadt
f107efab9c
we do not do -s in /etc/rc anymore. this is because, even if -s did try to
do it's job it would have to choose between two cases:
1. either it would take a very long time to get the correct adjustment, thus,
if you are not currently on the net right, you wait a long time (or must
type ^C, which is ridiculous)
2. ntpd could be modified to "abort early", but then would not meet the
promise made by -s in the manual page (note: it does not say that it
"tries")
therefore, -s and -S must become user choices. Sorry. This same choice is
made in lots of other places
19 years ago
henning
a16f15c2c3
use a #define for the time to wait on -s and clarify a log msg
19 years ago
henning
ed37b625d3
use a little state engine to keep track of delayed dns lookups and such,
eases things
tested by Jason Ackley <jason@ackley.net> Matthias Kilian
<kili@outback.escape.de> Stephen Marley <stephen@marley.org.uk> sturm@
theo ok
19 years ago
dtucker
f5ecdec08b
Ensure previous adjust has completed before clearing alarm flag; ok henning@
19 years ago
henning
e7bcb5fe62
ifa->ifa_addr can be NULL in some cases, pt out by Kurt Roeckx
<kurt@roeckx.be> / bugs.debian.org/310586
19 years ago
henning
8f835e4902
no need for endpwent(0 here either
19 years ago
henning
708d2e7376
don't touch *hn in failure case. no real change due to the way we use it
but more correct.
from Michael Knudsen <e@molioner.dk>
19 years ago
djm
5a26462171
setres[ug]id; ok deraadt@
19 years ago
henning
50e41e169b
unify shared code a bit again to make future syncs easier
From: Alexander von Gernler <grunk@pestilenz.org>
19 years ago
henning
f2765f2a2f
move the "reply from ... " log msg in -d mdoe uop a bit so it actually
comes before the "adjusting local clock by..." one, joerg
19 years ago
henning
3ce098c434
extra paranoia, from a discussion with joerg
19 years ago
henning
90903372f9
correctness: only account for offset after settime in next and deadline
when those timers are actually running. due to the way ntpd's logic works
this does not really make a difference, but correctness is good.
spotted by me, joerg agrees
19 years ago
henning
d2787fa263
after setting the clock hard correct the "next" and "deadline" timestamps
by the offset
From: Joerg Sonnenberger <joerg@britannica.bec.de>
19 years ago
henning
7082200ffe
prevent replies with negative delay from being used, could happen with -s
From: Joerg Sonnenberger <joerg@britannica.bec.de> of dragonfly
19 years ago
henning
4395949868
zap includes, grunk
20 years ago
henning
b7d0279fa2
zap includes, Alexander von Gernler <grunk@pestilenz.org>
20 years ago
henning
de27be63ae
one more fatal/fatalx, alexander
20 years ago
henning
79255b7f6b
fatal vs fatalx, Alexander von Gernler
20 years ago
henning
a71057c067
remove now osolete comment, from a mail exchange with
Alexander von Gernler <grunk@pestilenz.org>
20 years ago
henning
e0f325591a
wpos in struct buf_read and datalen in imsg_get should be size_t and not
ssize_t
From: Alexander von Gernler <grunk@pestilenz.org>
20 years ago
dtucker
0a9920c236
Fixes in ntpd_settime (ie ntpd -s):
- Handle errors from syscalls better
- Prevent curtime.tv_usec from being negative for negative offsets.
- Don't claim to have done settimeofday if it fails.
ok henning@
20 years ago
henning
62c3d341a1
nasty: host_dns used to run before forking and chrooting etc, so it was
guaranteed that its res_init() call was done once before fork etc...
that is no longer the case. call res_init() in main() early.
20 years ago