]>
git.ipfire.org Git - thirdparty/chrony.git/log
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.
Miroslav Lichvar [Thu, 23 Oct 2014 11:11:59 +0000 (13:11 +0200)]
ntp: take auto_offline sources offline before sending new request
Miroslav Lichvar [Mon, 20 Oct 2014 16:05:20 +0000 (18:05 +0200)]
test: add 116-minsources
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.
Miroslav Lichvar [Mon, 20 Oct 2014 14:17:38 +0000 (16:17 +0200)]
docs: fix formatting of examples in server options
Miroslav Lichvar [Mon, 20 Oct 2014 14:12:39 +0000 (16:12 +0200)]
ntp: add version option to server/peer directive
Miroslav Lichvar [Mon, 20 Oct 2014 11:02:30 +0000 (13:02 +0200)]
conf: use array for broadcast destinations
Miroslav Lichvar [Mon, 20 Oct 2014 10:53:54 +0000 (12:53 +0200)]
conf: use arrays for NTP and cmdmon restrictions
Miroslav Lichvar [Mon, 20 Oct 2014 10:13:12 +0000 (12:13 +0200)]
test: add 009-sourceselection
Miroslav Lichvar [Mon, 20 Oct 2014 10:12:12 +0000 (12:12 +0200)]
test: add option to create falsetickers
Miroslav Lichvar [Fri, 17 Oct 2014 13:20:59 +0000 (15:20 +0200)]
ntp: remove 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
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.
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.
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.
Miroslav Lichvar [Fri, 17 Oct 2014 11:05:44 +0000 (13:05 +0200)]
sources: fix reported normal select option
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.
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.
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.
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.
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.
Miroslav Lichvar [Wed, 15 Oct 2014 10:39:54 +0000 (12:39 +0200)]
ntp: fix Clang warning
Miroslav Lichvar [Wed, 15 Oct 2014 10:25:56 +0000 (12:25 +0200)]
ntp: merge broadcast code with ntp_core
Miroslav Lichvar [Tue, 14 Oct 2014 15:24:41 +0000 (17:24 +0200)]
ntp: define NTP_MAX_STRATUM for other modules
Miroslav Lichvar [Mon, 13 Oct 2014 10:47:19 +0000 (12:47 +0200)]
doc: update for NTPv4 support
Miroslav Lichvar [Mon, 13 Oct 2014 10:49:40 +0000 (12:49 +0200)]
Update comments referencing RFC 1305
Miroslav Lichvar [Mon, 13 Oct 2014 11:26:23 +0000 (13:26 +0200)]
ntp: update packet processing to NTPv4 (RFC 5905)
Miroslav Lichvar [Mon, 13 Oct 2014 11:28:15 +0000 (13:28 +0200)]
ntp: clamp value set by minstratum option
Miroslav Lichvar [Mon, 13 Oct 2014 10:50:44 +0000 (12:50 +0200)]
sources: use correct specifier for refid in debug message
Miroslav Lichvar [Mon, 13 Oct 2014 11:28:45 +0000 (13:28 +0200)]
ntp: print number of bytes sent in debug message
Miroslav Lichvar [Wed, 8 Oct 2014 13:10:33 +0000 (15:10 +0200)]
ntp: enable PKTINFO on client sockets
This will be useful to detect synchronization loops.
Miroslav Lichvar [Fri, 3 Oct 2014 08:15:18 +0000 (10:15 +0200)]
util: fix sockaddr function naming
Miroslav Lichvar [Mon, 29 Sep 2014 09:29:51 +0000 (11:29 +0200)]
client: improve sources caption
Miroslav Lichvar [Fri, 26 Sep 2014 15:49:07 +0000 (17:49 +0200)]
util: use common functions to convert to/from sockaddr
Miroslav Lichvar [Fri, 26 Sep 2014 13:47:57 +0000 (15:47 +0200)]
client: print full date in manual list
Miroslav Lichvar [Fri, 26 Sep 2014 13:25:33 +0000 (15:25 +0200)]
ntp: fix NSR_TakeSourcesOffline()
This was broken when switching to dynamic allocation in commit 9e7193.
Miroslav Lichvar [Fri, 26 Sep 2014 12:14:54 +0000 (14:14 +0200)]
keys: store IDs in uint32_t
Miroslav Lichvar [Thu, 25 Sep 2014 07:46:44 +0000 (09:46 +0200)]
logging: remove warning on missing debug messages
The state of the DEBUG feature is now printed with chronyd version.
Miroslav Lichvar [Wed, 24 Sep 2014 16:20:05 +0000 (18:20 +0200)]
cmdmon: fix initialization of allocated reply slots
The next pointer in the last allocated reply slot was not set. This
could cause a crash when more slots were needed. (the slots are used to
save unacknowledged replies to authenticated commands)
Miroslav Lichvar [Wed, 24 Sep 2014 15:56:08 +0000 (17:56 +0200)]
cmdmon: allocate reply slots in smaller quantums
Miroslav Lichvar [Wed, 24 Sep 2014 14:58:16 +0000 (16:58 +0200)]
cmdmon: use char for permissions table
Miroslav Lichvar [Wed, 24 Sep 2014 14:36:45 +0000 (16:36 +0200)]
refclock: include refid in some debug messages
Miroslav Lichvar [Wed, 24 Sep 2014 13:13:03 +0000 (15:13 +0200)]
util: optimize UTI_RefidToString()
Miroslav Lichvar [Wed, 24 Sep 2014 15:35:04 +0000 (17:35 +0200)]
rtc: allocate samples 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.
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.
Miroslav Lichvar [Wed, 24 Sep 2014 11:56:45 +0000 (13:56 +0200)]
refclocks: allocate refclock instances 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.
Miroslav Lichvar [Wed, 24 Sep 2014 11:43:07 +0000 (13:43 +0200)]
sched: allocate file handlers dynamically
Miroslav Lichvar [Wed, 24 Sep 2014 11:22:31 +0000 (13:22 +0200)]
sources: reallocate arrays in exponentially increasing sizes
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.
Miroslav Lichvar [Wed, 24 Sep 2014 09:31:33 +0000 (11:31 +0200)]
Add array utility functions
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.
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.
Miroslav Lichvar [Mon, 22 Sep 2014 14:09:35 +0000 (16:09 +0200)]
Check for memory allocation errors
Miroslav Lichvar [Tue, 23 Sep 2014 13:45:54 +0000 (15:45 +0200)]
test: make 114-presend more tolerant
Miroslav Lichvar [Mon, 22 Sep 2014 10:51:19 +0000 (12:51 +0200)]
nameserv: move fallback DNS_Name2IPAddressAsync() to stubs.c
Miroslav Lichvar [Fri, 19 Sep 2014 15:55:52 +0000 (17:55 +0200)]
configure: add --disable-sechash option
Miroslav Lichvar [Fri, 19 Sep 2014 15:46:34 +0000 (17:46 +0200)]
Print enabled/disabled features with version
Miroslav Lichvar [Fri, 19 Sep 2014 15:03:33 +0000 (17:03 +0200)]
configure: unify macro naming for optional features
Miroslav Lichvar [Fri, 19 Sep 2014 13:06:01 +0000 (15:06 +0200)]
configure: allow building without cmdmon, NTP, refclock support
Miroslav Lichvar [Fri, 19 Sep 2014 09:06:37 +0000 (11:06 +0200)]
configure: unify macro naming for available headers
Miroslav Lichvar [Fri, 19 Sep 2014 08:13:42 +0000 (10:13 +0200)]
configure: don't remove config files with --help
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 .
Miroslav Lichvar [Wed, 10 Sep 2014 13:06:55 +0000 (15:06 +0200)]
doc: update NEWS
Miroslav Lichvar [Wed, 10 Sep 2014 12:47:50 +0000 (14:47 +0200)]
doc: mention that directives are not case-sensitive
Miroslav Lichvar [Wed, 10 Sep 2014 12:43:44 +0000 (14:43 +0200)]
doc: add section to FAQ on improving accuracy with NTP
Miroslav Lichvar [Wed, 10 Sep 2014 10:05:24 +0000 (12:05 +0200)]
doc: remove minpoll and maxpoll options from configuration example
Miroslav Lichvar [Wed, 10 Sep 2014 14:58:48 +0000 (16:58 +0200)]
sched: fix Clang warning
Miroslav Lichvar [Wed, 10 Sep 2014 09:30:44 +0000 (11:30 +0200)]
client: describe error when could not open config or keyfile
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.
Miroslav Lichvar [Tue, 9 Sep 2014 12:02:00 +0000 (14:02 +0200)]
ntp: print warning 10 years before supported time ends
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.
Miroslav Lichvar [Tue, 9 Sep 2014 09:48:09 +0000 (11:48 +0200)]
Fix compiler warnings on NetBSD
Miroslav Lichvar [Thu, 4 Sep 2014 15:43:27 +0000 (17:43 +0200)]
examples: add NetworkManager dispatcher script
Miroslav Lichvar [Thu, 4 Sep 2014 15:30:36 +0000 (17:30 +0200)]
examples: add systemd services
Miroslav Lichvar [Thu, 4 Sep 2014 15:27:43 +0000 (17:27 +0200)]
examples: add logrotate configuration
Miroslav Lichvar [Thu, 4 Sep 2014 15:22:09 +0000 (17:22 +0200)]
Move chrony.spec to examples
Miroslav Lichvar [Mon, 25 Aug 2014 15:24:58 +0000 (17:24 +0200)]
sys: fix typo in prctl() error message
Miroslav Lichvar [Thu, 21 Aug 2014 12:06:06 +0000 (14:06 +0200)]
util: fix compiler warning with 32-bit time_t
Miroslav Lichvar [Thu, 21 Aug 2014 07:56:57 +0000 (09:56 +0200)]
Update NEWS
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.
Miroslav Lichvar [Wed, 20 Aug 2014 13:24:21 +0000 (15:24 +0200)]
ntp: don't adjust polling interval when sending fails
Miroslav Lichvar [Wed, 20 Aug 2014 12:30:42 +0000 (14:30 +0200)]
ntp: return with status from functions sending packets
Miroslav Lichvar [Wed, 20 Aug 2014 10:52:55 +0000 (12:52 +0200)]
doc: clarify description of -s option
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.
Miroslav Lichvar [Tue, 19 Aug 2014 14:05:47 +0000 (16:05 +0200)]
ntp: restart timer when poll interval changes on reset
Miroslav Lichvar [Tue, 19 Aug 2014 13:51:59 +0000 (15:51 +0200)]
ntp: add function to restart transmit timer
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.
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 .
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.
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.
Miroslav Lichvar [Mon, 18 Aug 2014 15:34:25 +0000 (17:34 +0200)]
rtc: don't try to open rtcfile when not set
Miroslav Lichvar [Mon, 18 Aug 2014 15:19:36 +0000 (17:19 +0200)]
rtc: use fscanf() to read coefficients
Miroslav Lichvar [Mon, 18 Aug 2014 15:03:55 +0000 (17:03 +0200)]
rtc: return status from preinit function
Miroslav Lichvar [Mon, 18 Aug 2014 11:07:52 +0000 (13:07 +0200)]
rtc: use LCL functions to read and step system clock
Miroslav Lichvar [Mon, 18 Aug 2014 11:06:38 +0000 (13:06 +0200)]
rtc: improve accuracy of preinit step
Miroslav Lichvar [Mon, 18 Aug 2014 09:58:56 +0000 (11:58 +0200)]
rtc: minor cleanup in RTC_Linux_TimePreInit()
Miroslav Lichvar [Mon, 18 Aug 2014 09:25:16 +0000 (11:25 +0200)]
rtc: move preinit call to RTC_Initialise()
Miroslav Lichvar [Mon, 18 Aug 2014 09:03:15 +0000 (11:03 +0200)]
rtc: cleanup in error messages