Commit graph

97 commits

Author SHA1 Message Date
Miroslav Lichvar
8e23110aec Update COPYING and FSF address 2009-10-28 17:53:33 +01:00
Miroslav Lichvar
f7e08d0c30 Update copyrights 2009-10-28 17:53:10 +01:00
Miroslav Lichvar
f2f592fa0d Update documentation for refclock and IPv6 support 2009-10-28 16:53:03 +01:00
Miroslav Lichvar
465e580a39 Remove forgotten text in server directive description 2009-10-28 16:31:58 +01:00
Miroslav Lichvar
b4069a4c3b Add PPS API refclock driver 2009-10-28 12:40:39 +01:00
Miroslav Lichvar
352f03d487 Reselect source also according to distance
Reselect when a source with the same stratum is available and has
significantly better distance than the current source.
2009-10-27 14:28:19 +01:00
Miroslav Lichvar
8cd9e68246 Make default refclock refid from number of the source
It should avoid having two or more refclocks with the same refid.
2009-10-27 14:04:59 +01:00
Miroslav Lichvar
5b4e07d658 Add refclock option for delay
This is useful when refclocks don't agree on time, increasing the
delay will widen the interval used in the source selection algorithm.
2009-10-27 14:02:16 +01:00
Miroslav Lichvar
48b6c2aa6b Reduce size of NTP sources hash table
IPv6 addressing significantly increased size of the table,
keep only pointers to get it back.
2009-10-13 17:16:41 +02:00
Miroslav Lichvar
1570f97ee2 Include both refid and IP address in tracking and sourcestats reports
ref_id is not sufficient for IPv6 addresses and ref_id is needed for
reference clocks.
2009-10-13 16:16:57 +02:00
Miroslav Lichvar
fbd20c429e Add -4 and -6 options to set address family when resolving names 2009-10-13 16:15:49 +02:00
Miroslav Lichvar
a7892a1a15 Always send timevals in cmdmon protocol in 64-bit format
This is to avoid incompatibility between 64/32-bit client/server.
While at it, convert all time values in the protocol to timeval
to avoid Y2K38 problem.
2009-10-13 16:15:23 +02:00
Miroslav Lichvar
8265ff2890 Add IPv6 support 2009-10-13 14:44:33 +02:00
Miroslav Lichvar
183d56fd40 Don't use uninitialized values
This fixes a bunch or valgrind errors.
2009-10-13 14:43:47 +02:00
Miroslav Lichvar
d06f02be1c Don't forget to free capability object 2009-09-21 12:47:17 +02:00
Miroslav Lichvar
5a2b38378c Don't copy util functions in client.c
This requires moving croak() to logging.c and avoiding use
of log functions in util.c.
2009-09-15 18:08:58 +02:00
Miroslav Lichvar
19f3a6bca8 Fix string termination in refclock parameter parser 2009-09-09 17:12:43 +02:00
Miroslav Lichvar
dd4fb511a5 Don't lose remaining adjtime in initiate_slew
initiate_slew is called also from set_frequency which doesn't read
the remaining adjtime. This wasn't a problem before commit 8c0f3f4
as offset_register was 0.0 and initiate_slew immediately returned.
2009-08-26 17:58:57 +02:00
Miroslav Lichvar
3a9e13445f Add SOCK refclock driver
This adds a support for receiving samples over unix domain socket.
It's a better alternative to the SHM refclock, the resolution is not
limited to microseconds and it doesn't require polling.
2009-08-19 15:39:06 +02:00
Miroslav Lichvar
67c0f1c08c Switch refclock driver parameter to string 2009-08-19 15:29:52 +02:00
Miroslav Lichvar
8de55124a8 Add support for SO_TIMESTAMP control messages
SO_TIMESTAMP messages contain kernel time stamps for received packets,
this should improve accuracy and avoid the impact of CPU scheduling
latencies.
2009-08-08 12:50:04 +02:00
Timo Teras
0666d04ab2 Set reply source IP from query destination IP
Currently, on multihomed host, when chrony is not bound to a specific
IP address, a query is sent to an interface and the default source IP
hint for the back route differs, the reply will have a source IP
different than where the query was destinied to. This will cause
problems because connection tracking firewalls will drop the replies
and most likely the client program will get confused too.

This patch uses the IP_PKTINFO mechanism to get the IP address where
received packets where targetted to and use that IP address as source
hint when sending a reply.
2009-08-07 17:02:11 +02:00
Timo Teras
d87cddd6a5 Switch to recvmsg/sendmsg to get access to control messages 2009-08-07 14:27:51 +02:00
Miroslav Lichvar
84cbeeadd1 Add editline support
GNU readline recently changed license to GPLv3+ which makes it
incompatible with chrony (GPLv2). This patch adds support for editline
library (BSD license).
2009-07-17 12:48:00 +02:00
Miroslav Lichvar
eefb5c7552 Fix compiler warnings in getdate.c 2009-07-06 11:49:26 +02:00
Miroslav Lichvar
8c0f3f4042 Try to minimize adjtime error
The offset is rounded before calling adjtime and the error below
microsecond is accumulated.
2009-07-01 15:56:00 +02:00
Miroslav Lichvar
735811b2b9 Add median filter for refclocks 2009-07-01 15:55:56 +02:00
Miroslav Lichvar
923c58485f Add client support for Kiss-of-Death RATE
This adds support for RATE code which can be used in reply from NTP
server to reduce client's polling.
2009-06-30 18:01:55 +02:00
Miroslav Lichvar
032d1db883 Add support for ADJ_OFFSET_SS_READ mode
Also assume that kernels >= 2.6.27 don't need frequency scaling.
2009-05-20 17:43:09 +02:00
Miroslav Lichvar
75330fdff5 Add SHM refclock driver 2009-05-05 23:06:04 +02:00
Miroslav Lichvar
ac30bb06ef Add support for reference clocks 2009-05-05 23:05:59 +02:00
Miroslav Lichvar
ef3669fe1b Make sure skew isn't 0.0 to avoid segfaults 2009-05-05 08:52:33 +02:00
Miroslav Lichvar
9416a24f03 Don't finalise from signal handler 2009-04-29 13:53:02 +02:00
Miroslav Lichvar
8b81bfe41d Reduce request timeout in chronyc 2009-04-27 16:44:44 +02:00
Miroslav Lichvar
96759116e2 Fix memlockall patch 2009-02-11 18:01:23 +01:00
Miroslav Lichvar
4aae133c4d Fix compiler warnings in wrap_adjtimex.c 2009-02-10 18:06:25 +01:00
John Hasler
35e662d810 Add mlockall and SCHED_FIFO support
The attached patch adds support for mlockall() as well as the SCHED_FIFO
real-time scheduler. It should result in reduced (and more consistent)
latency. Usage is documented in all the documents.
2009-02-10 18:02:28 +01:00
Miroslav Lichvar
cdc22df903 Fix leap sign in measurements log 2009-01-08 13:34:54 +01:00
Miroslav Lichvar
8f9c237010 Leap second support
Leap second status is accepted and forwarded to clients if majority
of selectable sources agree. The actual insertion/deletion is supported
only on Linux now.
2009-01-08 13:33:15 +01:00
Miroslav Lichvar
0148ecaea0 Retry name resolving after temporary failure few times before giving up
This is a temporary fix to allow starting when resolv.conf is not ready yet
(e.g. when using NetworkManager). It may delay start up to 1022 seconds.
2008-11-10 15:54:06 +01:00
Miroslav Lichvar
fd2641bcb9 Fix resolving IP addresses into names on 64-bit big-endian machines 2008-11-06 18:18:41 +01:00
Miroslav Lichvar
be42b4eeea Linux capabilities support
Attached is a patch adding a linux capabilities support to chronyd. It
adds -u option which can be used to specify the user which chronyd
should switch to.
2008-11-05 23:50:48 +00:00
Miroslav Lichvar
8336f14680 Fix errors detected by valgrind
I tried running chronyd in valgrind and the result was that there are four
places where memory is not initialized. A patch fixing the errors is in the
attachment.
2008-11-05 23:48:58 +00:00
John Hasler
bc0aaa9217 Fix fault where chronyd enters an endless loop on x86_64
John writes:
Here is a patch that should prevent the endless loop.  I've changed
UTI_NormaliseTimeval() to use divide/remainder instead of a loop.  It also
replaces some similar loops with calls to UTI_NormaliseTimeval() and fixes
an unrelated bug in UTI_DiffTimevals().
2008-10-01 23:57:20 +01:00
Thomas Zajic
71aa36aa6e Fix IP addressing in chronyc
Thomas wrote:
I found a bug in the chrony client (chronyc) that affects its ability to talk
to remote hosts over the control port (323/udp).

For example, running "chronyc -h 192.168.1.3 sources -v" would just sit there
and hang, and eventually timeout. I found out with tcpdump that chronyc
actually tries to connect to 255.168.1.3 instead of 192.168.1.3.
2008-07-29 23:35:42 +01:00
Goswin Brederlow
2f2446c7dc Fix for chronyc "sources" command on 64 bit machines
(Taken from
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=348412
)

Attached is a patchlet to make the "sources" command of chrony output properly
signed numbers. The chronyd code (see e.g. ntp.h) properly uses int32_t and
friends to get the right number of bits per datatype while client.c just uses
short, int, long. But long will be 64 bit or 32 bit depending on the cpu.
2008-03-29 20:49:59 +00:00
Richard P. Curnow
5331e1a146 Update NEWS for 1.23 2007-12-02 14:53:09 +00:00
Richard P. Curnow
eeac7b7ca0 Define io_linux.h constants for x86_64
Based on thread from chrony-users, October 2007.
2007-12-02 14:39:50 +00:00
Richard P. Curnow
efcf3f7c6b git archive's --prefix arg needs a trailing / 2007-06-27 23:57:03 +01:00
Richard P. Curnow
eb4c9d908c Use git-archive instead of the obsolete git-tar-tree in make_release 2007-06-27 23:54:43 +01:00