]>
git.ipfire.org Git - thirdparty/chrony.git/log
Miroslav Lichvar [Mon, 7 Apr 2014 13:33:01 +0000 (15:33 +0200)]
sources: replace beginning flag with size of reachability register
This will allow to detect sources that are not reachable on start.
Miroslav Lichvar [Thu, 3 Apr 2014 16:11:37 +0000 (18:11 +0200)]
sources: split source selection from sample accumulation
This will allow postponing source selection and reference update, which
could be useful in burst modes.
Miroslav Lichvar [Tue, 8 Apr 2014 14:59:02 +0000 (16:59 +0200)]
git: update .gitignore
Miroslav Lichvar [Tue, 8 Apr 2014 14:57:05 +0000 (16:57 +0200)]
test: add missing run script
Miroslav Lichvar [Thu, 3 Apr 2014 13:44:43 +0000 (15:44 +0200)]
conf: add bindacqaddress directive for client sockets
Miroslav Lichvar [Thu, 3 Apr 2014 11:26:17 +0000 (13:26 +0200)]
ntp: set only necessary socket options on client sockets
Miroslav Lichvar [Wed, 26 Mar 2014 11:09:09 +0000 (12:09 +0100)]
test: add 112-port
Miroslav Lichvar [Wed, 26 Mar 2014 10:24:25 +0000 (11:24 +0100)]
ntp: fix comment on NCR_ProcessUnknown
Miroslav Lichvar [Wed, 26 Mar 2014 10:15:09 +0000 (11:15 +0100)]
ntp: accept packets from unknown sources only from server sockets
Miroslav Lichvar [Tue, 25 Mar 2014 16:33:55 +0000 (17:33 +0100)]
test: update for latest clknetsim
Latest clknetsim now allows source and destination port numbers to
differ. This fixes the tests to work with the recent changes that added
client NTP sockets.
Miroslav Lichvar [Tue, 25 Mar 2014 14:07:55 +0000 (15:07 +0100)]
ntp: don't create server sockets if port is configured to 0
Miroslav Lichvar [Tue, 25 Mar 2014 13:26:50 +0000 (14:26 +0100)]
ntp: use separate connected sockets for each server
If acquisitionport is set to 0 (default), create and connect a new
socket for each server instead of using one socket per address family
for all servers.
Miroslav Lichvar [Tue, 25 Mar 2014 11:13:36 +0000 (12:13 +0100)]
ntp: use separate client sockets
Use separate sockets for NTP server or peer and client packets. The port
number is configured by the acquisitionport directive. With the default
value of 0 the port is assigned randomly by the kernel. It can be equal
to the value configured by the port directive to use the server sockets
for all packets as before.
Miroslav Lichvar [Tue, 25 Mar 2014 10:51:40 +0000 (11:51 +0100)]
ntp: don't try to bind acquire socket if port is equal to ntp port
Miroslav Lichvar [Mon, 24 Mar 2014 16:10:35 +0000 (17:10 +0100)]
ntp: check if packet was received by right socket
Miroslav Lichvar [Mon, 24 Mar 2014 15:47:58 +0000 (16:47 +0100)]
ntp: store socket in NTP instance
This is preparation for separate client sockets.
Miroslav Lichvar [Mon, 24 Mar 2014 14:53:43 +0000 (15:53 +0100)]
ntp: split local_ip_addr from NTP_Remote_Address struct
Miroslav Lichvar [Mon, 24 Mar 2014 12:48:28 +0000 (13:48 +0100)]
ntp: set invalid socket fd by macro
Miroslav Lichvar [Fri, 21 Mar 2014 14:47:33 +0000 (15:47 +0100)]
doc: improve commandkey and keyfile descriptions
Miroslav Lichvar [Fri, 21 Mar 2014 14:28:33 +0000 (15:28 +0100)]
ntp: set minpoll from received KoD RATE at most to 10
Limit changing minpoll to a reasonable maximum in case the server is
broken or temporarily misconfigured.
Miroslav Lichvar [Fri, 21 Mar 2014 13:29:12 +0000 (14:29 +0100)]
ntp: print warning when source is added with unknown key
Miroslav Lichvar [Fri, 21 Mar 2014 12:16:37 +0000 (13:16 +0100)]
ntp: reset negative minpoll or maxpoll to default values
Miroslav Lichvar [Fri, 21 Mar 2014 11:47:52 +0000 (12:47 +0100)]
cmdparse: don't allow NTP key ID of 0
Key number 0 is used as inactive key, prevent the user from
inadvertently not using authentication.
Miroslav Lichvar [Fri, 21 Mar 2014 11:05:48 +0000 (12:05 +0100)]
test: add 111-knownclient
Miroslav Lichvar [Fri, 21 Mar 2014 11:04:10 +0000 (12:04 +0100)]
test: add port number check
Miroslav Lichvar [Thu, 20 Mar 2014 18:14:47 +0000 (19:14 +0100)]
ntp: make use of NCR_ProcessUnknown in NCR_ProcessKnown
After recent changes the code in NCR_ProcessKnown is now identical and
can be replaced with NCR_ProcessUnknown call.
Miroslav Lichvar [Thu, 20 Mar 2014 18:09:04 +0000 (19:09 +0100)]
ntp: don't store tx time stamp when replying to known source
Miroslav Lichvar [Thu, 20 Mar 2014 18:00:08 +0000 (19:00 +0100)]
ntp: don't reply to known source if missing key or invalid auth
This is now similar to replying to unknown sources.
Miroslav Lichvar [Thu, 20 Mar 2014 17:46:41 +0000 (18:46 +0100)]
test: extend 105-ntpauth
Miroslav Lichvar [Thu, 20 Mar 2014 17:29:44 +0000 (18:29 +0100)]
ntp: don't send requests with unknown key
There is no point in sending a request if the configured key is missing.
A reply would be ignored anyway.
Miroslav Lichvar [Thu, 20 Mar 2014 17:23:55 +0000 (18:23 +0100)]
ntp: remove unnecessary KEY_KeyKnown calls
Miroslav Lichvar [Thu, 20 Mar 2014 17:12:46 +0000 (18:12 +0100)]
keys: don't cache position for unknown keys
Miroslav Lichvar [Thu, 20 Mar 2014 14:51:51 +0000 (15:51 +0100)]
client: print positive signed freq and offset values with sign
Miroslav Lichvar [Thu, 20 Mar 2014 15:17:15 +0000 (16:17 +0100)]
test: make 110-chronyc more tolerant
Miroslav Lichvar [Thu, 20 Mar 2014 12:47:08 +0000 (13:47 +0100)]
tempcomp: print warning message on error
Miroslav Lichvar [Wed, 19 Mar 2014 16:38:34 +0000 (17:38 +0100)]
tempcomp: use macro to set maximum allowed compensation
Miroslav Lichvar [Wed, 19 Mar 2014 16:08:52 +0000 (17:08 +0100)]
sourcestats: fix signedness in scanf format
Miroslav Lichvar [Wed, 19 Mar 2014 16:03:18 +0000 (17:03 +0100)]
makefile: improve check rule
Miroslav Lichvar [Thu, 27 Feb 2014 17:07:45 +0000 (18:07 +0100)]
Add simulation tests
Use clknetsim to run multiple chronyd instances with simulated clocks
and network. It allows fast and reproducible testing, without real
network.
Included are several tests of performance in different clock/network
conditions, chronyd options, NTP authentication, chronyc, and past bug
fixes.
Miroslav Lichvar [Wed, 5 Feb 2014 07:53:15 +0000 (08:53 +0100)]
configure: suppress pkg-config errors
Miroslav Lichvar [Tue, 4 Feb 2014 14:56:53 +0000 (15:56 +0100)]
Check array index before reading
Miroslav Lichvar [Fri, 31 Jan 2014 16:06:08 +0000 (17:06 +0100)]
Merge branch '1.29-security'
Miroslav Lichvar [Fri, 31 Jan 2014 12:36:34 +0000 (13:36 +0100)]
make_release: set owner and group in released tarball to root
Miroslav Lichvar [Fri, 31 Jan 2014 12:36:03 +0000 (13:36 +0100)]
make_release: remove config.log and config.h
Miroslav Lichvar [Fri, 31 Jan 2014 12:12:59 +0000 (13:12 +0100)]
Update NEWS
Miroslav Lichvar [Tue, 28 Jan 2014 12:28:11 +0000 (13:28 +0100)]
Update faq.txt
Miroslav Lichvar [Fri, 24 Jan 2014 15:06:38 +0000 (16:06 +0100)]
Send cmdmon error replies only to allowed hosts
The status codes STT_BADPKTVERSION, STT_BADPKTLENGTH, STT_NOHOSTACCESS
were sent even to hosts that were not allowed by cmdallow. Deprecate
STT_NOHOSTACCESS and ignore packets from hosts not allowed by cmdallow
completely.
Miroslav Lichvar [Fri, 24 Jan 2014 14:49:18 +0000 (15:49 +0100)]
Support previous protocol version in chronyc
This adds compatibility with chronyd using the previous protocol version
(chrony versions 1.27, 1.28, 1.29).
Miroslav Lichvar [Fri, 24 Jan 2014 12:55:15 +0000 (13:55 +0100)]
Add padding to cmdmon requests to prevent amplification attack
To prevent an attacker using chronyd in an amplification attack, change
the protocol to include padding in request packets so that the largest
possible reply is not larger than the request. Request packets that
don't include this padding are ignored as invalid.
This is an incompatible change in the protocol. Clients from chrony
1.27, 1.28 and 1.29 will receive NULL reply with STT_BADPKTVERSION and
print "Protocol version mismatch". Clients from 1.26 and older will not
receive a reply as it would be larger than the request if it was padded
to be compatible with their protocol.
Miroslav Lichvar [Thu, 23 Jan 2014 09:55:12 +0000 (10:55 +0100)]
Set maximum number of samples in manual list reply to 16
In chronyd the maximum number of manual samples is 16, so there is no
need to keep room for 32 samples in the command reply. This limits the
maximum assumed size of the reply packet.
Miroslav Lichvar [Tue, 21 Jan 2014 18:10:46 +0000 (19:10 +0100)]
Replace number and total fields in cmdmon reply packet with padding
They were not used for anything and there is no plan to change that.
Miroslav Lichvar [Tue, 21 Jan 2014 17:45:56 +0000 (18:45 +0100)]
Don't read uninitialized memory in client packet length check
Before calling PKL_ReplyLength() check that the packet has full header.
This didn't change the outcome of the test if the packet was shorter as
the invalid result from PKL_ReplyLength() was either larger than length
of the packet or smaller than header length, failing the length check in
both cases.
Miroslav Lichvar [Fri, 24 Jan 2014 15:37:26 +0000 (16:37 +0100)]
Remove superfluous code in read_from_cmd_socket()
Miroslav Lichvar [Tue, 21 Jan 2014 17:18:04 +0000 (18:18 +0100)]
Fix writing of drift and RTC files
Without sequence points the driftfile and RTC file could be closed
before new values were written.
Miroslav Lichvar [Tue, 21 Jan 2014 16:18:48 +0000 (17:18 +0100)]
Fix selecting of sources with prefer option
List of selectable sources that is used in combining was trimmed to
sources with prefer option, but scoring algorithm considered all
selectable sources. When a source without prefer was selected and
no source was combined, it caused assertion failure.
Miroslav Lichvar [Tue, 21 Jan 2014 15:38:00 +0000 (16:38 +0100)]
Remove superfluous code in SRC_SelectSource
Miroslav Lichvar [Tue, 21 Jan 2014 13:51:32 +0000 (14:51 +0100)]
Fix error message when chronyc can't open keyfile
Miroslav Lichvar [Fri, 17 Jan 2014 17:09:48 +0000 (18:09 +0100)]
Update comment on setting poll in reply packet
Miroslav Lichvar [Fri, 17 Jan 2014 16:37:07 +0000 (17:37 +0100)]
Don't allow maxpoll to be set shorter than minpoll
Miroslav Lichvar [Fri, 17 Jan 2014 16:27:48 +0000 (17:27 +0100)]
Convert linux kernel info messages to debug
Miroslav Lichvar [Fri, 10 Jan 2014 12:25:39 +0000 (13:25 +0100)]
Update linux_freq_scale and linux_hz documentation
Miroslav Lichvar [Fri, 10 Jan 2014 10:14:39 +0000 (11:14 +0100)]
Print error message on invalid syntax with all chronyc commands
Miroslav Lichvar [Thu, 9 Jan 2014 17:17:57 +0000 (18:17 +0100)]
Simplify expression used in frequency accumulation
Miroslav Lichvar [Thu, 9 Jan 2014 15:34:59 +0000 (16:34 +0100)]
Fix frequency accumulation again
This is a revert of commit
99d18abf updated for later changes. It seems
in that commit the calculation was changed to match the reversed dfreq
added in
1a7415a6 , which itself was calculated incorrectly. Fix the
calculation of updated frequency and matching dfreq.
Miroslav Lichvar [Thu, 9 Jan 2014 17:21:50 +0000 (18:21 +0100)]
Convert disabled log message in rtc_linux.c to DEBUG_LOG
Miroslav Lichvar [Thu, 12 Dec 2013 16:11:11 +0000 (17:11 +0100)]
Update documentation on trimrtc command
Miroslav Lichvar [Wed, 11 Dec 2013 16:59:14 +0000 (17:59 +0100)]
Improve description of refclock delay option
Miroslav Lichvar [Wed, 11 Dec 2013 10:25:00 +0000 (11:25 +0100)]
Fix default device in rtcdevice description
Miroslav Lichvar [Wed, 11 Dec 2013 10:20:58 +0000 (11:20 +0100)]
Add option to read RTC LOCAL/UTC setting from hwclock's adjtime file
Miroslav Lichvar [Tue, 10 Dec 2013 16:04:17 +0000 (17:04 +0100)]
Replace /sbin/clock with /sbin/hwclock in documentation and comments
Miroslav Lichvar [Tue, 10 Dec 2013 15:39:14 +0000 (16:39 +0100)]
Make naming of RTC config functions consistent
Miroslav Lichvar [Fri, 29 Nov 2013 16:34:15 +0000 (17:34 +0100)]
Fix ordering of sections in documentation
Miroslav Lichvar [Fri, 29 Nov 2013 15:55:21 +0000 (16:55 +0100)]
Make section descriptions consistent in documentation
Miroslav Lichvar [Thu, 28 Nov 2013 17:14:38 +0000 (18:14 +0100)]
Write fatal messages also to stderr when started with -n
Miroslav Lichvar [Thu, 28 Nov 2013 16:39:50 +0000 (17:39 +0100)]
Don't try to write to parent logging fd when closed
Miroslav Lichvar [Thu, 28 Nov 2013 16:33:20 +0000 (17:33 +0100)]
Merge config parsing functions for common data types
Miroslav Lichvar [Wed, 27 Nov 2013 16:33:03 +0000 (17:33 +0100)]
Add option to trim RTC automatically
Miroslav Lichvar [Wed, 27 Nov 2013 15:28:09 +0000 (16:28 +0100)]
Fix REF_GetOurStratum description
Miroslav Lichvar [Wed, 27 Nov 2013 15:11:19 +0000 (16:11 +0100)]
Remove forgotten macros
Miroslav Lichvar [Wed, 27 Nov 2013 14:43:17 +0000 (15:43 +0100)]
Use N_SAMPLES_PER_REGRESSION macro in rtc_linux module
Miroslav Lichvar [Tue, 26 Nov 2013 17:53:24 +0000 (18:53 +0100)]
Convert TRACEON LOG messages to DEBUG_LOG
Miroslav Lichvar [Tue, 26 Nov 2013 17:53:10 +0000 (18:53 +0100)]
Add support for debug messages
Add new DEBUG_LOG macro for debug messages. The messages are enabled
when compiled with --enable-debug and they are printed when the -d
option is used twice.
Miroslav Lichvar [Tue, 26 Nov 2013 15:30:25 +0000 (16:30 +0100)]
Fix log messages
Miroslav Lichvar [Tue, 26 Nov 2013 15:11:55 +0000 (16:11 +0100)]
Set printf format attribute for logging functions with gcc
Miroslav Lichvar [Tue, 26 Nov 2013 14:48:18 +0000 (15:48 +0100)]
Refactor logging
- merge LOG_Line_Function, LOG_Fatal_Function and LOG_Position
- use C99 variadic macros for LOG and LOG_FATAL
Miroslav Lichvar [Tue, 26 Nov 2013 12:32:03 +0000 (13:32 +0100)]
Update see also in man pages
Miroslav Lichvar [Tue, 26 Nov 2013 10:41:23 +0000 (11:41 +0100)]
Add refclock trace messages
Miroslav Lichvar [Tue, 26 Nov 2013 09:34:49 +0000 (10:34 +0100)]
Enable refclock error messages
Miroslav Lichvar [Mon, 25 Nov 2013 16:57:14 +0000 (17:57 +0100)]
Fix stratum with non-PPS SOCK refclock and local stratum
Miroslav Lichvar [Fri, 15 Nov 2013 12:22:16 +0000 (13:22 +0100)]
Append -lcap to EXTRA_LIBS in configure
Miroslav Lichvar [Fri, 15 Nov 2013 12:21:40 +0000 (13:21 +0100)]
Link with -lrt for clock_gettime() if needed
Miroslav Lichvar [Fri, 15 Nov 2013 09:08:20 +0000 (10:08 +0100)]
Fix compilation of PHC driver on systems without PTP_SYS_OFFSET
Miroslav Lichvar [Thu, 10 Oct 2013 14:37:40 +0000 (16:37 +0200)]
Add assert for parameter m in RGR_FindBestRegression()
Miroslav Lichvar [Mon, 7 Oct 2013 15:42:30 +0000 (17:42 +0200)]
Fix regression validity check in handle_relock_after_trim()
Miroslav Lichvar [Mon, 7 Oct 2013 15:17:48 +0000 (17:17 +0200)]
Fix id printed in duplicate key warning
Miroslav Lichvar [Mon, 7 Oct 2013 15:04:24 +0000 (17:04 +0200)]
Remove unused code in manual.c
Miroslav Lichvar [Mon, 7 Oct 2013 14:10:25 +0000 (16:10 +0200)]
Fix Clang static analyzer warnings about never read values
Paul Menzel [Thu, 3 Oct 2013 12:37:31 +0000 (14:37 +0200)]
rtc_linux.c: Remove useless assignment `error = -1;`
The Clang static analyzer scan-build from Debian clang version 3.4-1
found the following unneeded assignment.
rtc_linux.c:756:5: warning: Value stored to 'error' is never read
error = 1;
^ ~
Indeed, if in that if branch, the function returns without ever looking
at the variable `error`. So remove the line.
Miroslav Lichvar [Thu, 12 Sep 2013 12:22:32 +0000 (14:22 +0200)]
Add dependency on chrony.txt to install target
Miroslav Lichvar [Wed, 14 Aug 2013 16:48:30 +0000 (18:48 +0200)]
Add URLs to documentation for gpsd, radioclk and linuxpps