millert
84b4f5d4e8
POSIX says "data" is void *, not char *. Also remove extern from prototypes.
deraadt@ OK
20 years ago
henning
693a157803
kill traces of on-the-fly reconfigure (from bgpd), not needed in ntpd
20 years ago
henning
9913070411
remove a bogus always-true test before adjtime()
20 years ago
henning
7364dc1c59
remove all handling of netmasks/prefix lengths - we don't need that in ntpd.
fixes the dns resolves to v4 and v6 addresses bug found by phessler
hacked on the Calgary->Montreal flight that proved that Air Canada _does_
have some modern aircrafts with good seats
20 years ago
henning
23963e1ca9
log_debug() when a peer doesn't answer in time
20 years ago
henning
b6bb1936a0
lof replies with log_debug so one gets increased verbosity when in
foreground/debug mode
20 years ago
henning
be71ed5f08
make log_debug() only log anything at all when we are in debug mode
before, it would log with LOG_DEBUG to syslog when !debug
20 years ago
jmc
4802b1c4fb
tweaks; ok henning@
20 years ago
jmc
e7a525d469
add rdate(8) to SEE ALSO;
20 years ago
alexander
a8cb348cd7
RFC 2030 is incorrect with regards to the computation of the delay value
for NTP queries/replies. RFC 1305 and some of Mills' other papers have
the correct formula.
ok henning@
20 years ago
henning
2a97ac1447
+ ntpd.conf, Bernd Ahlers <ba@bsws.de>
20 years ago
henning
727098a446
help the compiler a bit with a cast, spotted by theo
20 years ago
alexander
353bc5222d
* Convert to use the new double-based time handling functions.
* Respond to the query with a reasonable received time (which
will help clients get better accuracy).
* Consolidate the server response code in preparation for a
completely 'proper' response to the client.
tips and ok from henning@
20 years ago
alexander
59dafa077b
Endian conversion mistakenly done before fraction math; ok henning@
20 years ago
henning
f429ec57f6
ease code and tweak logging
20 years ago
henning
d6f04943b0
don't log every single reply we receive and log local clock adjustemt nicer
20 years ago
deraadt
e21e9e7c5b
knf!
20 years ago
henning
fd5d60e4e2
if the cookie in the received packet doesn't match discard it silently;
the logging was useful for development but is a bad idea in production
use as a remote attacker could flood your logs
20 years ago
deraadt
f0dcfec8a3
better defaults; ok henning
20 years ago
henning
c02368d5ff
make this a reasonable default; don't listen anywhere and sync to
pool.ntp.org. Give some commented out examples tho.
20 years ago
henning
555e8ed029
document
listen on *
20 years ago
henning
e74cfb6cd2
do not listen anywhere by default.
listen on *
listens, well, everywhere.
20 years ago
david
4588e28098
remove ntp.conf and add ntpd.conf; ok henning@
20 years ago
henning
f9b849bb9e
server spec takes hostnames now, default to pool.ntp.org
20 years ago
henning
4a8fb608ce
yuck, another bad sizeof(). again in code hacked on the Frankfurt->Montreal
flight. should we draw concludions from that? I'd like to blame the
Air Canada seats...
20 years ago
henning
21aaad0466
host_* now returns pointers, so the error return is NULL and not 0
20 years ago
henning
05a94ce779
swicth all the host_* functions to work on a newly invented
struct ntp_addr, which just wraps a sockaddr_storage and a next pointer,
so that host_dns can return more than one entry.
let host_dns do exactly that, return a list of all IPs for that hostname
adjust all callers in the grammar to cope with that
20 years ago
henning
d8e805cbfb
servers can be given as hostnames now
20 years ago
henning
ccb62d3811
keep a "trustlevel" per peer. loose credit for loosing a packet, loose
a lot of credit for not having supplied us with enough data within an
adjtime run interval, and get a little credit each time we get a good
reply packet. if a peer is below 20%, only send a packet occasionally to
see wether it is back. send out queries much more often between 20 and 80%
to (re-)sync quickly, and above 80% usethe regular interval.
do not use peers < 60% for calculating teh local clock offset.
designed with theo at the pho, alexander ok
20 years ago
henning
1bd657839e
Implement the clock filter as descirbed by David Mills:
form the last 8 replied received from a peer, find the one with the lowest
delay. Use that as the peer's update taken into account for calculating
the local clock's offset.
Invalidate that reply and all ones received earlier than it so that they do
not get used again.
20 years ago
henning
6127dae75c
sizeof(wrong struct) in calloc == bad. ^$&(#^$%&#*)!
20 years ago
henning
12fb5f8424
when we received a apcket with incorrect cookie log from whom as well
20 years ago
jason
1694ed9e27
log host packet was received from (originally using a long convoluted
function until henning showed me the light... log_sockaddr... nifty);
this diff is from henning and should be henning ok =)
20 years ago
henning
a62ef89ddb
allow hostnames and resolve them in the config file
20 years ago
naddy
ca612edc92
initialize the variables that track the offset array; ok henning@
20 years ago
henning
33684f5b14
eh, actually add the startup code for ntpd
20 years ago
deraadt
9966f66b52
bit too rushed :-)
20 years ago
henning
9449fe79c2
remove startup code for that other ntpd from ports and use the one
in base instead. theo ok & rush to go for beer
20 years ago
henning
83435a0b47
sample ntpd config file
20 years ago
henning
e490cc8936
keep last 8 offset,delay pairs - we'll need them for the clock filters later.
for now, average over those to adjust the local clock.
20 years ago
henning
25baf3f656
delay, not error
20 years ago
otto
74f0809de0
use correct multiplier for us -> s conversion
20 years ago
henning
ff435348cf
don't limit to one remote server any more
20 years ago
henning
7cb3db11e2
calculate the median offset from all servers we sync to and call
adjtime() when necessary to keep the local clock in sync
yes, that means ntpd syncs the local clock now.
20 years ago
henning
43d3d7e70a
put interval defines in ntpd.h and name them consistently
20 years ago
henning
d6fd2597f7
simplify slightly
20 years ago
henning
bc7ac3d288
KNF
20 years ago
alexander
9b6618babd
Compute the local clock offset from the server's response.
ok henning@
20 years ago
alexander
ff4cb11db4
wrong struct calloc'ed; ok henning@
20 years ago
jmc
9ddc3b1129
kill dead .Xr to memory(3);
from kjell@
20 years ago