]> git.ipfire.org Git - thirdparty/chrony.git/log
thirdparty/chrony.git
11 years agocmdmon: allocate reply slots in smaller quantums
Miroslav Lichvar [Wed, 24 Sep 2014 15:56:08 +0000 (17:56 +0200)] 
cmdmon: allocate reply slots in smaller quantums

11 years agocmdmon: use char for permissions table
Miroslav Lichvar [Wed, 24 Sep 2014 14:58:16 +0000 (16:58 +0200)] 
cmdmon: use char for permissions table

11 years agorefclock: include refid in some debug messages
Miroslav Lichvar [Wed, 24 Sep 2014 14:36:45 +0000 (16:36 +0200)] 
refclock: include refid in some debug messages

11 years agoutil: optimize UTI_RefidToString()
Miroslav Lichvar [Wed, 24 Sep 2014 13:13:03 +0000 (15:13 +0200)] 
util: optimize UTI_RefidToString()

11 years agortc: allocate samples dynamically
Miroslav Lichvar [Wed, 24 Sep 2014 15:35:04 +0000 (17:35 +0200)] 
rtc: allocate samples dynamically

11 years agoconf: allocate sources dynamically
Miroslav Lichvar [Wed, 24 Sep 2014 12:59:20 +0000 (14:59 +0200)] 
conf: allocate sources dynamically

This removes the limits on maximum number of sources specified by the
initstepslew, server and refclock directives in the config file.

11 years agontp: allocate source records dynamically
Miroslav Lichvar [Wed, 24 Sep 2014 12:49:51 +0000 (14:49 +0200)] 
ntp: allocate source records dynamically

This removes the limit on maximum number of added NTP sources.

11 years agorefclocks: allocate refclock instances dynamically
Miroslav Lichvar [Wed, 24 Sep 2014 11:56:45 +0000 (13:56 +0200)] 
refclocks: allocate refclock instances dynamically

11 years agokeys: allocate keys dynamically
Miroslav Lichvar [Wed, 24 Sep 2014 11:47:52 +0000 (13:47 +0200)] 
keys: allocate keys dynamically

This removes the limit on maximum number of keys in the key file.

11 years agosched: allocate file handlers dynamically
Miroslav Lichvar [Wed, 24 Sep 2014 11:43:07 +0000 (13:43 +0200)] 
sched: allocate file handlers dynamically

11 years agosources: reallocate arrays in exponentially increasing sizes
Miroslav Lichvar [Wed, 24 Sep 2014 11:22:31 +0000 (13:22 +0200)] 
sources: reallocate arrays in exponentially increasing sizes

11 years agontp: improve hashing of sources
Miroslav Lichvar [Tue, 23 Sep 2014 15:12:56 +0000 (17:12 +0200)] 
ntp: improve hashing of sources

Use 32-bit hash and switch to quadratic probing. This will be useful to
allow resizing of the hash table and not limit the number of sources.

11 years agoAdd array utility functions
Miroslav Lichvar [Wed, 24 Sep 2014 09:31:33 +0000 (11:31 +0200)] 
Add array utility functions

11 years agoFree allocated memory on exit
Miroslav Lichvar [Tue, 23 Sep 2014 11:35:38 +0000 (13:35 +0200)] 
Free allocated memory on exit

This should reduce the number of possible memory leaks reported by
valgrind. The remaining reported leaks are sched tqe allocation, async
DNS instance allocation, cmdmon response/timestamp cell allocation, and
clientlog subnet allocation.

11 years agocmdparse: don't duplicate hostname in CPS_ParseNTPSourceAdd()
Miroslav Lichvar [Wed, 24 Sep 2014 10:41:38 +0000 (12:41 +0200)] 
cmdparse: don't duplicate hostname in CPS_ParseNTPSourceAdd()

Let the caller duplicate the string if needed.

11 years agoCheck for memory allocation errors
Miroslav Lichvar [Mon, 22 Sep 2014 14:09:35 +0000 (16:09 +0200)] 
Check for memory allocation errors

11 years agotest: make 114-presend more tolerant
Miroslav Lichvar [Tue, 23 Sep 2014 13:45:54 +0000 (15:45 +0200)] 
test: make 114-presend more tolerant

11 years agonameserv: move fallback DNS_Name2IPAddressAsync() to stubs.c
Miroslav Lichvar [Mon, 22 Sep 2014 10:51:19 +0000 (12:51 +0200)] 
nameserv: move fallback DNS_Name2IPAddressAsync() to stubs.c

11 years agoconfigure: add --disable-sechash option
Miroslav Lichvar [Fri, 19 Sep 2014 15:55:52 +0000 (17:55 +0200)] 
configure: add --disable-sechash option

11 years agoPrint enabled/disabled features with version
Miroslav Lichvar [Fri, 19 Sep 2014 15:46:34 +0000 (17:46 +0200)] 
Print enabled/disabled features with version

11 years agoconfigure: unify macro naming for optional features
Miroslav Lichvar [Fri, 19 Sep 2014 15:03:33 +0000 (17:03 +0200)] 
configure: unify macro naming for optional features

11 years agoconfigure: allow building without cmdmon, NTP, refclock support
Miroslav Lichvar [Fri, 19 Sep 2014 13:06:01 +0000 (15:06 +0200)] 
configure: allow building without cmdmon, NTP, refclock support

11 years agoconfigure: unify macro naming for available headers
Miroslav Lichvar [Fri, 19 Sep 2014 09:06:37 +0000 (11:06 +0200)] 
configure: unify macro naming for available headers

11 years agoconfigure: don't remove config files with --help
Miroslav Lichvar [Fri, 19 Sep 2014 08:13:42 +0000 (10:13 +0200)] 
configure: don't remove config files with --help

11 years agosourcestats: remove tracking of skew change
Miroslav Lichvar [Fri, 19 Sep 2014 08:07:03 +0000 (10:07 +0200)] 
sourcestats: remove tracking of skew change

This is not used since commit 7a6ee1d.

11 years agodoc: update NEWS 1.31
Miroslav Lichvar [Wed, 10 Sep 2014 13:06:55 +0000 (15:06 +0200)] 
doc: update NEWS

11 years agodoc: mention that directives are not case-sensitive
Miroslav Lichvar [Wed, 10 Sep 2014 12:47:50 +0000 (14:47 +0200)] 
doc: mention that directives are not case-sensitive

11 years agodoc: add section to FAQ on improving accuracy with NTP
Miroslav Lichvar [Wed, 10 Sep 2014 12:43:44 +0000 (14:43 +0200)] 
doc: add section to FAQ on improving accuracy with NTP

11 years agodoc: remove minpoll and maxpoll options from configuration example
Miroslav Lichvar [Wed, 10 Sep 2014 10:05:24 +0000 (12:05 +0200)] 
doc: remove minpoll and maxpoll options from configuration example

11 years agosched: fix Clang warning
Miroslav Lichvar [Wed, 10 Sep 2014 14:58:48 +0000 (16:58 +0200)] 
sched: fix Clang warning

11 years agoclient: describe error when could not open config or keyfile
Miroslav Lichvar [Wed, 10 Sep 2014 09:30:44 +0000 (11:30 +0200)] 
client: describe error when could not open config or keyfile

11 years agoIgnore measurements around leap second
Miroslav Lichvar [Tue, 9 Sep 2014 14:57:15 +0000 (16:57 +0200)] 
Ignore measurements around leap second

When current time is within 5 seconds of a leap second, don't accumulate
new samples or update the leap second status to increase the chances of
getting through safely.

11 years agontp: print warning 10 years before supported time ends
Miroslav Lichvar [Tue, 9 Sep 2014 12:02:00 +0000 (14:02 +0200)] 
ntp: print warning 10 years before supported time ends

11 years agoconfigure: check if pkg-config is available
Miroslav Lichvar [Tue, 9 Sep 2014 10:23:14 +0000 (12:23 +0200)] 
configure: check if pkg-config is available

This is needed with some shells to prevent "pkg-config: not found"
errors from being displayed.

11 years agoFix compiler warnings on NetBSD
Miroslav Lichvar [Tue, 9 Sep 2014 09:48:09 +0000 (11:48 +0200)] 
Fix compiler warnings on NetBSD

11 years agoexamples: add NetworkManager dispatcher script
Miroslav Lichvar [Thu, 4 Sep 2014 15:43:27 +0000 (17:43 +0200)] 
examples: add NetworkManager dispatcher script

11 years agoexamples: add systemd services
Miroslav Lichvar [Thu, 4 Sep 2014 15:30:36 +0000 (17:30 +0200)] 
examples: add systemd services

11 years agoexamples: add logrotate configuration
Miroslav Lichvar [Thu, 4 Sep 2014 15:27:43 +0000 (17:27 +0200)] 
examples: add logrotate configuration

11 years agoMove chrony.spec to examples
Miroslav Lichvar [Thu, 4 Sep 2014 15:22:09 +0000 (17:22 +0200)] 
Move chrony.spec to examples

11 years agosys: fix typo in prctl() error message
Miroslav Lichvar [Mon, 25 Aug 2014 15:24:58 +0000 (17:24 +0200)] 
sys: fix typo in prctl() error message

11 years agoutil: fix compiler warning with 32-bit time_t
Miroslav Lichvar [Thu, 21 Aug 2014 12:06:06 +0000 (14:06 +0200)] 
util: fix compiler warning with 32-bit time_t

11 years agoUpdate NEWS 1.31-pre1
Miroslav Lichvar [Thu, 21 Aug 2014 07:56:57 +0000 (09:56 +0200)] 
Update NEWS

11 years agontp: don't stop online burst when sending fails
Miroslav Lichvar [Wed, 20 Aug 2014 14:41:18 +0000 (16:41 +0200)] 
ntp: don't stop online burst when sending fails

Don't stop online burst for unreachable sources until sending succeeds.
This is mainly useful with iburst when chronyd is started before the
network is configured.

11 years agontp: don't adjust polling interval when sending fails
Miroslav Lichvar [Wed, 20 Aug 2014 13:24:21 +0000 (15:24 +0200)] 
ntp: don't adjust polling interval when sending fails

11 years agontp: return with status from functions sending packets
Miroslav Lichvar [Wed, 20 Aug 2014 12:30:42 +0000 (14:30 +0200)] 
ntp: return with status from functions sending packets

11 years agodoc: clarify description of -s option
Miroslav Lichvar [Wed, 20 Aug 2014 10:52:55 +0000 (12:52 +0200)] 
doc: clarify description of -s option

11 years agosched: improve time jump detection
Miroslav Lichvar [Wed, 20 Aug 2014 09:34:16 +0000 (11:34 +0200)] 
sched: improve time jump detection

To detect forward time jumps, use a timestamp made before calling
select() instead of the first timeout in the queue. Also, if the timeout
value is modified by select() (e.g. on Linux) use it to get a more
accurate estimate of the elapsed time.

11 years agontp: restart timer when poll interval changes on reset
Miroslav Lichvar [Tue, 19 Aug 2014 14:05:47 +0000 (16:05 +0200)] 
ntp: restart timer when poll interval changes on reset

11 years agontp: add function to restart transmit timer
Miroslav Lichvar [Tue, 19 Aug 2014 13:51:59 +0000 (15:51 +0200)] 
ntp: add function to restart transmit timer

11 years agosched: make sure scheduler parameter change handler is first
Miroslav Lichvar [Tue, 19 Aug 2014 09:45:30 +0000 (11:45 +0200)] 
sched: make sure scheduler parameter change handler is first

This is needed to allow other handlers to add new timers.

11 years agolocal: use common function to invoke parameter change handlers
Miroslav Lichvar [Tue, 19 Aug 2014 08:56:53 +0000 (10:56 +0200)] 
local: use common function to invoke parameter change handlers

This was missing in commit b69b648d.

11 years agoreference: always update driftfile on exit
Miroslav Lichvar [Mon, 18 Aug 2014 16:31:02 +0000 (18:31 +0200)] 
reference: always update driftfile on exit

This is useful with the new fallback function of the -s option to
restore the system time at which chronyd was previously stopped.

11 years agortc: set clock to mtime of driftfile when RTC preinit fails
Miroslav Lichvar [Mon, 18 Aug 2014 16:21:24 +0000 (18:21 +0200)] 
rtc: set clock to mtime of driftfile when RTC preinit fails

When the RTC preinit function fails, set the system clock to the time of
the last modification of the driftfile if it's in the future. This makes
the -s option somewhat useful on systems where RTC is not supported or
missing.

This is similar to the functionality implemented in the fake-hwclock
script.

11 years agortc: don't try to open rtcfile when not set
Miroslav Lichvar [Mon, 18 Aug 2014 15:34:25 +0000 (17:34 +0200)] 
rtc: don't try to open rtcfile when not set

11 years agortc: use fscanf() to read coefficients
Miroslav Lichvar [Mon, 18 Aug 2014 15:19:36 +0000 (17:19 +0200)] 
rtc: use fscanf() to read coefficients

11 years agortc: return status from preinit function
Miroslav Lichvar [Mon, 18 Aug 2014 15:03:55 +0000 (17:03 +0200)] 
rtc: return status from preinit function

11 years agortc: use LCL functions to read and step system clock
Miroslav Lichvar [Mon, 18 Aug 2014 11:07:52 +0000 (13:07 +0200)] 
rtc: use LCL functions to read and step system clock

11 years agortc: improve accuracy of preinit step
Miroslav Lichvar [Mon, 18 Aug 2014 11:06:38 +0000 (13:06 +0200)] 
rtc: improve accuracy of preinit step

11 years agortc: minor cleanup in RTC_Linux_TimePreInit()
Miroslav Lichvar [Mon, 18 Aug 2014 09:58:56 +0000 (11:58 +0200)] 
rtc: minor cleanup in RTC_Linux_TimePreInit()

11 years agortc: move preinit call to RTC_Initialise()
Miroslav Lichvar [Mon, 18 Aug 2014 09:25:16 +0000 (11:25 +0200)] 
rtc: move preinit call to RTC_Initialise()

11 years agortc: cleanup in error messages
Miroslav Lichvar [Mon, 18 Aug 2014 09:03:15 +0000 (11:03 +0200)] 
rtc: cleanup in error messages

11 years agotest: add 115-cmdmontime
Miroslav Lichvar [Mon, 18 Aug 2014 13:09:48 +0000 (15:09 +0200)] 
test: add 115-cmdmontime

11 years agoutil: update functions converting cmdmon timestamps
Miroslav Lichvar [Mon, 18 Aug 2014 12:52:07 +0000 (14:52 +0200)] 
util: update functions converting cmdmon timestamps

11 years agocmdmon: convert LOGON timestamp only with LOGON message
Miroslav Lichvar [Mon, 18 Aug 2014 11:58:52 +0000 (13:58 +0200)] 
cmdmon: convert LOGON timestamp only with LOGON message

Avoid always calling UTI_TimevalNetworkToHost() and make the code more
readable.

11 years agosched: check that added file descriptor fits in fd_set
Miroslav Lichvar [Fri, 15 Aug 2014 14:36:00 +0000 (16:36 +0200)] 
sched: check that added file descriptor fits in fd_set

11 years agosched: use FD_SETSIZE if defined
Miroslav Lichvar [Fri, 15 Aug 2014 14:32:26 +0000 (16:32 +0200)] 
sched: use FD_SETSIZE if defined

11 years agotest: add 114-presend
Miroslav Lichvar [Fri, 15 Aug 2014 14:23:09 +0000 (16:23 +0200)] 
test: add 114-presend

11 years agontp: add debug message for received packet
Miroslav Lichvar [Fri, 15 Aug 2014 14:17:50 +0000 (16:17 +0200)] 
ntp: add debug message for received packet

11 years agontp: use NTP instead of echo for presend
Miroslav Lichvar [Fri, 15 Aug 2014 13:45:48 +0000 (15:45 +0200)] 
ntp: use NTP instead of echo for presend

Switch to NTP for presend as the echo service (RFC 862) is rarely
enabled. When presend is active, send an NTP client packet to the
server/peer and ignore the reply.

This also fixes presend with separate client sockets. The destination
port can't be changed on connected sockets, so the echo packet was sent
to the NTP port instead of the echo port.

11 years agoCheck for truncated source address when receiving packets
Miroslav Lichvar [Fri, 15 Aug 2014 10:54:32 +0000 (12:54 +0200)] 
Check for truncated source address when receiving packets

11 years agotest: fix check in run script
Miroslav Lichvar [Fri, 15 Aug 2014 08:12:36 +0000 (10:12 +0200)] 
test: fix check in run script

11 years agotest: add 008-ntpera
Miroslav Lichvar [Thu, 14 Aug 2014 16:02:28 +0000 (18:02 +0200)] 
test: add 008-ntpera

11 years agotest: allow tests to be skipped
Miroslav Lichvar [Thu, 14 Aug 2014 15:58:59 +0000 (17:58 +0200)] 
test: allow tests to be skipped

11 years agoutil: add support for other NTP eras
Miroslav Lichvar [Thu, 7 Aug 2014 15:08:19 +0000 (17:08 +0200)] 
util: add support for other NTP eras

NTP timestamps use only 32 bits to count seconds and the current NTP era
ends in 2036. Add support for converting NTP timestamps from other NTP
eras on systems with 64-bit time_t.

The earliest assumed NTP time is set by the configure script (by default
to 50 years before the date of the build) and earlier NTP timestamps
underflow to the following NTP era.

11 years agontp: move packet size asserts to ntp_core
Miroslav Lichvar [Thu, 7 Aug 2014 12:29:15 +0000 (14:29 +0200)] 
ntp: move packet size asserts to ntp_core

11 years agoutil: fix printing of timestamps when time_t is longer than long
Miroslav Lichvar [Thu, 7 Aug 2014 12:23:33 +0000 (14:23 +0200)] 
util: fix printing of timestamps when time_t is longer than long

11 years agoconfigure: check for 64-bit time_t
Miroslav Lichvar [Thu, 7 Aug 2014 12:11:17 +0000 (14:11 +0200)] 
configure: check for 64-bit time_t

11 years agontp: use one socket with random port when acquisitionport is 0
Miroslav Lichvar [Thu, 14 Aug 2014 13:57:09 +0000 (15:57 +0200)] 
ntp: use one socket with random port when acquisitionport is 0

11 years agoconf: return port numbers as int
Miroslav Lichvar [Thu, 14 Aug 2014 13:33:33 +0000 (15:33 +0200)] 
conf: return port numbers as int

11 years agocmdmon: allow binding to address that doesn't exist yet
Miroslav Lichvar [Mon, 4 Aug 2014 15:21:26 +0000 (17:21 +0200)] 
cmdmon: allow binding to address that doesn't exist yet

11 years agontp: allow binding to address that doesn't exist yet
Miroslav Lichvar [Mon, 4 Aug 2014 15:21:15 +0000 (17:21 +0200)] 
ntp: allow binding to address that doesn't exist yet

11 years agontp: remove disabled code in prepare_socket()
Miroslav Lichvar [Thu, 14 Aug 2014 12:30:03 +0000 (14:30 +0200)] 
ntp: remove disabled code in prepare_socket()

11 years agontp: bind socket only when port or address was specified
Miroslav Lichvar [Wed, 13 Aug 2014 16:29:56 +0000 (18:29 +0200)] 
ntp: bind socket only when port or address was specified

This removes an unnecessary system call when getting new connected
client socket.

11 years agontp: remove socket reconnecting
Miroslav Lichvar [Wed, 13 Aug 2014 16:14:42 +0000 (18:14 +0200)] 
ntp: remove socket reconnecting

As new client socket is now created for each request, there is no need
to reconnect the socket. This is a partial revert of commit 43cca04c.

11 years agontp: create new socket for each client request
Miroslav Lichvar [Wed, 13 Aug 2014 16:11:34 +0000 (18:11 +0200)] 
ntp: create new socket for each client request

Create a new connected client socket before each request and close it
when a valid reply is received.

This is useful when the network configuration is changed and the client
socket should be reconnected, but the old bound address remains valid
and sendmsg() doesn't return with an error.

11 years agoRegenerate getdate.c
Miroslav Lichvar [Fri, 15 Aug 2014 08:56:39 +0000 (10:56 +0200)] 
Regenerate getdate.c

11 years agomakefile: regenerate getdate.c when missing
Miroslav Lichvar [Wed, 13 Aug 2014 11:01:35 +0000 (13:01 +0200)] 
makefile: regenerate getdate.c when missing

11 years agodoc: fix small typo
Joachim Wiedorn [Wed, 13 Aug 2014 08:55:22 +0000 (10:55 +0200)] 
doc: fix small typo

11 years agoconfigure: remove ncurses_lib from first readline test
Miroslav Lichvar [Wed, 13 Aug 2014 08:49:06 +0000 (10:49 +0200)] 
configure: remove ncurses_lib from first readline test

11 years agotest: increase default time rms limit
Miroslav Lichvar [Wed, 6 Aug 2014 13:43:32 +0000 (15:43 +0200)] 
test: increase default time rms limit

This is improves testing reliability with new default corrtimeratio.

11 years agotest: require latest clknetsim
Miroslav Lichvar [Wed, 6 Aug 2014 13:12:18 +0000 (15:12 +0200)] 
test: require latest clknetsim

11 years agontp: close socket when duplicating fails
Miroslav Lichvar [Wed, 6 Aug 2014 08:03:16 +0000 (10:03 +0200)] 
ntp: close socket when duplicating fails

11 years agorefclock: fix compiler warning in SOCK error message
Miroslav Lichvar [Tue, 5 Aug 2014 14:33:56 +0000 (16:33 +0200)] 
refclock: fix compiler warning in SOCK error message

11 years agologging: move exit call from LOG_Message to LOG_FATAL
Miroslav Lichvar [Tue, 5 Aug 2014 13:15:15 +0000 (15:15 +0200)] 
logging: move exit call from LOG_Message to LOG_FATAL

11 years agontp: shorten setsockopt error messages
Miroslav Lichvar [Mon, 4 Aug 2014 15:20:28 +0000 (17:20 +0200)] 
ntp: shorten setsockopt error messages

11 years agontp: move debug message after sendmsg()
Miroslav Lichvar [Mon, 4 Aug 2014 14:37:00 +0000 (16:37 +0200)] 
ntp: move debug message after sendmsg()

This should reduce the delay before sending the packet when debugging is
enabled.

11 years agontp: reconnect client sockets
Miroslav Lichvar [Mon, 4 Aug 2014 13:49:29 +0000 (15:49 +0200)] 
ntp: reconnect client sockets

With separate client sockets, allow the initial connect() to fail (e.g.
when the network is not reachable yet) and try to connect later when
sending the packet.

Also, reconnect the socket when the local address has changed.

11 years agodoc: mention linuxcaps support in FAQ
Miroslav Lichvar [Tue, 29 Jul 2014 16:10:40 +0000 (18:10 +0200)] 
doc: mention linuxcaps support in FAQ

11 years agodoc: update FAQ 1.30
Miroslav Lichvar [Tue, 1 Jul 2014 11:08:23 +0000 (13:08 +0200)] 
doc: update FAQ

11 years agodoc: use iburst option in examples
Miroslav Lichvar [Tue, 1 Jul 2014 10:50:13 +0000 (12:50 +0200)] 
doc: use iburst option in examples