mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 17:35:06 -05:00
sources: separate update of leap status
Remove leap status from the NTP sample and set it independently from the sample accumulation in order to accept a leap second sooner when samples are filtered.
This commit is contained in:
@@ -1682,7 +1682,6 @@ process_response(NCR_Instance inst, NTP_Local_Address *local_addr,
|
||||
sample.root_delay = pkt_root_delay + sample.peer_delay;
|
||||
sample.root_dispersion = pkt_root_dispersion + sample.peer_dispersion;
|
||||
sample.stratum = MAX(message->stratum, inst->min_stratum);
|
||||
sample.leap = (NTP_Leap)pkt_leap;
|
||||
|
||||
/* Update the NTP timestamps. If it's a valid packet from a synchronised
|
||||
source, the timestamps may be used later when processing a packet in the
|
||||
@@ -1772,6 +1771,7 @@ process_response(NCR_Instance inst, NTP_Local_Address *local_addr,
|
||||
inst->tx_count = 0;
|
||||
|
||||
SRC_UpdateReachability(inst->source, synced_packet);
|
||||
SRC_SetLeapStatus(inst->source, pkt_leap);
|
||||
|
||||
if (good_packet) {
|
||||
/* Adjust the polling interval, accumulate the sample, etc. */
|
||||
|
||||
Reference in New Issue
Block a user