alexander
ce8c1ff72e
Start collecting the remote server state along with the calculated
offsets, in preparation for having correct server statistics in
responses to client queries. ok henning@
20 years ago
alexander
4a0548a461
KNF; ok henning@
20 years ago
alexander
d1a5206262
short fixed point <-> double conversion routines; ok henning@
20 years ago
alexander
86d8c45421
correct leap indicator mask; ok henning@
20 years ago
henning
d85732044e
missing {}
20 years ago
henning
042700aed2
check wether we have enough data to form a peer update on receiption
of each packet, not only after each 8th (where we have enough for sure)
20 years ago
henning
b0438e2e01
oups
20 years ago
henning
d2decbe40d
scale query interval based on local clock offset. tested by many
not as efficient as I want it to be yet, but more is coming
20 years ago
deraadt
6cdf6e9f4a
make lint a wee bit happier
20 years ago
jmc
bb486dac9b
make date(1), rdate(8), ntpd(8), and timed(8) .Xr themselves;
mostly from Andreas Kahari (PR #3846 );
20 years ago
otto
2d0abebaa2
Do not forget to initialize head. ok henning@
20 years ago
deraadt
bc46ad847f
too chatty; ok henning
20 years ago
henning
cb18fdd6ed
don't panic when sendto() fails; for the client part just re-schedule
noticed & fix tested by fries@
20 years ago
henning
3266f15dd7
don't try to update the clock when we have no data
20 years ago
jaredy
68ee106621
various cleanup:
- mention '#' comments
- fix macros for directives
- typos
- change list display
- ntp -> NTP
- slight rewording
help and ok jmc
ok henning otto
20 years ago
henning
645e5a78aa
the child process needs to ignore SIGHUP for now, otto
20 years ago
henning
7d74cf41b4
remove leftover pieces of on-the-fly reconfig shitz that made ntpd exit on
SIGHUP, noticed by otto
20 years ago
henning
4b686ed70a
soem tweaks from the Frankfurt->Hamburg flight
20 years ago
henning
14f72744de
it is "servers" now for pool.ntp.org
20 years ago
henning
8d7f06ed15
document the "servers" keyword
20 years ago
henning
cf385f93cd
rework dns handling with all its cosequences...
we know have both a "server" and "servers" keyword. they differ when the
hostname resolves to more than one IP, server picks one and servers expands
to all.
that means no longer stuffing a sockaddr_storage into ntp_peer but a pointer
to a linked list of ntp_addr structs.
in the "servers" case the list of n addresses returned by host() is expanded
into n ntp_peer structs and thus n individual peers.
in the "server" case the whole list is attached to ntp_peer, and whenever we
do not receive a reply in time we traverse the list one further, so that
hosts with both AAAA and A records are first tried with the AAAA one but
we gracefully fall back to the A one.
semantics with theo; hacked up on the Montreal->Frankfurt flight.
again Air Canada surprised me, that older 767 hat pretty decent seats.
20 years ago
henning
1aa4442f07
when calculating the timeout for poll() we need to take the deadlines for
the outstanding queries into account
just-before-meal from the Montreal->Frankfurt flight
20 years ago
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