Advanced NTP client and server
Find a file
Miroslav Lichvar b8b3830dc4 ntp: randomize address selection on all source replacements
If the resolver orders addresses by IP family, there is more than one
address in the preferred IP family, and they are all reachable, but
not selectable (e.g. falsetickers in a small pool which cannot remove
them from DNS), chronyd is unable to switch to addresses in the other IP
family as it follows the resolver's order.

Enable randomization of the address selection for all source
replacements and not just replacement of (unreachable) tentative
sources. If the system doesn't have connectivity in the other family,
the addresses will be skipped and no change in behavior should be
observed.
2023-05-23 09:33:48 +02:00
contrib
doc ntp: avoid unneccessary replacements on refresh command 2023-05-15 17:23:48 +02:00
examples examples: improve chrony.nm-dispatcher.onoffline script 2023-05-10 10:46:57 +02:00
test ntp: reset polling interval when replacing sources 2023-05-18 10:46:42 +02:00
.gitignore
addressing.h
addrfilt.c
addrfilt.h
array.c array: add function for removing elements 2023-03-02 10:41:28 +01:00
array.h array: add function for removing elements 2023-03-02 10:41:28 +01:00
candm.h cmdmon: switch serverstats to 64-bit integers 2023-03-30 15:17:52 +02:00
client.c client: avoid casting to long 2023-03-30 15:17:52 +02:00
clientlog.c clientlog: extend serverstats counters to 64 bits 2023-03-30 15:17:52 +02:00
clientlog.h clientlog: count RX and TX timestamps for each source 2023-03-22 09:42:35 +01:00
cmac.h
cmac_gnutls.c
cmac_nettle.c
cmdmon.c cmdmon: switch serverstats to 64-bit integers 2023-03-30 15:17:52 +02:00
cmdmon.h
cmdparse.c cmdparse: add functions for parsing refclock refid and select options 2022-12-14 17:04:23 +01:00
cmdparse.h cmdparse: add functions for parsing refclock refid and select options 2022-12-14 17:04:23 +01:00
conf.c ntp: add maximum PHC poll interval 2023-03-22 09:13:53 +01:00
conf.h ntp: add maximum PHC poll interval 2023-03-22 09:13:53 +01:00
configure siv: add support for AES-128-GCM-SIV in Nettle 2022-10-19 15:50:31 +02:00
COPYING
getdate.h Update COPYING and FSF address 2009-10-28 17:53:33 +01:00
getdate.y getdate: fix various warnings which will be errors with clang-16 2022-11-09 09:17:14 +01:00
hash.h
hash_gnutls.c
hash_intmd5.c
hash_nettle.c
hash_nss.c
hash_tomcrypt.c
hwclock.c update copyright years 2022-08-29 15:04:33 +02:00
hwclock.h hwclock: refactor processing of PHC readings 2022-06-09 12:04:20 +02:00
keys.c keys+nts: warn if loading world-readable/writable key 2023-01-19 16:39:40 +01:00
keys.h
local.c local: cancel remaining correction after external step 2022-05-16 16:28:36 +02:00
local.h reference: allow clock adjustments without updating reference 2022-02-23 14:43:39 +01:00
localp.h
logging.c logging: support context-specific severity 2022-11-16 16:57:49 +01:00
logging.h logging: support context-specific severity 2022-11-16 16:57:49 +01:00
main.c conf: warn if not having read-only access to keys 2023-01-25 14:44:59 +01:00
main.h
make_release
Makefile.in ntp: add maxdelayquant option 2022-07-21 16:05:48 +02:00
manual.c
manual.h
md5.c md5: fix old-style function definitions 2023-04-17 11:40:18 +02:00
md5.h
memory.c
memory.h
nameserv.c
nameserv.h
nameserv_async.c
nameserv_async.h
NEWS doc: update NEWS 2023-05-10 14:28:42 +02:00
ntp.h clientlog: save source of transmit timestamps 2023-03-22 09:42:06 +01:00
ntp_auth.c
ntp_auth.h
ntp_core.c ntp: set minimum polltarget 2023-05-18 10:46:46 +02:00
ntp_core.h clientlog: save source of transmit timestamps 2023-03-22 09:42:06 +01:00
ntp_ext.c
ntp_ext.h
ntp_io.c ntp: save response when waiting for HW TX timestamp 2023-03-30 15:44:19 +02:00
ntp_io.h
ntp_io_linux.c ntp: save response when waiting for HW TX timestamp 2023-03-30 15:44:19 +02:00
ntp_io_linux.h ntp: save response when waiting for HW TX timestamp 2023-03-30 15:44:19 +02:00
ntp_signd.c
ntp_signd.h
ntp_sources.c ntp: randomize address selection on all source replacements 2023-05-23 09:33:48 +02:00
ntp_sources.h
nts_ke.h
nts_ke_client.c nts: add client support for authentication with AES-128-GCM-SIV 2022-10-19 15:50:39 +02:00
nts_ke_client.h nts: add support for multiple sets of trusted certificates 2021-02-18 17:44:04 +01:00
nts_ke_server.c log more changes made by chronyc commands 2022-12-01 16:58:23 +01:00
nts_ke_server.h
nts_ke_session.c keys+nts: warn if loading world-readable/writable key 2023-01-19 16:39:40 +01:00
nts_ke_session.h
nts_ntp.h
nts_ntp_auth.c nts: fix number of extension fields after failed encryption 2022-10-19 15:50:39 +02:00
nts_ntp_auth.h nts: add support for NTP authenticator field using AES-GCM-SIV 2022-10-19 15:50:39 +02:00
nts_ntp_client.c nts: use shorter NTS-KE retry interval when network is down 2023-02-27 11:43:22 +01:00
nts_ntp_client.h
nts_ntp_server.c nts: add server support for authentication with AES-128-GCM-SIV 2022-10-19 15:50:39 +02:00
nts_ntp_server.h
pktlength.c cmdmon: add timestamp counters to serverstats report 2023-03-22 10:47:22 +01:00
pktlength.h
privops.c
privops.h
ptp.h ntp: increment sequence id in PTP messages 2023-03-07 17:00:08 +01:00
quantiles.c quantiles: add function to get minimum k 2022-07-21 15:33:35 +02:00
quantiles.h quantiles: add function to get minimum k 2022-07-21 15:33:35 +02:00
README doc: update list of contributors in README 2023-05-10 10:46:57 +02:00
refclock.c update copyright years 2022-08-29 15:04:33 +02:00
refclock.h refclock: improve precision with large offset 2022-02-23 14:43:39 +01:00
refclock_phc.c refclock_phc: support multiple extpps refclocks on one PHC 2023-03-02 15:33:59 +01:00
refclock_pps.c
refclock_shm.c refclock: improve precision with large offset 2022-02-23 14:43:39 +01:00
refclock_sock.c refclock: fix preprocessor conditional 2023-01-19 11:51:41 +01:00
reference.c log more changes made by chronyc commands 2022-12-01 16:58:23 +01:00
reference.h reference: allow clock adjustments without updating reference 2022-02-23 14:43:39 +01:00
regress.c
regress.h
reports.h clientlog: extend serverstats counters to 64 bits 2023-03-30 15:17:52 +02:00
rtc.c
rtc.h
rtc_linux.c rtc: don't drop first sample after initial trim 2021-12-01 09:22:26 +01:00
rtc_linux.h
samplefilt.c samplefilt: add debug message for selected samples 2022-07-21 14:17:22 +02:00
samplefilt.h samplefilt: add function to get maximum number of samples 2022-07-21 14:17:22 +02:00
sched.c sched: free timer blocks on exit 2023-04-13 16:22:50 +02:00
sched.h ntp: add maximum PHC poll interval 2023-03-22 09:13:53 +01:00
siv.h siv: add functions to return min and max nonce length 2022-10-19 15:50:39 +02:00
siv_gnutls.c siv: add functions to return min and max nonce length 2022-10-19 15:50:39 +02:00
siv_nettle.c siv: add functions to return min and max nonce length 2022-10-19 15:50:39 +02:00
siv_nettle_int.c siv: add internal implementation based on Nettle 2020-03-05 16:02:15 +01:00
smooth.c log more changes made by chronyc commands 2022-12-01 16:58:23 +01:00
smooth.h
socket.c socket: zero sockaddr_un to initialize sa_len 2021-12-16 10:48:31 +01:00
socket.h
sources.c sources: warn about detected falsetickers 2023-01-26 17:03:35 +01:00
sources.h sources: add function to modify selection options 2022-12-14 17:04:49 +01:00
sourcestats.c sourcestats: don't fudge refclock LastRx in sources report 2023-02-02 11:26:04 +01:00
sourcestats.h sourcestats: add function to get minsamples 2022-02-10 16:38:50 +01:00
srcparams.h ntp: add maxdelayquant option 2022-07-21 16:05:48 +02:00
stubs.c
sys.c
sys.h
sys_generic.c sys_generic: damp slew oscillation due to delayed stop 2022-06-15 17:42:49 +02:00
sys_generic.h
sys_linux.c sys_linux: avoid blocking in reading of external PHC timestamp 2023-03-02 15:13:18 +01:00
sys_linux.h hwclock: refactor processing of PHC readings 2022-06-09 12:04:20 +02:00
sys_macosx.c
sys_macosx.h
sys_netbsd.c
sys_netbsd.h
sys_null.c
sys_null.h
sys_posix.c
sys_posix.h
sys_solaris.c doc: switch Solaris support to illumos 2021-12-09 17:03:56 +01:00
sys_solaris.h
sys_timex.c
sys_timex.h
sysincl.h
tempcomp.c
tempcomp.h
util.c cmdmon: define 64-bit integer 2023-03-30 15:17:50 +02:00
util.h cmdmon: define 64-bit integer 2023-03-30 15:17:50 +02:00

This is the README for chrony.

What is chrony?
===============

chrony is a versatile implementation of the Network Time Protocol (NTP).
It can synchronise the system clock with NTP servers, reference clocks
(e.g. GPS receiver), and manual input using wristwatch and keyboard.
It can also operate as an NTPv4 (RFC 5905) server and peer to provide
a time service to other computers in the network.

It is designed to perform well in a wide range of conditions, including
intermittent network connections, heavily congested networks, changing
temperatures (ordinary computer clocks are sensitive to temperature),
and systems that do not run continuosly, or run on a virtual machine.

Typical accuracy between two machines synchronised over the Internet is
within a few milliseconds; on a LAN, accuracy is typically in tens of
microseconds.  With hardware timestamping, or a hardware reference clock,
sub-microsecond accuracy may be possible.

Two programs are included in chrony, chronyd is a daemon that can be
started at boot time and chronyc is a command-line interface program
which can be used to monitor chronyd's performance and to change various
operating parameters whilst it is running.

What will chrony run on?
========================

The software is known to work on Linux, FreeBSD, NetBSD, macOS and
illumos.  Closely related systems may work too.  Any other system will
likely require a porting exercise.

How do I set it up?
===================

The file INSTALL gives instructions.  On supported systems the
compilation process should be automatic.  You will need a C compiler,
e.g. gcc or clang.

What documentation is there?
============================

The distribution includes manual pages and a document containing
Frequently Asked Questions (FAQ).

The documentation is also available on the chrony web pages, accessible
through the URL 

    https://chrony.tuxfamily.org/

Where are new versions announced?
=================================

There is a low volume mailing list where new versions and other
important news relating to chrony are announced.  You can join this list
by sending mail with the subject "subscribe" to

chrony-announce-request@chrony.tuxfamily.org

How can I get support for chrony?
=================================

There are two other mailing lists relating to chrony.  chrony-users is a
discussion list for users, e.g. for questions about chrony configuration
and bug reports.  chrony-dev is a more technical list for developers,
e.g. for submitting patches and discussing how new features should be
implemented.  To subscribe to either of these lists, send a message with
the subject "subscribe" to

chrony-users-request@chrony.tuxfamily.org
or
chrony-dev-request@chrony.tuxfamily.org

as applicable.

License
=======

chrony is distributed under the GNU General Public License version 2.

Authors
=======

Richard P. Curnow <rc@rc0.org.uk>
Miroslav Lichvar <mlichvar@redhat.com>

Acknowledgements
================

In writing the chronyd program, extensive use has been made of the NTPv3 (RFC
1305) and NTPv4 (RFC 5905) specification.  The source code of the xntpd/ntpd
implementation written by Dennis Fergusson, Lars Mathiesen, David Mills, and
others has been used to check the details of the protocol.

The following people have provided patches and other major contributions
to chrony:

Lonnie Abelbeck <lonnie@abelbeck.com>
Benny Lyne Amorsen <benny@amorsen.dk>
Andrew Bishop <amb@gedanken.demon.co.uk>
Vincent Blut <vincent.debian@free.fr>
Stephan I. Boettcher <stephan@nevis1.columbia.edu>
David Bohman <debohman@gmail.com>
Goswin Brederlow <brederlo@informatik.uni-tuebingen.de>
Leigh Brown <leigh@solinno.co.uk>
Erik Bryer <ebryer@spots.ab.ca>
Jonathan Cameron <jic23@cam.ac.uk>
Bryan Christianson <bryan@whatroute.net>
Juliusz Chroboczek <jch@pps.jussieu.fr>
Dan Drown <dan-ntp@drown.org>
Kamil Dudka <kdudka@redhat.com>
Christian Ehrhardt <christian.ehrhardt@canonical.com>
Paul Elliott <pelliott@io.com>
Robert Fairley <rfairley@redhat.com>
Stefan R. Filipek <srfilipek@gmail.com>
Mike Fleetwood <mike@rockover.demon.co.uk>
Alexander Gretencord <arutha@gmx.de>
Andrew Griffiths <agriffit@redhat.com>
Walter Haidinger <walter.haidinger@gmx.at>
Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>
John Hasler <john@dhh.gt.org>
Tjalling Hattink <t.hattink@fugro.nl>
Liam Hatton <me@liamhatton.com>
Holger Hoffstätte <holger@applied-asynchrony.com>
Jachym Holecek <jakym@volny.cz>
Håkan Johansson <f96hajo@chalmers.se>
Jim Knoble <jmknoble@pobox.com>
Antti Jrvinen <costello@iki.fi>
Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Eric Lammerts <eric@lammerts.org>
Stefan Lucke <stefan@lucke.in-berlin.de>
Victor Lum <viclum@vanu.com>
Kevin Lyda <kevin@ie.suberic.net>
Paul Menzel <paulepanter@users.sourceforge.net>
Vladimir Michl <vladimir.michl@seznam.cz>
Victor Moroz <vim@prv.adlum.ru>
Kalle Olavi Niemitalo  <tosi@stekt.oulu.fi>
Frank Otto <sandwichmacher@web.de>
Denny Page <dennypage@me.com>
Rupesh Patel <rupatel@redhat.com>
Chris Perl <cperl@janestreet.com>
Gautier PHILIPPON <gautier.philippon@ensimag.grenoble-inp.fr>
Andreas Piesk <apiesk@virbus.de>
Mike Ryan <msr@hsilop.net>
Baruch Siach <baruch@tkos.co.il>
Foster Snowhill <forst@forstwoof.ru>
Andreas Steinmetz <ast@domdv.de>
NAKAMURA Takumi <takumi@ps.sakura.ne.jp>
Timo Teras <timo.teras@iki.fi>
Bill Unruh <unruh@physics.ubc.ca>
Stephen Wadeley <swadeley@redhat.com>
Bernhard Weiss <lisnablagh@web.de>
Wolfgang Weisselberg <weissel@netcologne.de>
Bernhard M. Wiedemann <bwiedemann@suse.de>
Joachim Wiedorn <ad_debian@joonet.de>
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Ulrich Windl <ulrich.windl@rz.uni-regensburg.de>
Michael Witten <mfwitten@gmail.com>
Doug Woodward <dougw@whistler.com>
Thomas Zajic <zlatko@zlatko.fdns.net>

Many other people have contributed bug reports and suggestions.  We are sorry
we cannot identify all of you individually.