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
eric
1349f312f5
Change the way fds passed over a socket are retreived on the receiving side.
Currently the receiver fetches an imsg via imsg_get() and if he expects
an fd, he then calls imsg_get_fd() to fetch the next fd queued on the
imsgbuf from which the imsg came.
This changes hides the fd queueing mechanism to the API user. When closing
an imsg with an fd, the message is flagged so that the receiving end knows
it must dequeue the fd in imsg_get() and return it with the imsg structure.
This way there is no (less) possible screw up from imsg_get_fd() not being
called directly after imsg_get() by the user. The retreived imsg is
self-contained.
ok pyr@, "I like that" henning@
15 years ago
eric
bc6efb40cd
Make the imsg protocol network-safe.
ok pyr@
15 years ago
eric
d11817a0e5
change the imsg header fields a bit to prepare for upcoming changes.
add a flag field, use u_int32_t for pid_t and extend type to 32 bits
for padding.
ok pyr@
15 years ago
ckuethe
f86c299c09
If ntpd decides the clock has become unsynced, reset the number of saved
time corrections. Once the clock is synced again, start computing a fresh
frequency correction.
ok henning
15 years ago
ckuethe
5bc96f22cf
Turns up the polling rate of sensors and makes ntpd calculate frequency
corrections more often. Due to physical effects crystal oscillators aren't
really stable beyond 1000s or so - at least not the kind found in pc's.
ok henning
15 years ago
pyr
239fd25471
make ntpd imsg-in-a-lib ready as well. extensive testing done, no
behavior change.
ok eric@
15 years ago
ckuethe
b6c201f1e1
After calling adjfreq to correct the clock's rate, measure and fix the clock
offset. This avoids future frequency adjustments based on measurements of a
clock that was being adjusted. End result: more stable clock and better
frequency convergence.
Also, fix a mis-ordered structure member while I'm here.
ok henning
15 years ago
henning
847353da0b
no we don't need endpwent
i remember we already had the confusion and bgpd doesn't have the endpwent
15 years ago
henning
eac29aab5e
use the SCM_TIMESTAMP socket option to get the time we received the
reply instead of doing it in ntpd itself by getting the time we read
from the socket. based on a diff from mickey hacked in shape by me,
lots of testing and review from ckuethe and sthen, theo and claudio like it
too
15 years ago
henning
e519398421
fix looking at the mode bits so that we do not reply to broadcast and other
junk. from thorsten glaser.
15 years ago
stevesk
5c2e164cbc
move text on weight to where it is first referred to;
"fine by me. it's maybe not ideal, but it's better" jmc@
15 years ago
stevesk
d3e46edd9e
when using a timedelta sensor for -s, if the sensor is invalid during
the first query we will never do the settime because
SENSOR_QUERY_INTERVAL (30s) is greater than SETTIME_TIMEOUT (15s). so
during the settime period only, be more aggressive and use
SETTIME_TIMEOUT/3 for the query interval.
ok henning@
15 years ago
henning
d56fbb72de
ignore replies with timestamps after 2030 to prevent time_t / tv_sec wraps
input & ok theo
15 years ago
tobias
1a4725225f
Fixed memory leaks which would occur if the second of two memory
allocations fails.
looks right deraadt, krw
ok henning
15 years ago
stevesk
00ae9b8707
I should know outside data must be vis(3)'d.
Don't log kiss code for now.
16 years ago
stevesk
5181f4815e
received refid should not be converted to host byte order; ok henning@
16 years ago
stevesk
41d74ba791
log reason when not synced; ok henning@
16 years ago
stevesk
dce94defaf
-v logs debug adjtime calls also; ok henning@
16 years ago
stevesk
63f41dd5bb
move prototypes that are really in ntp.c; ok henning@
16 years ago
stevesk
75af6f507d
log tiny frequency adjustments at debug only.
ok henning@, 'I think I agree' otto@
16 years ago
stevesk
7599b90b0a
endservent() not needed here; ok henning@
16 years ago
stevesk
f5caca2fd9
spelling in comment
16 years ago
stevesk
d48f49351f
rename a #define to be clearer; no binary change
ok henning@
16 years ago
stevesk
127c7d964a
adjtime has been logged at 32ms and greater for 2.5 years now.
ok henning@ jmc@
16 years ago
stevesk
5e5980c0aa
log warning when can't read drift file; allows detection of
corrupt contents. ok henning@
16 years ago
stevesk
4e2022dc16
fix printf format specification to print max len 4 for refid,
which may not be null terminated; ok henning@
16 years ago
naddy
2e8579dfc0
return the correct refid for a sensor; ok henning@
16 years ago
henning
6fa9409593
use monotime instead of wallclock for the report thing as well
found on this laptops harddisk, probably from stockholm
16 years ago
claudio
e4276bb410
Correctly skip the internal fd when checking the server sockets. Use PFD_MAX
to start the for loop and not 1 which was correct long long time ago.
OK otto@ found by Anirban Sinha ASinha(at)zeugmasystems.com
16 years ago
deraadt
1aa383330e
delete operation not needed; from naddy
16 years ago
deraadt
7a1c705b0b
If a bind() spuriously fails (as appears to happen once in a blue moon due
to some stupid ipv6 bug in particular), remove that 'listen' from the list
and continue operation. issue spotted by naddy
ok henning
16 years ago
henning
6d35b226f2
bring in findeol() fix from pfctl
16 years ago
sthen
1fba7a6e18
- use nmea(4) for general sensor example rather than udcf(4)
which only works in w.europe
- use a more realistic value for udcf correction example
- use a GPS-only receiver for "refid GPS" example
suggested/ok mbalmer
16 years ago
henning
dafa0203af
in priv_settime(), we must not adjust the 'next' timestamps on their for
the offset since we use monotime for these for some time now, and monotime
is not affected by system time changes (like, duh, that was the reason for
the change). PR5927
16 years ago
deraadt
3bfc3dc465
ntpd does not require you to run rdate -n before it -- it notices such an
event. so don't use the word "before" .. and leave the mention ambigious
ok henning
16 years ago
henning
9bf99d851b
move dns lookups to its own (privilege revoking, not chrooting) process.
reason: the parent process must never ever block, but the dns routines can.
last not least this fixes ntpd -s 'hanging' for a long time.
tested by a couple of people
16 years ago
claudio
3024525a7d
Use errx instead of fprintf, exit combo.
Diff from Gleydson Soares gsoares (at) gmail (dot) com
OK henning@
16 years ago
naddy
c102a69a3a
For IPv6 addresses, return the first 32 bits of the MD5 hash of the
address as ref ID (RFC4330). ok henning@
16 years ago
naddy
ca3fb2ec5f
According to the latest SNTPv4 spec in RFC4330, secondary servers
return the address of the synchronization source as reference
identification. Remove the obsolete special casing specified in RFC2030.
ok henning@
16 years ago
deraadt
52e9696746
rename refstr to refid since it is an int32; ok henning
16 years ago
deraadt
a18f78208a
do not copy up to two garbage characters from a 1 char string into a 4 char
output buffer; ok henning
16 years ago
deraadt
2d91cee4c2
do not leak memory on failure in refid production; ok ckuethe henning
16 years ago
deraadt
6b9dac3b42
spacing
16 years ago
ckuethe
e6e5dc66c8
Allow outgoing replies from sensor-driven servers to have a
user-configurable reference ID, eg. "GPS" or "DCF"...
ok mbalmer
16 years ago
ckuethe
ac65ec9396
Don't ignore a slightly unresponsive server for an hour, 5 minutes is enough.
comments & ok henning@
16 years ago