]> git.ipfire.org Git - thirdparty/chrony.git/log
thirdparty/chrony.git
12 years agoCleanup including of system headers
Miroslav Lichvar [Fri, 14 Jun 2013 11:30:54 +0000 (13:30 +0200)] 
Cleanup including of system headers

12 years agoDon't abort on EINTR select errors
Miroslav Lichvar [Fri, 14 Jun 2013 10:37:24 +0000 (12:37 +0200)] 
Don't abort on EINTR select errors

12 years agoReplace LOG_FATAL call with assert in SCH_MailLoop
Miroslav Lichvar [Fri, 14 Jun 2013 10:34:52 +0000 (12:34 +0200)] 
Replace LOG_FATAL call with assert in SCH_MailLoop

12 years agoDon't apply outlyer penalty at beginning
Miroslav Lichvar [Thu, 13 Jun 2013 16:19:17 +0000 (18:19 +0200)] 
Don't apply outlyer penalty at beginning

Wait until the reach register is full to allow marking a source as
outlyer for 32 updates. This makes start nicer with iburst.

12 years agoAdd minsamples and maxsamples directives
Miroslav Lichvar [Thu, 13 Jun 2013 14:23:32 +0000 (16:23 +0200)] 
Add minsamples and maxsamples directives

Allow configuration of the maximum and minimum number of samples per
source.

12 years agoModify SST_GetSelectionData to return only necessary data
Miroslav Lichvar [Wed, 12 Jun 2013 14:06:33 +0000 (16:06 +0200)] 
Modify SST_GetSelectionData to return only necessary data

12 years agoUse UTI_DiffTimevalsToDouble to calculate theta
Miroslav Lichvar [Wed, 12 Jun 2013 13:11:33 +0000 (15:11 +0200)] 
Use UTI_DiffTimevalsToDouble to calculate theta

12 years agoFix fabs use on delay
Miroslav Lichvar [Wed, 12 Jun 2013 13:10:54 +0000 (15:10 +0200)] 
Fix fabs use on delay

12 years agoLimit sources included in combining
Miroslav Lichvar [Mon, 10 Jun 2013 16:37:08 +0000 (18:37 +0200)] 
Limit sources included in combining

Combine only sources whose distance is shorter than distance of the
selected source multiplied by the value of combinelimit and their
estimated frequencies are close to the frequency of the selected source.
Add outlyer status for sources which are selectable, but not included in
the combining. The status is displayed as '-' in the chronyc sources
output.

12 years agoResurrect source combining
Miroslav Lichvar [Wed, 29 Jun 2011 16:45:31 +0000 (18:45 +0200)] 
Resurrect source combining

This is based on the code that was removed in CVS revision 1.3 of
sources.c. The weighting is simplified and the code is moved to a new
function.

12 years agoRemove unnecessary adjtimex calls
Miroslav Lichvar [Thu, 6 Jun 2013 17:38:36 +0000 (19:38 +0200)] 
Remove unnecessary adjtimex calls

12 years agoFix rounding in UTI_AddDoubleToTimeval with negative increments
Miroslav Lichvar [Thu, 6 Jun 2013 14:30:37 +0000 (16:30 +0200)] 
Fix rounding in UTI_AddDoubleToTimeval with negative increments

12 years agoAdjust last_select_ts on slew
Miroslav Lichvar [Thu, 6 Jun 2013 14:28:33 +0000 (16:28 +0200)] 
Adjust last_select_ts on slew

12 years agoRename SCH_GetFileReadyTime() and extend it to return raw time
Miroslav Lichvar [Wed, 5 Jun 2013 15:52:13 +0000 (17:52 +0200)] 
Rename SCH_GetFileReadyTime() and extend it to return raw time

12 years agoDrop duplicated int64_to_timeval()
Miroslav Lichvar [Wed, 5 Jun 2013 11:11:53 +0000 (13:11 +0200)] 
Drop duplicated int64_to_timeval()

12 years agoFix UTI_DoubleToInt32 to check for overflow
Miroslav Lichvar [Wed, 5 Jun 2013 11:05:54 +0000 (13:05 +0200)] 
Fix UTI_DoubleToInt32 to check for overflow

12 years agoMove NTP_int32 conversion functions to util.c
Miroslav Lichvar [Wed, 5 Jun 2013 10:49:12 +0000 (12:49 +0200)] 
Move NTP_int32 conversion functions to util.c

12 years agoAdd --enable-trace to configure
Miroslav Lichvar [Wed, 5 Jun 2013 10:18:46 +0000 (12:18 +0200)] 
Add --enable-trace to configure

12 years agoFix configure help message
Miroslav Lichvar [Wed, 5 Jun 2013 09:58:13 +0000 (11:58 +0200)] 
Fix configure help message

12 years agoAbort on parse errors in refclock directive
Miroslav Lichvar [Wed, 5 Jun 2013 09:48:48 +0000 (11:48 +0200)] 
Abort on parse errors in refclock directive

12 years agoFix burst command with specified address
Miroslav Lichvar [Wed, 5 Jun 2013 08:17:13 +0000 (10:17 +0200)] 
Fix burst command with specified address

This was broken in commit 0f8def4ca4237495f13a93384ded9245495e3c8f.

12 years agoAllow hostnames in offline, online and burst commands
Miroslav Lichvar [Wed, 5 Jun 2013 08:00:36 +0000 (10:00 +0200)] 
Allow hostnames in offline, online and burst commands

12 years agoDon't use uninitialized value in receive_packet()
Miroslav Lichvar [Wed, 5 Jun 2013 07:56:37 +0000 (09:56 +0200)] 
Don't use uninitialized value in receive_packet()

12 years agoFix stratum setting when source with non-minimum stratum is selected
Miroslav Lichvar [Wed, 5 Jun 2013 07:55:00 +0000 (09:55 +0200)] 
Fix stratum setting when source with non-minimum stratum is selected

12 years agoImprove peer polling in symmetric mode
Miroslav Lichvar [Tue, 4 Jun 2013 17:20:37 +0000 (19:20 +0200)] 
Improve peer polling in symmetric mode

If the remote stratum is higher than ours, try to lock on the peer's
polling to minimize our response time by slightly extending our delay or
waiting for the peer to catch up with us as the random part in the
actual interval is reduced. If the remote stratum is equal to ours, try
to interleave evenly with the peer.

12 years agoSave remote poll only with valid packets
Miroslav Lichvar [Tue, 4 Jun 2013 13:35:22 +0000 (15:35 +0200)] 
Save remote poll only with valid packets

12 years agoFix peer polling with shorter remote poll
Miroslav Lichvar [Tue, 4 Jun 2013 10:39:17 +0000 (12:39 +0200)] 
Fix peer polling with shorter remote poll

If the remote peer uses a polling interval shorter than the local
minimum, the local peer will be unable to send any packets as the
timeout will be updated on every received valid packet and will never
expire.

Modify the delay calculation to aim at poll interval away since the last
transmit.

Also, share the delay calculation code with transmit_timeout().

12 years agoRequeue transmit timeout only with valid packets
Miroslav Lichvar [Tue, 4 Jun 2013 10:08:58 +0000 (12:08 +0200)] 
Requeue transmit timeout only with valid packets

12 years agoIgnore packets from offline sources
Miroslav Lichvar [Mon, 3 Jun 2013 14:37:58 +0000 (16:37 +0200)] 
Ignore packets from offline sources

Rework the logic in transmit_timeout() to change the online status on
the following timeout to allow ignoring packets from offline sources.

12 years agoSet stratum from last sample instead of best
Miroslav Lichvar [Mon, 3 Jun 2013 14:00:19 +0000 (16:00 +0200)] 
Set stratum from last sample instead of best

12 years agoDrop unused SST_GetReferenceData()
Miroslav Lichvar [Mon, 3 Jun 2013 13:49:01 +0000 (15:49 +0200)] 
Drop unused SST_GetReferenceData()

12 years agoMake receive_packet() more readable
Miroslav Lichvar [Mon, 3 Jun 2013 12:27:09 +0000 (14:27 +0200)] 
Make receive_packet() more readable

12 years agoIn burst count only accumulated samples as good
Miroslav Lichvar [Mon, 3 Jun 2013 11:05:26 +0000 (13:05 +0200)] 
In burst count only accumulated samples as good

12 years agoSlew only non-zero local timestamps in ntp core
Miroslav Lichvar [Mon, 3 Jun 2013 09:34:15 +0000 (11:34 +0200)] 
Slew only non-zero local timestamps in ntp core

12 years agoFix poll timeout with symmetric peer and poll 0
Miroslav Lichvar [Mon, 3 Jun 2013 09:13:45 +0000 (11:13 +0200)] 
Fix poll timeout with symmetric peer and poll 0

12 years agoRemove unncessary return statements
Miroslav Lichvar [Tue, 21 May 2013 12:29:22 +0000 (14:29 +0200)] 
Remove unncessary return statements

12 years agoAdd recommendation on password security to keyfile description
Miroslav Lichvar [Tue, 21 May 2013 12:02:45 +0000 (14:02 +0200)] 
Add recommendation on password security to keyfile description

12 years agoAdd option to generate command key on start
Miroslav Lichvar [Tue, 21 May 2013 11:58:52 +0000 (13:58 +0200)] 
Add option to generate command key on start

With generatecommandkey directive, if no command key is found in the key
file on start, one will be generated automatically from /dev/urandom.

12 years agoFix some error messages
Miroslav Lichvar [Mon, 20 May 2013 16:21:30 +0000 (18:21 +0200)] 
Fix some error messages

12 years agoCreate sockets only in selected family with -4 or -6 option
Miroslav Lichvar [Mon, 20 May 2013 13:34:33 +0000 (15:34 +0200)] 
Create sockets only in selected family with -4 or -6 option

12 years agoSet paths in documentation by configure
Miroslav Lichvar [Thu, 16 May 2013 10:28:37 +0000 (12:28 +0200)] 
Set paths in documentation by configure

12 years agoDocument default value of commandkey
Miroslav Lichvar [Thu, 16 May 2013 09:02:24 +0000 (11:02 +0200)] 
Document default value of commandkey

12 years agoAdd option to authenticate automatically on chronyc start
Miroslav Lichvar [Wed, 15 May 2013 17:25:15 +0000 (19:25 +0200)] 
Add option to authenticate automatically on chronyc start

12 years agoRefactor key parsing
Miroslav Lichvar [Wed, 15 May 2013 14:38:01 +0000 (16:38 +0200)] 
Refactor key parsing

12 years agoTry linking readline without ncurses first
Miroslav Lichvar [Wed, 15 May 2013 09:50:58 +0000 (11:50 +0200)] 
Try linking readline without ncurses first

12 years agoVarious spelling fixes
Joachim Wiedorn [Thu, 8 Nov 2012 02:00:00 +0000 (00:00 -0200)] 
Various spelling fixes

Reviewed-By: Rogério Theodoro de Brito <rbrito@ime.usp.br>
12 years agoRefactor command parsing
Miroslav Lichvar [Thu, 9 May 2013 15:29:37 +0000 (17:29 +0200)] 
Refactor command parsing

- normalize command line before parsing
- compare whole words
- check for missing/extra arguments in config parsing
- use strdup for string allocation
- share code for reporting syntax errors
- avoid using function pointers
- cleanup the code a bit

12 years agoAbort on errors when parsing config
Miroslav Lichvar [Thu, 9 May 2013 14:56:08 +0000 (16:56 +0200)] 
Abort on errors when parsing config

12 years agoLog online/offline status change for burst sources too.
Miroslav Lichvar [Wed, 15 May 2013 08:36:52 +0000 (10:36 +0200)] 
Log online/offline status change for burst sources too.

12 years agoDon't send uninitialized fields in dump and local requests
Miroslav Lichvar [Tue, 14 May 2013 17:36:10 +0000 (19:36 +0200)] 
Don't send uninitialized fields in dump and local requests

12 years agoAccept float value as initstepslew threshold
Miroslav Lichvar [Thu, 9 May 2013 17:15:25 +0000 (19:15 +0200)] 
Accept float value as initstepslew threshold

12 years agoUpdate .gitignore
Miroslav Lichvar [Thu, 9 May 2013 16:43:19 +0000 (18:43 +0200)] 
Update .gitignore

12 years agoTerminate batch processing in chronyc on quit command
Miroslav Lichvar [Tue, 7 May 2013 14:59:56 +0000 (16:59 +0200)] 
Terminate batch processing in chronyc on quit command

12 years agoDefine DEFAULT_CONF_FILE in config.h
Miroslav Lichvar [Tue, 7 May 2013 14:35:40 +0000 (16:35 +0200)] 
Define DEFAULT_CONF_FILE in config.h

12 years agoReply to NTPv1 and NTPv2 packets with same version
Miroslav Lichvar [Thu, 2 May 2013 09:10:48 +0000 (11:10 +0200)] 
Reply to NTPv1 and NTPv2 packets with same version

12 years agoReply to NTPv1 packets
Miroslav Lichvar [Thu, 2 May 2013 09:10:25 +0000 (11:10 +0200)] 
Reply to NTPv1 packets

12 years agoAdd user directive for dropping root privileges
Miroslav Lichvar [Fri, 26 Apr 2013 15:35:58 +0000 (17:35 +0200)] 
Add user directive for dropping root privileges

This is equivalent to the -u option.

12 years agoAdd option to ignore initstepslew and makestep directives
Miroslav Lichvar [Fri, 26 Apr 2013 14:27:15 +0000 (16:27 +0200)] 
Add option to ignore initstepslew and makestep directives

When chronyd is started with -R, the initstepslew directive and the
makestep directive with a positive limit will be ignored. This is useful
when restarting chronyd to avoid unnecessary clock adjustments. It can
be used with -r.

12 years agoFix crash with duplicated initstepslew address
victor lum [Fri, 26 Apr 2013 12:36:17 +0000 (14:36 +0200)] 
Fix crash with duplicated initstepslew address

When there are duplicate ntp servers listed on the initstepslew line, 2
SourceRecords are created (sourceA and sourceB), and two timers are
created (timerA and timerB).  When ntp responses are received, only
sourceA is updated because of the way read_from_socket searches for a
matching record.  Eventually, the criteria for sourceA are met, causing
timerA to stop and n_completed_sources to increment.  timerB continues
to trigger, sending ntp poll messages to the ntp server.  Responses from
that server are assigned to sourceA, triggering the criteria for sourceA
and causing n_completed_sources to increment improperly.  Once this
happens enough times, n_complete_sources == number of servers and all
SourceRecords are deleted.  The next time timerB triggers, it attempts
to access sourceB, which was already been deleted, causing the core.

12 years agoFix crash in config parsing with too many servers
Miroslav Lichvar [Fri, 26 Apr 2013 12:17:21 +0000 (14:17 +0200)] 
Fix crash in config parsing with too many servers

12 years agoUpdate URL of NTP server list in example config
Miroslav Lichvar [Fri, 8 Mar 2013 13:04:38 +0000 (14:04 +0100)] 
Update URL of NTP server list in example config

12 years agoFix delta calculation with extreme frequency offsets
Miroslav Lichvar [Fri, 8 Mar 2013 12:54:10 +0000 (13:54 +0100)] 
Fix delta calculation with extreme frequency offsets

This should prevent chronyd from getting stuck and refusing new samples
due to failing test4 when the current measured frequency offset is close
to 1.0. That can happen when the system clock is stepped forward behind
chronyd's back.

12 years agoUse texi2html to generate html
Miroslav Lichvar [Fri, 1 Feb 2013 17:40:50 +0000 (18:40 +0100)] 
Use texi2html to generate html

12 years agoUpdate NEWS 1.27
Miroslav Lichvar [Fri, 1 Feb 2013 14:47:43 +0000 (15:47 +0100)] 
Update NEWS

12 years agoPrint error message when MD5 init fails in chronyc
Miroslav Lichvar [Thu, 24 Jan 2013 17:52:36 +0000 (18:52 +0100)] 
Print error message when MD5 init fails in chronyc

12 years agoReplace printf calls with echo in configure
Miroslav Lichvar [Thu, 24 Jan 2013 17:56:26 +0000 (18:56 +0100)] 
Replace printf calls with echo in configure

12 years agoSave compiler messages to config.log in configure
Miroslav Lichvar [Thu, 24 Jan 2013 16:31:40 +0000 (17:31 +0100)] 
Save compiler messages to config.log in configure

12 years agoFix crash and hangs in RGR_FindBestRobustRegression
Miroslav Lichvar [Thu, 29 Nov 2012 15:23:22 +0000 (16:23 +0100)] 
Fix crash and hangs in RGR_FindBestRobustRegression

12 years agoCheck for errors when writing new drift files
Miroslav Lichvar [Mon, 10 Sep 2012 14:44:19 +0000 (16:44 +0200)] 
Check for errors when writing new drift files

12 years agoAdd format string to printf in client.c
Miroslav Lichvar [Mon, 10 Sep 2012 12:18:16 +0000 (14:18 +0200)] 
Add format string to printf in client.c

12 years agoAdd support for nanoseconds in SHM
Miroslav Lichvar [Thu, 6 Sep 2012 17:00:32 +0000 (19:00 +0200)] 
Add support for nanoseconds in SHM

13 years agoFuzz transmit timestamp
Miroslav Lichvar [Tue, 22 May 2012 15:16:41 +0000 (17:16 +0200)] 
Fuzz transmit timestamp

Add random bits below clock precision to the timestamp to make
it less predictable.

13 years agoLog uncooked offset in refclocks log for PPS samples
Miroslav Lichvar [Tue, 13 Mar 2012 12:15:26 +0000 (13:15 +0100)] 
Log uncooked offset in refclocks log for PPS samples

13 years agoUpdate NEWS 1.27-pre1
Miroslav Lichvar [Mon, 27 Feb 2012 14:07:01 +0000 (15:07 +0100)] 
Update NEWS

13 years agoUpdate copyright years
Miroslav Lichvar [Fri, 24 Feb 2012 16:20:33 +0000 (17:20 +0100)] 
Update copyright years

13 years agoFix password handling in chronyc
Miroslav Lichvar [Tue, 28 Feb 2012 10:26:37 +0000 (11:26 +0100)] 
Fix password handling in chronyc

13 years agoFix compiler warnings
Miroslav Lichvar [Mon, 27 Feb 2012 15:08:14 +0000 (16:08 +0100)] 
Fix compiler warnings

13 years agoUpdate configure help text
Miroslav Lichvar [Mon, 27 Feb 2012 14:45:00 +0000 (15:45 +0100)] 
Update configure help text

13 years agoTest leap second timezone on start
Miroslav Lichvar [Mon, 27 Feb 2012 12:27:32 +0000 (13:27 +0100)] 
Test leap second timezone on start

13 years agoUpdate documentation
Miroslav Lichvar [Mon, 27 Feb 2012 12:26:37 +0000 (13:26 +0100)] 
Update documentation

13 years agoReschedule fast slew timeout on offset change
Miroslav Lichvar [Fri, 24 Feb 2012 15:26:53 +0000 (16:26 +0100)] 
Reschedule fast slew timeout on offset change

13 years agoAdd leap status to tracking log and report
Miroslav Lichvar [Fri, 24 Feb 2012 09:54:37 +0000 (10:54 +0100)] 
Add leap status to tracking log and report

13 years agoAdd support for reading leap second data from tz database
Miroslav Lichvar [Thu, 23 Feb 2012 17:48:24 +0000 (18:48 +0100)] 
Add support for reading leap second data from tz database

leapsectz directive is used to set the name of the timezone in the
system tz database which chronyd can use to find out when will the next
leap second occur.  It will periodically check if dates Jun 30 23:59:60
and Dec 31 23:59:60 are valid in that timezone. This is mainly useful
with reference clocks which don't provide the leap second information.
It is not necessary to restart chronyd if the tz database is updated
with a new leap second at least 12 hours before the event.

13 years agoAdd maxchange directive
Miroslav Lichvar [Tue, 21 Feb 2012 13:34:09 +0000 (14:34 +0100)] 
Add maxchange directive

This directive sets the maximum allowed offset corrected on a clock
update.  The check is performed only after the specified number of
updates to allow a large initial adjustment of the system clock.  When
an offset larger than the specified maximum occurs, it will be ignored
for the specified number of times and then chronyd will give up
and exit (a negative value can be used to never exit).  In both cases
a message is sent to syslog.

13 years agoMove refclock slew and dispersion handler init
Miroslav Lichvar [Tue, 14 Feb 2012 17:13:15 +0000 (18:13 +0100)] 
Move refclock slew and dispersion handler init

13 years agoStep system time in RTC preinit only with offsets over 1 second
Miroslav Lichvar [Tue, 14 Feb 2012 16:49:55 +0000 (17:49 +0100)] 
Step system time in RTC preinit only with offsets over 1 second

13 years agoFix last commit
Miroslav Lichvar [Tue, 14 Feb 2012 13:47:57 +0000 (14:47 +0100)] 
Fix last commit

13 years agoBetter estimate RTC offset right after trim
Miroslav Lichvar [Mon, 13 Feb 2012 15:54:18 +0000 (16:54 +0100)] 
Better estimate RTC offset right after trim

13 years agoReturn success on empty command
Miroslav Lichvar [Fri, 10 Feb 2012 17:30:11 +0000 (18:30 +0100)] 
Return success on empty command

13 years agoSupport passwords encoded in HEX
Miroslav Lichvar [Thu, 9 Feb 2012 15:44:43 +0000 (16:44 +0100)] 
Support passwords encoded in HEX

13 years agoUpdate reported RMS offset quickly on start
Miroslav Lichvar [Wed, 8 Feb 2012 13:24:42 +0000 (14:24 +0100)] 
Update reported RMS offset quickly on start

13 years agoExtend tracking, sources and activity reports
Miroslav Lichvar [Fri, 3 Feb 2012 13:57:25 +0000 (14:57 +0100)] 
Extend tracking, sources and activity reports

13 years agoUse +/- when logging skew on start
Miroslav Lichvar [Fri, 3 Feb 2012 14:45:24 +0000 (15:45 +0100)] 
Use +/- when logging skew on start

13 years agoFix logged offset in manual reference
Miroslav Lichvar [Fri, 3 Feb 2012 13:58:24 +0000 (14:58 +0100)] 
Fix logged offset in manual reference

13 years agoCheck if struct in6_pktinfo is usable
Miroslav Lichvar [Thu, 5 Jan 2012 14:11:54 +0000 (15:11 +0100)] 
Check if struct in6_pktinfo is usable

13 years agoFix reported number of runs to correspond to reported number of samples
Miroslav Lichvar [Fri, 25 Nov 2011 14:49:35 +0000 (15:49 +0100)] 
Fix reported number of runs to correspond to reported number of samples

13 years agoAdd corrtimeratio directive
Miroslav Lichvar [Tue, 15 Nov 2011 11:24:50 +0000 (12:24 +0100)] 
Add corrtimeratio directive

The corrtimeratio directive controls the ratio between the
duration in which the clock is slewed for an average correction
according to the source history and the interval in which the
corrections are done (usually the NTP polling interval).  Corrections
larger than the average take less time and smaller corrections take
more time, the amount of the correction and the correction time are
inversely proportional.

Increasing corrtimeratio makes the overall frequency error of
the system clock smaller, but increases the overall time error as
the corrections will take longer.

By default, the ratio is 1, which means the duration of an average
correction will be close to the update interval.

13 years agoControl offset correction rate in Linux driver
Miroslav Lichvar [Tue, 13 Sep 2011 12:53:46 +0000 (14:53 +0200)] 
Control offset correction rate in Linux driver

The kernel currently doesn't support a linear adjustment with
programmable rate, extend the use of the kernel PLL with locked
frequency instead.

Set the PLL time constant according to the correction time corresponding
to the correction rate and corrected offset.

On kernels with nano PLL adjtime() is no longer used.

13 years agoIntroduce offset correction rate
Miroslav Lichvar [Mon, 5 Sep 2011 13:45:32 +0000 (15:45 +0200)] 
Introduce offset correction rate

We want to correct the offset quickly, but we also want to keep the
frequency error caused by the correction itself low.

Define correction rate as the area of the region bounded by the graph of
offset corrected in time. Set the rate so that the time needed to correct
an offset equal to the current sourcestats stddev will be equal to the
update interval (assuming linear adjustment). The offset and the
time needed to make the correction are inversely proportional.

This is only a suggestion and it's up to the system driver how the
adjustment will be executed.

13 years agoInclude clock steps in calculated reference update interval
Miroslav Lichvar [Fri, 11 Nov 2011 17:40:01 +0000 (18:40 +0100)] 
Include clock steps in calculated reference update interval