mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-06 02:15:08 -05:00
sources: update stratum with leap status
Remove stratum from the NTP sample and update it together with the leap status. This enables a faster update when samples are dropped by the NTP filters.
This commit is contained in:
@@ -1678,7 +1678,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);
|
||||
|
||||
/* 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
|
||||
@@ -1768,7 +1767,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);
|
||||
SRC_UpdateStatus(inst->source, MAX(message->stratum, inst->min_stratum), pkt_leap);
|
||||
|
||||
if (good_packet) {
|
||||
/* Adjust the polling interval, accumulate the sample, etc. */
|
||||
|
||||
Reference in New Issue
Block a user