mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 11:45:07 -05:00
ntp: don't update source status with unsynchronized data
Don't update the leap and stratum used in source selection if they
indicate an unsynchronized source.
Fixes: 2582be8754 ("sources: separate update of leap status")
This commit is contained in:
@@ -1766,7 +1766,8 @@ process_response(NCR_Instance inst, NTP_Local_Address *local_addr,
|
|||||||
inst->tx_count = 0;
|
inst->tx_count = 0;
|
||||||
|
|
||||||
SRC_UpdateReachability(inst->source, synced_packet);
|
SRC_UpdateReachability(inst->source, synced_packet);
|
||||||
SRC_UpdateStatus(inst->source, MAX(message->stratum, inst->min_stratum), pkt_leap);
|
if (synced_packet)
|
||||||
|
SRC_UpdateStatus(inst->source, MAX(message->stratum, inst->min_stratum), pkt_leap);
|
||||||
|
|
||||||
if (good_packet) {
|
if (good_packet) {
|
||||||
/* Adjust the polling interval, accumulate the sample, etc. */
|
/* Adjust the polling interval, accumulate the sample, etc. */
|
||||||
|
|||||||
Reference in New Issue
Block a user