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:
Miroslav Lichvar 2021-04-14 12:17:22 +02:00
parent aa22c515ce
commit 81f7f6ddf0

View file

@ -1766,6 +1766,7 @@ process_response(NCR_Instance inst, NTP_Local_Address *local_addr,
inst->tx_count = 0;
SRC_UpdateReachability(inst->source, synced_packet);
if (synced_packet)
SRC_UpdateStatus(inst->source, MAX(message->stratum, inst->min_stratum), pkt_leap);
if (good_packet) {