]> git.ipfire.org Git - thirdparty/chrony.git/commit
refclock: require new samples to have newer timestamp
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 6 Oct 2016 13:21:43 +0000 (15:21 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Mon, 21 Nov 2016 11:02:51 +0000 (12:02 +0100)
commit0a848e2528aaef0b3347de0b49ce50da8dc1c9a4
treea1f13c06606a19e2b9669d24ad42f642dc292017
parentb443ec5ea585ecc6e9b1c644d8e32400e96f7eba
refclock: require new samples to have newer timestamp

If all or most SHM/SOCK samples collected in a polling interval had the
same local timestamp, the dispersion could end up as nan, which could
trigger an assert failure later in the code.

Before accumulating a refclock sample, check if the timestamp is newer
than the previous one.
refclock.c