]> git.ipfire.org Git - thirdparty/chrony.git/log
thirdparty/chrony.git
11 years agomakefile: remove faq.php rule
Miroslav Lichvar [Fri, 27 Jun 2014 15:26:54 +0000 (17:26 +0200)] 
makefile: remove faq.php rule

11 years agomake_release: generate FAQ from chrony.txt
Miroslav Lichvar [Fri, 27 Jun 2014 14:05:43 +0000 (16:05 +0200)] 
make_release: generate FAQ from chrony.txt

11 years agomake_release: generate INSTALL from chrony.txt
Miroslav Lichvar [Fri, 27 Jun 2014 12:07:45 +0000 (14:07 +0200)] 
make_release: generate INSTALL from chrony.txt

11 years agomake_release: add testing mode
Miroslav Lichvar [Fri, 27 Jun 2014 12:00:42 +0000 (14:00 +0200)] 
make_release: add testing mode

11 years agodoc: include faq.txt in main document
Miroslav Lichvar [Fri, 27 Jun 2014 13:30:00 +0000 (15:30 +0200)] 
doc: include faq.txt in main document

11 years agodoc: update installation chapter
Miroslav Lichvar [Fri, 27 Jun 2014 11:08:32 +0000 (13:08 +0200)] 
doc: update installation chapter

11 years agodoc: drop porting guide
Miroslav Lichvar [Fri, 27 Jun 2014 09:49:32 +0000 (11:49 +0200)] 
doc: drop porting guide

Most of the information provided in this section looks obsolete.
Comments in the source code should be a better source.

11 years agoutil: print timevals for debug messages as numbers
Miroslav Lichvar [Fri, 27 Jun 2014 09:35:40 +0000 (11:35 +0200)] 
util: print timevals for debug messages as numbers

11 years agoConvert disabled log messages to debug or remove them
Miroslav Lichvar [Thu, 26 Jun 2014 16:28:13 +0000 (18:28 +0200)] 
Convert disabled log messages to debug or remove them

11 years agocmdmon: remove disabled code
Miroslav Lichvar [Thu, 26 Jun 2014 15:15:50 +0000 (17:15 +0200)] 
cmdmon: remove disabled code

11 years agokeys: fix determine_hash_delay() declaration
Miroslav Lichvar [Thu, 26 Jun 2014 15:12:32 +0000 (17:12 +0200)] 
keys: fix determine_hash_delay() declaration

11 years agotest: require latest clknetsim revision
Miroslav Lichvar [Wed, 25 Jun 2014 15:35:41 +0000 (17:35 +0200)] 
test: require latest clknetsim revision

11 years agontp: don't set address for sendmsg() with connected sockets
Miroslav Lichvar [Wed, 25 Jun 2014 13:36:14 +0000 (15:36 +0200)] 
ntp: don't set address for sendmsg() with connected sockets

11 years agodoc: update NEWS 1.30-pre1
Miroslav Lichvar [Fri, 6 Jun 2014 14:11:23 +0000 (16:11 +0200)] 
doc: update NEWS

11 years agomake_release: fix man page preparation
Miroslav Lichvar [Fri, 6 Jun 2014 14:41:33 +0000 (16:41 +0200)] 
make_release: fix man page preparation

11 years agoCheck return value of chmod() and fcntl()
Miroslav Lichvar [Fri, 6 Jun 2014 10:07:31 +0000 (12:07 +0200)] 
Check return value of chmod() and fcntl()

11 years agoreference: fix adjusting of last reference update time
Miroslav Lichvar [Fri, 6 Jun 2014 09:19:03 +0000 (11:19 +0200)] 
reference: fix adjusting of last reference update time

The timestamp is in cooked time, it needs to be adjusted on all changes,
not only on step.

11 years agoclient: fix printing of negative poll in sources report
Miroslav Lichvar [Fri, 6 Jun 2014 08:13:25 +0000 (10:13 +0200)] 
client: fix printing of negative poll in sources report

11 years agoUpdate copyright years
Miroslav Lichvar [Thu, 5 Jun 2014 14:42:39 +0000 (16:42 +0200)] 
Update copyright years

11 years agodoc: update acknowledgements
Miroslav Lichvar [Thu, 5 Jun 2014 13:41:56 +0000 (15:41 +0200)] 
doc: update acknowledgements

11 years agoreference: rework makestep
Miroslav Lichvar [Thu, 5 Jun 2014 12:46:22 +0000 (14:46 +0200)] 
reference: rework makestep

Rework makestep to cancel accumulated offset and step with the new
offset instead of accumulating new offset first, canceling all
accumulated offset and making the step.

This avoids two large frequency changes to initiate and cancel a slew
before making the step.

11 years agotest: extend 109-makestep
Miroslav Lichvar [Thu, 5 Jun 2014 12:26:07 +0000 (14:26 +0200)] 
test: extend 109-makestep

11 years agontp: cook SO_TIMESTAMP timestamp
Miroslav Lichvar [Wed, 4 Jun 2014 14:46:15 +0000 (16:46 +0200)] 
ntp: cook SO_TIMESTAMP timestamp

This is a partial revert of 8aa9eb19c826f3ea4a9c2ce5e3a71b74aeeb99d0.
With the new generic driver cooking is cheap and it should be slighly
more accurate than reusing offset correction from the scheduler
timestamps.

11 years agoreference: cook timestamp when setting reference
Miroslav Lichvar [Wed, 4 Jun 2014 14:44:14 +0000 (16:44 +0200)] 
reference: cook timestamp when setting reference

This is a partial revert of 8aa9eb19c826f3ea4a9c2ce5e3a71b74aeeb99d0.
With the new generic driver cooking is cheap and it should be slighly
more accurate than reusing offset correction from the scheduler
timestamps.

11 years agotest: add 113-leapsecond
Miroslav Lichvar [Wed, 4 Jun 2014 13:48:05 +0000 (15:48 +0200)] 
test: add 113-leapsecond

11 years agoreference: announce leap second only on last day of June and December
Miroslav Lichvar [Wed, 4 Jun 2014 12:55:00 +0000 (14:55 +0200)] 
reference: announce leap second only on last day of June and December

11 years agologging: convert rate limited messages to debug messages
Miroslav Lichvar [Wed, 4 Jun 2014 10:26:27 +0000 (12:26 +0200)] 
logging: convert rate limited messages to debug messages

11 years agologging: move check of enabled debugging to DEBUG_LOG macro
Miroslav Lichvar [Wed, 4 Jun 2014 09:57:56 +0000 (11:57 +0200)] 
logging: move check of enabled debugging to DEBUG_LOG macro

This avoids unnecessary calls to the logging function when debugging
messages are not logged. The cost is a slight increase in the size of
the binary (when compiled with debug messages).

11 years agolocal: round log value of clock precision
Miroslav Lichvar [Wed, 4 Jun 2014 08:48:03 +0000 (10:48 +0200)] 
local: round log value of clock precision

This is similar to what the reference NTP implementation does. With 1us
clock resolution that gives -20 instead of -19.

11 years agontp: update comment in get_transmit_delay()
Miroslav Lichvar [Tue, 3 Jun 2014 15:31:10 +0000 (17:31 +0200)] 
ntp: update comment in get_transmit_delay()

11 years agotest: update packet interval check for new clknetsim
Miroslav Lichvar [Tue, 3 Jun 2014 14:50:19 +0000 (16:50 +0200)] 
test: update packet interval check for new clknetsim

11 years agotest: check also minimum outgoing packet interval
Miroslav Lichvar [Tue, 3 Jun 2014 13:02:47 +0000 (15:02 +0200)] 
test: check also minimum outgoing packet interval

11 years agomain: delay switching to normal mode after initstepslew
Miroslav Lichvar [Tue, 3 Jun 2014 15:55:35 +0000 (17:55 +0200)] 
main: delay switching to normal mode after initstepslew

This prevents polling interval shorter than the burst interval
if some configured servers were used also for initstepslew.

11 years agotest: fix packet interval check
Miroslav Lichvar [Tue, 3 Jun 2014 12:18:48 +0000 (14:18 +0200)] 
test: fix packet interval check

11 years agotest: always write packet log
Miroslav Lichvar [Tue, 3 Jun 2014 09:33:24 +0000 (11:33 +0200)] 
test: always write packet log

11 years agotest: extend 005-externalstep
Miroslav Lichvar [Mon, 2 Jun 2014 16:22:48 +0000 (18:22 +0200)] 
test: extend 005-externalstep

11 years agolocal: reset daemon after unexpected time jump
Miroslav Lichvar [Mon, 2 Jun 2014 15:14:28 +0000 (17:14 +0200)] 
local: reset daemon after unexpected time jump

Add a new change type and use it when an unexpected time jump is
detected in the scheduler to reset reference times, offset and slewing,
NCR instances (with their polling interval), synchronization status, and
drop all sourcestats, manual, refclock and RTC samples.

This should make the recovery more graceful if the estimated jump has a
large error (e.g. select didn't timeout, or after system suspend).

11 years agosched: try to detect also forward time jumps
Miroslav Lichvar [Fri, 30 May 2014 15:30:02 +0000 (17:30 +0200)] 
sched: try to detect also forward time jumps

11 years agolocal: replace is_step_change parameter of change handler with enum
Miroslav Lichvar [Fri, 30 May 2014 11:02:45 +0000 (13:02 +0200)] 
local: replace is_step_change parameter of change handler with enum

Prepare for a new change type that will be added later.

11 years agolocal: refactor invocation of parameter change handlers
Miroslav Lichvar [Fri, 30 May 2014 12:46:46 +0000 (14:46 +0200)] 
local: refactor invocation of parameter change handlers

11 years agontp: reset NCR instance thoroughly when switching to offline
Miroslav Lichvar [Fri, 30 May 2014 15:04:10 +0000 (17:04 +0200)] 
ntp: reset NCR instance thoroughly when switching to offline

11 years agosourcestats: reset SST instance thoroughly when dropping samples
Miroslav Lichvar [Mon, 2 Jun 2014 14:30:12 +0000 (16:30 +0200)] 
sourcestats: reset SST instance thoroughly when dropping samples

11 years agosourcestats: remove forgotten declaration
Miroslav Lichvar [Thu, 29 May 2014 16:43:11 +0000 (18:43 +0200)] 
sourcestats: remove forgotten declaration

11 years agoconfigure: fix test code to be compilable with -Werror
Miroslav Lichvar [Fri, 30 May 2014 14:12:02 +0000 (16:12 +0200)] 
configure: fix test code to be compilable with -Werror

11 years agortc: more reliable method of reading rtc for initial trim
Hattink, Tjalling [FINT] [Wed, 28 May 2014 11:54:27 +0000 (13:54 +0200)] 
rtc: more reliable method of reading rtc for initial trim

When chrony reads in the linux rtc for the first time to trim the system
clock, it only reads it once. As it is possible that the rtc updates
itself during the read operation, the reported rtc time could be false.
To prevent this I've added a loop that reads the rtc clock twice, if the
seconds do not match retry the two read operations. If they match you
can assume the read operation was successful.

This is based on the hwclock implementation of reading the rtc clock
from the util-linux package.

11 years agorefclock: don't include average dispersion in unfiltered samples
Miroslav Lichvar [Fri, 23 May 2014 13:22:11 +0000 (15:22 +0200)] 
refclock: don't include average dispersion in unfiltered samples

The dispersion of refclock samples before filtering now includes only
offset correction error and precision.

This should fix a problem where locked PPS got stuck with large average
dispersion and didn't accept new samples due failing check of offset
and dispersion.

11 years agorefclock: add maxdispersion option
Miroslav Lichvar [Wed, 21 May 2014 12:27:50 +0000 (14:27 +0200)] 
refclock: add maxdispersion option

This can be used to prevent accumulation of samples with estimated
dispersion above given limit. By default, this limit is disabled.

11 years agosys: drop frequency scaling in Linux driver
Miroslav Lichvar [Thu, 22 May 2014 14:28:20 +0000 (16:28 +0200)] 
sys: drop frequency scaling in Linux driver

Since the kernel USER_HZ constant was introduced and the internal HZ
can't be reliably detected in user-space, the frequency scaling constant
used with older kernels is just a random guess.

Remove the scaling completely and let the closed loop compensate for the
error. To prevent thrashing between two states when the system's
frequency error is close to a multiple of USER_HZ, stick to the current
tick value if it's next to the new required tick. This is used only on
archs where USER_HZ is 100 as the frequency adjustment is limited to 500
ppm.

The linux_hz and linux_freq_scale directives are no longer supported,
but allowed by the config parser.

11 years agosys: set tick_update_hz to 100 by default in Linux driver
Miroslav Lichvar [Thu, 22 May 2014 13:49:11 +0000 (15:49 +0200)] 
sys: set tick_update_hz to 100 by default in Linux driver

We can't reliably detect the internal kernel HZ, it may not even be
fixed (CONFIG_NO_HZ). Use a fixed value of 100.

11 years agosys: avoid notification of neglible dispersion on slew update
Miroslav Lichvar [Thu, 22 May 2014 13:34:36 +0000 (15:34 +0200)] 
sys: avoid notification of neglible dispersion on slew update

11 years agodoc: update description of refclock options
Miroslav Lichvar [Thu, 22 May 2014 13:22:24 +0000 (15:22 +0200)] 
doc: update description of refclock options

11 years agorefclock: fix sample validation with sub-second poll
Miroslav Lichvar [Thu, 22 May 2014 13:14:12 +0000 (15:14 +0200)] 
refclock: fix sample validation with sub-second poll

11 years agoreference: fix logging of initial unsynchronized tracking entry
Miroslav Lichvar [Thu, 22 May 2014 12:38:33 +0000 (14:38 +0200)] 
reference: fix logging of initial unsynchronized tracking entry

11 years agomain: initialize reference mode properly
Miroslav Lichvar [Thu, 22 May 2014 12:06:52 +0000 (14:06 +0200)] 
main: initialize reference mode properly

11 years agorefclock: honour leap second flag in the PPS refclock
Tjalling Hattink [Thu, 22 May 2014 09:25:00 +0000 (11:25 +0200)] 
refclock: honour leap second flag in the PPS refclock

This patch fixes leap second handling for the PPS refclock. Without the
patch the PPS refclock will always report LEAP_normal. But if a locked
refclock (the SHM clock in my case) does report a leap state it should
also be taken over by the PPS refclock, otherwise chrony will still use
LEAP_normal when the PPS clock is used as reference source.

The patch will copy the leap state from the refclock. In case the PPS
clock is not specifically locked to another refclock it will take over
the leap state from the local clock.

I've tested this patch by simulating a leap second through the samples
for the SHM clock, and with the patch you will see chrony properly jump
forward or backward on the leap second. Without the patch it will not do
this and the clock becomes desynchronized and no leap state is reported
upstream to other NTP clients.

Signed-off-by: Tjalling Hattink <t.hattink@fugro.nl>
11 years agosys: use maximum timeout for offsets below minimum correction
Miroslav Lichvar [Wed, 21 May 2014 15:36:51 +0000 (17:36 +0200)] 
sys: use maximum timeout for offsets below minimum correction

There is no need to try to correct offsets below the specified minimum
(1 nanosecond), let the clock drift away after crossing zero offset and
avoid unnecessary updates.

11 years agoconf: add option to set maximum slew rate
Miroslav Lichvar [Wed, 21 May 2014 14:23:30 +0000 (16:23 +0200)] 
conf: add option to set maximum slew rate

With the generic driver, the maxslewrate directive sets the maximum
frequency offset that the driver is allowed to use to slew the time. By
default, it's set to 83333.333 (1/12). This is identical to what Linux
fast slewing used to use.

11 years agoconf: change default corrtimeratio to 3.0
Miroslav Lichvar [Wed, 21 May 2014 10:08:10 +0000 (12:08 +0200)] 
conf: change default corrtimeratio to 3.0

This improves the overall frequency accuracy of the clock at a slight
cost in the time accuracy.

11 years agosys: add apply_step_offset function to generic driver
Miroslav Lichvar [Tue, 20 May 2014 15:05:05 +0000 (17:05 +0200)] 
sys: add apply_step_offset function to generic driver

Move the generic code away from the Linux driver and keep there only
stepping by adjtimex(ADJ_SETOFFSET).

11 years agotest: update for recent changes in Linux driver
Miroslav Lichvar [Wed, 14 May 2014 15:10:23 +0000 (17:10 +0200)] 
test: update for recent changes in Linux driver

11 years agosys: convert Linux driver to use generic offset functions
Miroslav Lichvar [Wed, 14 May 2014 15:08:00 +0000 (17:08 +0200)] 
sys: convert Linux driver to use generic offset functions

Strip all slewing code (adjtime(), freq locked nano PLL, fast tick
slewing) from the Linux driver and use the new generic frequency only
slewing instead. The advantages include stable clock control with very
short update intervals, good control of the slewing frequency, cheap
cooking of raw time stamps and unlimited frequency offset.

11 years agosys: introduce generic driver
Miroslav Lichvar [Wed, 14 May 2014 15:06:18 +0000 (17:06 +0200)] 
sys: introduce generic driver

This driver is intended to complete system-specific drivers that don't
have implemented all required driver functionality. Currently, it
implements offset functions working on top of system-specific frequency
functions. Offsets are corrected by changing frequency, similarly to
fast slewing implemented in the Linux driver.

11 years agotest: make 110-chronyc even more tolerant
Miroslav Lichvar [Thu, 15 May 2014 16:45:09 +0000 (18:45 +0200)] 
test: make 110-chronyc even more tolerant

11 years agodoc: update faq.txt
Miroslav Lichvar [Fri, 16 May 2014 11:28:40 +0000 (13:28 +0200)] 
doc: update faq.txt

11 years agoclient: don't override hostname with -4 or -6 after -h
Miroslav Lichvar [Fri, 16 May 2014 11:21:49 +0000 (13:21 +0200)] 
client: don't override hostname with -4 or -6 after -h

11 years agoclient: set default hostname to 127.0.0.1 instead of localhost
Miroslav Lichvar [Fri, 16 May 2014 11:05:32 +0000 (13:05 +0200)] 
client: set default hostname to 127.0.0.1 instead of localhost

This is to make sure chronyd will see the remote address as 127.0.0.1
and allow access even when localhost resolves to an address of a
non-loopback interface.

11 years agoclient: enable IP_RECVERR socket option
Miroslav Lichvar [Fri, 16 May 2014 08:33:01 +0000 (10:33 +0200)] 
client: enable IP_RECVERR socket option

This is useful to get ECONNREFUSED when the host replies with ICMP port
unreachable message and avoid having to wait for timeout.

11 years agosys: remove unused static variables in Linux driver
Miroslav Lichvar [Mon, 5 May 2014 16:05:02 +0000 (18:05 +0200)] 
sys: remove unused static variables in Linux driver

11 years agodoc: update for separate client sockets
Miroslav Lichvar [Wed, 30 Apr 2014 16:23:35 +0000 (18:23 +0200)] 
doc: update for separate client sockets

11 years agodoc: update chronyd -r and chronyc -h descriptions
Miroslav Lichvar [Wed, 30 Apr 2014 14:47:46 +0000 (16:47 +0200)] 
doc: update chronyd -r and chronyc -h descriptions

11 years agomain: switch errors in initialization to fatal errors
Miroslav Lichvar [Wed, 30 Apr 2014 14:27:53 +0000 (16:27 +0200)] 
main: switch errors in initialization to fatal errors

11 years agotest: require latest clknetsim
Miroslav Lichvar [Tue, 29 Apr 2014 10:45:41 +0000 (12:45 +0200)] 
test: require latest clknetsim

This is needed for async name resolving and dropping root privileges.

11 years agoclient: shorten default timeout with localhost and async resolving
Miroslav Lichvar [Tue, 29 Apr 2014 10:04:43 +0000 (12:04 +0200)] 
client: shorten default timeout with localhost and async resolving

When chronyd is compiled with asynchronous name resolving, it should
always respond quickly. Shorten the default chronyc timeout for
localhost.

11 years agonameserv: add asynchronous resolving with POSIX threads
Miroslav Lichvar [Wed, 23 Apr 2014 15:50:36 +0000 (17:50 +0200)] 
nameserv: add asynchronous resolving with POSIX threads

Run getaddrinfo()/gethostbyname() in separate thread to avoid blocking.
Only one resolving thread is running at one time, so this should work
also on systems where the functions are not thread-safe.

11 years agoconfigure: check if getaddrinfo() is available
Miroslav Lichvar [Fri, 25 Apr 2014 15:29:59 +0000 (17:29 +0200)] 
configure: check if getaddrinfo() is available

This allows disabling IPv6 support and keeping getaddrinfo().

11 years agontp: start resolving only from NSR_ResolveSources
Miroslav Lichvar [Mon, 28 Apr 2014 13:37:29 +0000 (15:37 +0200)] 
ntp: start resolving only from NSR_ResolveSources

Also, use macros to define the minimum and maximum resolving interval.

11 years agontp: use async name resolving for NTP sources
Miroslav Lichvar [Fri, 25 Apr 2014 14:58:21 +0000 (16:58 +0200)] 
ntp: use async name resolving for NTP sources

Use the new asynchronous call to resolve addresses of NTP servers
configured by the server/peer directives. Introduce a callback to be
notified when the first resolving attempt ends to correctly finish
chronyd initialization (dumpfile reload and reference mode end).

11 years agontp: delay initial transmission until first resolving ends
Miroslav Lichvar [Tue, 29 Apr 2014 09:16:16 +0000 (11:16 +0200)] 
ntp: delay initial transmission until first resolving ends

This will be needed to prevent loading of dump files after sources have
already accumulated samples and possibly reference was already updated
when async resolving of sources is implemented.

11 years agosourcestats: assert dump file is loaded with no accumulated samples
Miroslav Lichvar [Tue, 29 Apr 2014 09:31:21 +0000 (11:31 +0200)] 
sourcestats: assert dump file is loaded with no accumulated samples

11 years agonameserv: prepare for asynchronous resolving
Miroslav Lichvar [Wed, 23 Apr 2014 14:04:47 +0000 (16:04 +0200)] 
nameserv: prepare for asynchronous resolving

Introduce a new function with callback to resolve names to IP addresses
asynchronously. For now, use a blocking wrapper around DNS_Name2IPAddress.

11 years agoconfigure: sed Makefile with MYCPPFLAGS
Miroslav Lichvar [Mon, 28 Apr 2014 17:06:01 +0000 (19:06 +0200)] 
configure: sed Makefile with MYCPPFLAGS

11 years agoconfigure: replace unnecessary variables in Makefile
Miroslav Lichvar [Mon, 28 Apr 2014 16:56:31 +0000 (18:56 +0200)] 
configure: replace unnecessary variables in Makefile

11 years agorefclock: remove duplicated declaration
Miroslav Lichvar [Tue, 29 Apr 2014 09:15:42 +0000 (11:15 +0200)] 
refclock: remove duplicated declaration

11 years agocmdmon: fix doffset command with negative values on 64-bit systems
Miroslav Lichvar [Mon, 28 Apr 2014 11:20:41 +0000 (13:20 +0200)] 
cmdmon: fix doffset command with negative values on 64-bit systems

11 years agoreference: negate offset printed in maxchange log message
Miroslav Lichvar [Fri, 11 Apr 2014 14:09:43 +0000 (16:09 +0200)] 
reference: negate offset printed in maxchange log message

This makes it consistent with other log messages.

11 years agomakefile: add dependency to check target
Miroslav Lichvar [Thu, 10 Apr 2014 16:22:34 +0000 (18:22 +0200)] 
makefile: add dependency to check target

11 years agomain: setup access restrictions before initstepslew
Miroslav Lichvar [Thu, 10 Apr 2014 16:22:09 +0000 (18:22 +0200)] 
main: setup access restrictions before initstepslew

11 years agontp: close client socket when offline
Miroslav Lichvar [Thu, 10 Apr 2014 15:59:08 +0000 (17:59 +0200)] 
ntp: close client socket when offline

11 years agontp: close only client socket when destroying NCR instance
Miroslav Lichvar [Thu, 10 Apr 2014 15:25:28 +0000 (17:25 +0200)] 
ntp: close only client socket when destroying NCR instance

11 years agosources: ignore inactive sources in special mode ending
Miroslav Lichvar [Thu, 10 Apr 2014 15:11:20 +0000 (17:11 +0200)] 
sources: ignore inactive sources in special mode ending

11 years agosources: add flag that source is active
Miroslav Lichvar [Thu, 10 Apr 2014 14:53:28 +0000 (16:53 +0200)] 
sources: add flag that source is active

When source is set as active, it's receiving reachability updates (e.g.
offline NTP sources are not active).

Also add function to count active sources.

11 years agontp: reduce burst timeout to 2.0
Miroslav Lichvar [Thu, 10 Apr 2014 13:49:42 +0000 (15:49 +0200)] 
ntp: reduce burst timeout to 2.0

With the new special mode ending it can be now equal to the burst
polling interval.

11 years agosources: rework special mode ending with unreachable sources
Miroslav Lichvar [Thu, 10 Apr 2014 13:45:11 +0000 (15:45 +0200)] 
sources: rework special mode ending with unreachable sources

Instead of giving up when a source has 7 reach updates, continue as long
as at least one source has fewer than 7 updates and can still have 3
samples to be selectable in that number of updates.

When no sources are responding, it will give up sooner.

11 years agoregress: make minimum number of samples for regression public
Miroslav Lichvar [Thu, 10 Apr 2014 14:31:48 +0000 (16:31 +0200)] 
regress: make minimum number of samples for regression public

11 years agosched: fix main loop to allow timeout handlers modify fd set or quit
Miroslav Lichvar [Thu, 10 Apr 2014 09:42:47 +0000 (11:42 +0200)] 
sched: fix main loop to allow timeout handlers modify fd set or quit

With special reference update modes, the timeout handlers may add or
remove file descriptors from the read fd set, so it needs to be copied
for select() call after they are dispatched. Also, they can now request
quit, so the exit flag needs to be checked before select() to avoid
hanging.

11 years agoconfigure: add option to set default user
Miroslav Lichvar [Wed, 9 Apr 2014 14:28:44 +0000 (16:28 +0200)] 
configure: add option to set default user

The default user is root by default, which disables root dropping by
default. The user directive or the -u option can still be used to set
the user.

11 years agomain: support configuration commands on command line
Miroslav Lichvar [Wed, 9 Apr 2014 13:12:53 +0000 (15:12 +0200)] 
main: support configuration commands on command line

If there are extra arguments on the chronyd command line, they will be
parsed as lines in a configuration file and the normal configuration file
will be ignored.

11 years agoconf: allow NULL as filename
Miroslav Lichvar [Wed, 9 Apr 2014 10:55:50 +0000 (12:55 +0200)] 
conf: allow NULL as filename

11 years agoconf: split line parsing from CNF_ReadFile
Miroslav Lichvar [Wed, 9 Apr 2014 10:36:13 +0000 (12:36 +0200)] 
conf: split line parsing from CNF_ReadFile

11 years agomain: add -q/-Q options to set clock/print offset once and exit
Miroslav Lichvar [Wed, 9 Apr 2014 10:12:12 +0000 (12:12 +0200)] 
main: add -q/-Q options to set clock/print offset once and exit