Re: [chrony-users] Understanding Chrony SOCK time sample "not valid age"

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


On Wed, Sep 01, 2021 at 03:06:16PM -0400, Chris McKenzie wrote:
> What this suggests is a time sample containing a time *ahead* of the
> receiving chrony server time will be rejected.
> 
> I must be misunderstanding the situation or what time samples are
> completely. It makes no sense to me that a time sample sent to a chrony
> service that is 4 seconds ahead would reject the time, since its job is to
> sync time with/from a source (ahead or behind).

The sample time is the local system time when the sample was made. If
it is ahead of the current system time, it's clearly invalid. It
cannot be from the future from the system clock's point of view.

In terms of a C code, the sample time should be filled by
gettimeofday() when the reference time is received. The offset is the
difference between the sample time and the reference time. That would
be those 4 seconds in your test.

-- 
Miroslav Lichvar


-- 
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/