]> git.ipfire.org Git - thirdparty/chrony.git/log
thirdparty/chrony.git
10 years agontp: set maximum allowed polling interval
Miroslav Lichvar [Tue, 7 Apr 2015 12:01:25 +0000 (14:01 +0200)] 
ntp: set maximum allowed polling interval

To have an upper bound don't allow polling interval be larger than 24
(194 days).

10 years agodoc: document smoothtime directive
Miroslav Lichvar [Tue, 7 Apr 2015 10:25:01 +0000 (12:25 +0200)] 
doc: document smoothtime directive

10 years agotest: extend 113-leapsecond for leap smear
Miroslav Lichvar [Wed, 1 Apr 2015 15:35:39 +0000 (17:35 +0200)] 
test: extend 113-leapsecond for leap smear

10 years agontp: smear leap second with slewing mode and smoothing
Miroslav Lichvar [Wed, 1 Apr 2015 15:33:39 +0000 (17:33 +0200)] 
ntp: smear leap second with slewing mode and smoothing

Suppress leap second in packets sent to clients when smoothing and leap
second slew mode are enabled.

10 years agotest: add 119-smoothtime
Miroslav Lichvar [Thu, 2 Apr 2015 14:51:23 +0000 (16:51 +0200)] 
test: add 119-smoothtime

10 years agontp: add server time smoothing
Miroslav Lichvar [Tue, 31 Mar 2015 13:47:11 +0000 (15:47 +0200)] 
ntp: add server time smoothing

Time smoothing determines an offset that needs to be applied to the
cooked time to make it smooth for external observers. Observed offset
and frequency change slowly and there are no discontinuities. This can
be used on an NTP server to make it easier for the clients to track the
time and keep their clocks close together even when large offset or
frequency corrections are applied to the server's clock (e.g. after
being offline for longer time).

Accumulated offset and frequency are smoothed out in three stages. In
the first stage, the frequency is changed at a constant rate (wander) up
to a maximum, in the second stage the frequency stays at the maximum for
as long as needed and in the third stage the frequency is brought back
to zero.

Time smoothing is configured by the smoothtime directive. It takes two
arguments, maximum frequency offset and maximum wander. It's disabled by
default.

10 years agotest: fix source selection check
Miroslav Lichvar [Thu, 2 Apr 2015 08:28:23 +0000 (10:28 +0200)] 
test: fix source selection check

The chronyd log message changed from "no reachable sources" to "no
selectable sources" in 8f062454.

10 years agoreference: update our reference time on slew
Miroslav Lichvar [Tue, 31 Mar 2015 09:51:03 +0000 (11:51 +0200)] 
reference: update our reference time on slew

10 years agosourcestats: fix updating of slope on slew with large residual freq
Miroslav Lichvar [Fri, 27 Mar 2015 09:20:55 +0000 (10:20 +0100)] 
sourcestats: fix updating of slope on slew with large residual freq

10 years agotest: make 009-sourceselection more reliable
Miroslav Lichvar [Thu, 26 Mar 2015 15:15:38 +0000 (16:15 +0100)] 
test: make 009-sourceselection more reliable

10 years agotest: add 118-maxdelay
Miroslav Lichvar [Thu, 26 Mar 2015 13:44:12 +0000 (14:44 +0100)] 
test: add 118-maxdelay

10 years agotest: add 117-fallbackdrift
Miroslav Lichvar [Thu, 26 Mar 2015 11:36:58 +0000 (12:36 +0100)] 
test: add 117-fallbackdrift

10 years agoreference: schedule fallback drift even when synchronized
Miroslav Lichvar [Thu, 26 Mar 2015 11:32:00 +0000 (12:32 +0100)] 
reference: schedule fallback drift even when synchronized

After update to NTPv4 the synchronized status doesn't change when
sources are unreachable, start fallbackdrift timeout on reference update
too.

10 years agoreference: don't limit fallback drift offset
Miroslav Lichvar [Thu, 26 Mar 2015 11:30:17 +0000 (12:30 +0100)] 
reference: don't limit fallback drift offset

10 years agoreference: fix initial fallback drift setting
Miroslav Lichvar [Thu, 26 Mar 2015 11:29:21 +0000 (12:29 +0100)] 
reference: fix initial fallback drift setting

10 years agontp: check also reference timestamp in test3
Miroslav Lichvar [Wed, 25 Mar 2015 16:21:26 +0000 (17:21 +0100)] 
ntp: check also reference timestamp in test3

Zero reference timestamp doesn't pass test7, but only before we reach
the next NTP era.

10 years agocmdmon: remove obsolete request/reply in candm.h
Miroslav Lichvar [Wed, 25 Mar 2015 15:54:09 +0000 (16:54 +0100)] 
cmdmon: remove obsolete request/reply in candm.h

10 years agocmdmon: fix noselect flag setting in source data
Miroslav Lichvar [Wed, 25 Mar 2015 15:50:44 +0000 (16:50 +0100)] 
cmdmon: fix noselect flag setting in source data

10 years agontp: change default maxdelay to 3 seconds
Miroslav Lichvar [Wed, 25 Mar 2015 14:47:16 +0000 (15:47 +0100)] 
ntp: change default maxdelay to 3 seconds

10 years agodoc: document leapsecmode directive
Miroslav Lichvar [Wed, 25 Mar 2015 14:30:53 +0000 (15:30 +0100)] 
doc: document leapsecmode directive

10 years agotest: extend 113-leapsecond to test new leap modes
Miroslav Lichvar [Wed, 25 Mar 2015 12:10:30 +0000 (13:10 +0100)] 
test: extend 113-leapsecond to test new leap modes

10 years agoreference: use step leap mode by default if system is not supported
Miroslav Lichvar [Wed, 25 Mar 2015 12:08:56 +0000 (13:08 +0100)] 
reference: use step leap mode by default if system is not supported

10 years agoreference: update leap status right after leap second
Miroslav Lichvar [Tue, 24 Mar 2015 17:04:09 +0000 (18:04 +0100)] 
reference: update leap status right after leap second

Don't wait for the next update, there may not be any before the end of
the day.

10 years agoreference: don't report synchronized status during leap second
Miroslav Lichvar [Tue, 24 Mar 2015 16:55:44 +0000 (17:55 +0100)] 
reference: don't report synchronized status during leap second

During inserted leap second the time is invalid, reply with
unsynchronized status to avoid confusing clients that are not smart
enough to ignore measurements close to leap second.

10 years agoreference: add new leap second handling modes
Miroslav Lichvar [Tue, 24 Mar 2015 16:29:44 +0000 (17:29 +0100)] 
reference: add new leap second handling modes

In addition to the system driver handling add new modes to slew or step
the system clock for leap second, or ignore it completely. This can be
configured with leapsecmode directive.

10 years agosys: avoid syslog message when leap bits are not changed
Miroslav Lichvar [Wed, 18 Mar 2015 16:48:49 +0000 (17:48 +0100)] 
sys: avoid syslog message when leap bits are not changed

After leap second the kernel removes STA_INS and STA_DEL bits from the
adjtimex status automatically, don't report a change when clearing the
bits.

10 years agorefclock: start refid numbering at zero
Miroslav Lichvar [Tue, 17 Feb 2015 09:26:06 +0000 (10:26 +0100)] 
refclock: start refid numbering at zero

Commit d92583ed inadvertently changed the refclock refid numbering to
start from 1 instead of 0. Restore the original numbering.

10 years agontp: fix maxdelayratio test
Miroslav Lichvar [Thu, 29 Jan 2015 11:49:02 +0000 (12:49 +0100)] 
ntp: fix maxdelayratio test

This was broken in commit 8fbfe55e.

10 years agotest: require latest clknetsim
Miroslav Lichvar [Wed, 28 Jan 2015 08:09:08 +0000 (09:09 +0100)] 
test: require latest clknetsim

10 years agodoc: update NEWS 2.0-pre1
Miroslav Lichvar [Tue, 27 Jan 2015 13:32:25 +0000 (14:32 +0100)] 
doc: update NEWS

10 years agoexamples: add chrony.conf.example1
Miroslav Lichvar [Tue, 27 Jan 2015 09:56:27 +0000 (10:56 +0100)] 
examples: add chrony.conf.example1

This is a minimal example.

10 years agoexamples: update configuration examples
Miroslav Lichvar [Fri, 23 Jan 2015 10:19:59 +0000 (11:19 +0100)] 
examples: update configuration examples

10 years agoexamples: rename chrony.conf.example to chrony.conf.example3
Miroslav Lichvar [Fri, 23 Jan 2015 15:12:32 +0000 (16:12 +0100)] 
examples: rename chrony.conf.example to chrony.conf.example3

Order the examples by complexity.

10 years agodoc: update chrony.conf man page
Miroslav Lichvar [Fri, 23 Jan 2015 10:21:12 +0000 (11:21 +0100)] 
doc: update chrony.conf man page

10 years agodoc: update chrony.texi
Miroslav Lichvar [Fri, 23 Jan 2015 10:20:31 +0000 (11:20 +0100)] 
doc: update chrony.texi

10 years agotest: add compilation test
Miroslav Lichvar [Mon, 26 Jan 2015 11:10:31 +0000 (12:10 +0100)] 
test: add compilation test

Check if chrony can be compiled in various combination of disabled
features. This should fail if there are missing functions in stubs.c.

10 years agoclientlog: remove unused code
Miroslav Lichvar [Mon, 26 Jan 2015 10:37:13 +0000 (11:37 +0100)] 
clientlog: remove unused code

10 years agocmdmon: bind to loopback interface by default
Miroslav Lichvar [Fri, 23 Jan 2015 14:59:41 +0000 (15:59 +0100)] 
cmdmon: bind to loopback interface by default

10 years agocmdmon: use system values for loopback addresses
Miroslav Lichvar [Fri, 23 Jan 2015 13:31:41 +0000 (14:31 +0100)] 
cmdmon: use system values for loopback addresses

10 years agotest: require latest clknetsim
Miroslav Lichvar [Fri, 23 Jan 2015 13:52:39 +0000 (14:52 +0100)] 
test: require latest clknetsim

10 years agocontrib: remove DNSchrony from distribution
Miroslav Lichvar [Thu, 22 Jan 2015 14:32:38 +0000 (15:32 +0100)] 
contrib: remove DNSchrony from distribution

With the new pool directive chronyd is now able to replace unreachable
NTP servers with newly resolved addresses automatically. Starting
without DNS wasn't a problem since 1.25.

10 years agontp: remove unnecessary check in read_from_socket()
Miroslav Lichvar [Thu, 22 Jan 2015 14:24:16 +0000 (15:24 +0100)] 
ntp: remove unnecessary check in read_from_socket()

10 years agocreate NTP and cmdmon sockets after root drop
Miroslav Lichvar [Thu, 22 Jan 2015 13:42:05 +0000 (14:42 +0100)] 
create NTP and cmdmon sockets after root drop

This is now possible as we keep the cap_net_bind_service capability.

10 years agontp: keep all length constants signed
Miroslav Lichvar [Thu, 22 Jan 2015 12:45:06 +0000 (13:45 +0100)] 
ntp: keep all length constants signed

This should make it harder to accidentally create an unsafe comparison
between signed and unsigned values.

10 years agontp: use different value for invalid socket in ntp_core
Miroslav Lichvar [Wed, 7 Jan 2015 14:38:57 +0000 (15:38 +0100)] 
ntp: use different value for invalid socket in ntp_core

This should make it easier to see invalid sockets leaking from ntp_core
to ntp_io.

10 years agontp: fix length check of NTPv4 extension fields
Miroslav Lichvar [Wed, 7 Jan 2015 12:58:11 +0000 (13:58 +0100)] 
ntp: fix length check of NTPv4 extension fields

Don't allow extension fields shorter than 16 bytes.

10 years agontp: open server socket only when access is allowed
Miroslav Lichvar [Tue, 6 Jan 2015 14:12:26 +0000 (15:12 +0100)] 
ntp: open server socket only when access is allowed

When changing access configuration, check if any address is allowed and
open/close the server socket as needed.

10 years agontp: count references to NTP server sockets
Miroslav Lichvar [Mon, 5 Jan 2015 16:18:50 +0000 (17:18 +0100)] 
ntp: count references to NTP server sockets

Server sockets are now explicitly opened and closed for normal NTP
server, NTP broadcast and NTP peering. This will allow closing the
NTP port when not needed.

10 years agosys: keep cap_net_bind_service capability
Miroslav Lichvar [Tue, 6 Jan 2015 10:17:47 +0000 (11:17 +0100)] 
sys: keep cap_net_bind_service capability

This will be needed to allow opening of NTP server socket after root
privileges are dropped.

10 years agontp: rename NIO_Get*Socket functions
Miroslav Lichvar [Mon, 5 Jan 2015 13:17:21 +0000 (14:17 +0100)] 
ntp: rename NIO_Get*Socket functions

10 years agodoc: improve FAQ section on improving accuracy
Miroslav Lichvar [Wed, 17 Dec 2014 15:28:43 +0000 (16:28 +0100)] 
doc: improve FAQ section on improving accuracy

10 years agodoc: use example.net domain in examples
Miroslav Lichvar [Wed, 17 Dec 2014 15:34:16 +0000 (16:34 +0100)] 
doc: use example.net domain in examples

10 years agodoc: update description of tracking command
Miroslav Lichvar [Wed, 17 Dec 2014 15:21:19 +0000 (16:21 +0100)] 
doc: update description of tracking command

Negative root delay is never reported with the current code.

10 years agodoc: list server/peer options that can be set in chronyc
Miroslav Lichvar [Mon, 15 Dec 2014 17:20:31 +0000 (18:20 +0100)] 
doc: list server/peer options that can be set in chronyc

10 years agodoc: fix examples of add server and add peer commands
Miroslav Lichvar [Mon, 15 Dec 2014 17:19:30 +0000 (18:19 +0100)] 
doc: fix examples of add server and add peer commands

10 years agocmdparse: add function to convert error status to string
Miroslav Lichvar [Mon, 15 Dec 2014 16:59:42 +0000 (17:59 +0100)] 
cmdparse: add function to convert error status to string

This is used to avoid duplication of error printing in chronyd and
chronyc.

10 years agosys: use system headers for adjtimex
Miroslav Lichvar [Mon, 15 Dec 2014 16:23:15 +0000 (17:23 +0100)] 
sys: use system headers for adjtimex

10 years agosys: remove shift_hz
Miroslav Lichvar [Tue, 9 Dec 2014 16:58:42 +0000 (17:58 +0100)] 
sys: remove shift_hz

It's not used for anything since commit e147f2f1.

10 years agosys: remove TMX_ReadCurrentParams
Miroslav Lichvar [Tue, 9 Dec 2014 16:50:37 +0000 (17:50 +0100)] 
sys: remove TMX_ReadCurrentParams

10 years agosys: add sync status setting to generic and Linux driver
Miroslav Lichvar [Tue, 9 Dec 2014 16:31:10 +0000 (17:31 +0100)] 
sys: add sync status setting to generic and Linux driver

Set the adjtimex status, esterror and maxerror fields to the values
provided by the reference module.

10 years agosys: fix formatting in sys_linux.c
Miroslav Lichvar [Tue, 9 Dec 2014 16:26:30 +0000 (17:26 +0100)] 
sys: fix formatting in sys_linux.c

10 years agolocal: add new driver call to set synchronization status
Miroslav Lichvar [Tue, 9 Dec 2014 14:42:56 +0000 (15:42 +0100)] 
local: add new driver call to set synchronization status

This will be used to set the kernel adjtimex() variables to allow other
applications running on the system to know if the system clock is
synchronized and the estimated error and the maximum error.

10 years agoclient: add second form of makestep command
Miroslav Lichvar [Mon, 8 Dec 2014 16:54:08 +0000 (17:54 +0100)] 
client: add second form of makestep command

The second form configures the automatic stepping, similarly to the
makestep directive. It has two parameters, stepping threshold (in
seconds) and number of future clock updates for which will be the
threshold active. This can be used with the burst command to quickly
make a new measurement and correct the clock by stepping if needed,
without waiting for chronyd to complete the measurement and update the
clock.

10 years agocmdmon: initialize new source params when adding source
Miroslav Lichvar [Tue, 9 Dec 2014 10:35:01 +0000 (11:35 +0100)] 
cmdmon: initialize new source params when adding source

10 years agosources: allow setting minsamples and maxsamples for each source
Miroslav Lichvar [Mon, 1 Dec 2014 17:35:35 +0000 (18:35 +0100)] 
sources: allow setting minsamples and maxsamples for each source

The minsamples and maxsamples directives now set the default value,
which can be overriden for individual sources in the server/peer/pool
and refclock directives.

10 years agontp: don't replace source instance when changing address
Miroslav Lichvar [Mon, 1 Dec 2014 17:01:11 +0000 (18:01 +0100)] 
ntp: don't replace source instance when changing address

Add new functions to change source's reference ID/address and reset the
instance. Use that instead of destroying and creating a new instance
when the NTP address is changed.

10 years agontp: limit number of pool sources
Miroslav Lichvar [Wed, 26 Nov 2014 15:40:33 +0000 (16:40 +0100)] 
ntp: limit number of pool sources

A new option can be now used in the pool directive: maxsources sets the
maximum number of sources that can be used from the pool, the default
value is 4.

On start, when the pool name is resolved, chronyd will add up to 16
sources, one for each resolved address. When the number of sources from
which at least one valid reply was received reaches maxsources, the
other sources will be removed.

10 years agontp: update number of sources when removing all sources
Miroslav Lichvar [Mon, 24 Nov 2014 17:28:39 +0000 (18:28 +0100)] 
ntp: update number of sources when removing all sources

Also, rehash the records after removal and split cleaning of the source
record to a separate function.

10 years agontp: return status from NCR_ProcessKnown()
Miroslav Lichvar [Mon, 24 Nov 2014 15:14:04 +0000 (16:14 +0100)] 
ntp: return status from NCR_ProcessKnown()

10 years agodoc: update tempcomp description
Miroslav Lichvar [Fri, 21 Nov 2014 12:13:15 +0000 (13:13 +0100)] 
doc: update tempcomp description

10 years agotempcomp: allow configuration with list of points
Miroslav Lichvar [Fri, 21 Nov 2014 10:47:12 +0000 (11:47 +0100)] 
tempcomp: allow configuration with list of points

In addition to the quadratic function, allow configuration of the
compensation with a file containing list of (temperature, compensation)
points used for linear interpolation and extrapolation.

10 years agotest: fix 111-knownclient
Miroslav Lichvar [Fri, 21 Nov 2014 10:44:15 +0000 (11:44 +0100)] 
test: fix 111-knownclient

The new NTPv4 loop synchronization check fails as clknetsim doesn't
support IP_PKTINFO yet. Use the noselect option to prevent the server to
synchronize to the client.

10 years agontp: fix accepting requests from configured sources
Miroslav Lichvar [Fri, 21 Nov 2014 10:43:47 +0000 (11:43 +0100)] 
ntp: fix accepting requests from configured sources

When using server socket to send client requests (acquisitionport 123)
and currently not waiting for a reply, the socket check will fail for
client requests from the source.

The check needs to be moved to correctly handle the requests as from an
unknown source.

10 years agotempcomp: fix double free on sensor filename
Miroslav Lichvar [Tue, 4 Nov 2014 10:15:28 +0000 (11:15 +0100)] 
tempcomp: fix double free on sensor filename

This is related to commit f6ed7844e1ac8c25fe9ba84232c563f302beba30.

10 years agoconf: change default stratumweight to 0.001
Miroslav Lichvar [Mon, 3 Nov 2014 14:13:52 +0000 (15:13 +0100)] 
conf: change default stratumweight to 0.001

10 years agontp: support pools
Miroslav Lichvar [Mon, 3 Nov 2014 10:16:13 +0000 (11:16 +0100)] 
ntp: support pools

The pool directive can be used to configure chronyd for a pool of NTP
servers (e.g. pool.ntp.org). The name is expected to resolve to multiple
addresses which change over time.

On start, a source will be added for each resolved address. When a
source from the pool is unreachable or marked as falseticker, chronyd
will try to replace the source with a newly resolved address of the
pool.

The minimum interval between replacements is currently set to 244
seconds to avoid frequent DNS requests.

10 years agontp: allow changing address of core instance
Miroslav Lichvar [Fri, 31 Oct 2014 15:38:39 +0000 (16:38 +0100)] 
ntp: allow changing address of core instance

10 years agontp: try adding other server addresses
Miroslav Lichvar [Thu, 23 Oct 2014 13:20:14 +0000 (15:20 +0200)] 
ntp: try adding other server addresses

When adding a server from configuration file, don't give up when the
first returned address was already added for another server directive,
but try adding other addresses until one succeeds.

10 years agonameserv: add support for returning multiple addresses
Miroslav Lichvar [Tue, 21 Oct 2014 13:37:16 +0000 (15:37 +0200)] 
nameserv: add support for returning multiple addresses

10 years agonameserv: check that address returned from gethostbyname() is IPv4
Miroslav Lichvar [Tue, 21 Oct 2014 11:50:52 +0000 (13:50 +0200)] 
nameserv: check that address returned from gethostbyname() is IPv4

Also, always return failure with -6.

10 years agontp: take auto_offline sources offline before sending new request
Miroslav Lichvar [Thu, 23 Oct 2014 11:11:59 +0000 (13:11 +0200)] 
ntp: take auto_offline sources offline before sending new request

10 years agotest: add 116-minsources
Miroslav Lichvar [Mon, 20 Oct 2014 16:05:20 +0000 (18:05 +0200)] 
test: add 116-minsources

10 years agosources: add minsources option
Miroslav Lichvar [Mon, 20 Oct 2014 15:46:33 +0000 (17:46 +0200)] 
sources: add minsources option

This sets the minimum number of selectable sources needed to update the
local clock.

10 years agodocs: fix formatting of examples in server options
Miroslav Lichvar [Mon, 20 Oct 2014 14:17:38 +0000 (16:17 +0200)] 
docs: fix formatting of examples in server options

10 years agontp: add version option to server/peer directive
Miroslav Lichvar [Mon, 20 Oct 2014 14:12:39 +0000 (16:12 +0200)] 
ntp: add version option to server/peer directive

10 years agoconf: use array for broadcast destinations
Miroslav Lichvar [Mon, 20 Oct 2014 11:02:30 +0000 (13:02 +0200)] 
conf: use array for broadcast destinations

10 years agoconf: use arrays for NTP and cmdmon restrictions
Miroslav Lichvar [Mon, 20 Oct 2014 10:53:54 +0000 (12:53 +0200)] 
conf: use arrays for NTP and cmdmon restrictions

10 years agotest: add 009-sourceselection
Miroslav Lichvar [Mon, 20 Oct 2014 10:13:12 +0000 (12:13 +0200)] 
test: add 009-sourceselection

10 years agotest: add option to create falsetickers
Miroslav Lichvar [Mon, 20 Oct 2014 10:12:12 +0000 (12:12 +0200)] 
test: add option to create falsetickers

10 years agontp: remove debug messages in slew handler
Miroslav Lichvar [Fri, 17 Oct 2014 13:20:59 +0000 (15:20 +0200)] 
ntp: remove debug messages in slew handler

10 years agosourcestats: reduce debug messages in slew handler
Miroslav Lichvar [Fri, 17 Oct 2014 13:19:57 +0000 (15:19 +0200)] 
sourcestats: reduce debug messages in slew handler

10 years agosources: reset reachability for offline sources
Miroslav Lichvar [Fri, 17 Oct 2014 15:22:00 +0000 (17:22 +0200)] 
sources: reset reachability for offline sources

With the recent change allowing unreachable sources to remain selected,
offline sources will now be selectable only for some time, similarly to
online unreachable sources.

10 years agosources: allow selection of unreachable sources
Miroslav Lichvar [Fri, 17 Oct 2014 14:51:45 +0000 (16:51 +0200)] 
sources: allow selection of unreachable sources

Reachability is no longer a requirement for selection. An unreachable
source can remain selected if its newest sample is not older than the
oldest sample from all reachable sources.

This is useful to prevent reselection when an accurate source uses a
very short polling interval (e.g. refclock) and is occasionally
unreachable for short periods of time.

10 years agosources: extend source status tracking
Miroslav Lichvar [Fri, 17 Oct 2014 11:19:04 +0000 (13:19 +0200)] 
sources: extend source status tracking

Add new source states and rename some states so there is one state for
each reason a source can be rejected in the source selection.

This fixes reported status when sources are selectable, but the actual
selection was postponed until next update. It will also allow more
detailed reports when the cmdmon protocol is updated.

10 years agosources: fix reported normal select option
Miroslav Lichvar [Fri, 17 Oct 2014 11:05:44 +0000 (13:05 +0200)] 
sources: fix reported normal select option

10 years agosources: select only when reference can be updated
Miroslav Lichvar [Fri, 17 Oct 2014 08:18:39 +0000 (10:18 +0200)] 
sources: select only when reference can be updated

Before selecting the new synchronization source wait until the reference
can be updated, i.e. the source has new samples.

10 years agosources: drop selectable flag
Miroslav Lichvar [Thu, 16 Oct 2014 16:07:03 +0000 (18:07 +0200)] 
sources: drop selectable flag

This is no longer needed with new NTP packet processing as the sources
are always selectable after first sample is accumulated.

10 years agosources: reorder SRC_SelectSource()
Miroslav Lichvar [Thu, 16 Oct 2014 15:51:58 +0000 (17:51 +0200)] 
sources: reorder SRC_SelectSource()

Reorder the code to improve readability and also update coding style.
No functional changes.

10 years agosources: keep synchronized status with unreachable/unselectable sources
Miroslav Lichvar [Thu, 16 Oct 2014 14:26:05 +0000 (16:26 +0200)] 
sources: keep synchronized status with unreachable/unselectable sources

Following RFC 5905, don't call REF_SetUnsynchronised() when there are no
reachable or selectable sources. It's up to the client to consider the
source unsynchronized when the root distance exceeds a threshold.

The unsynchronized status is still set when no majority is reached.

10 years agosources: update reference only with new sample
Miroslav Lichvar [Thu, 16 Oct 2014 13:28:12 +0000 (15:28 +0200)] 
sources: update reference only with new sample

This follows the section 11.2.3. from RFC 5905.