mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:25:07 -05:00
ntp: reset tentative flag only when sample was accumulated
When selecting sources from a pool, ignore responses which didn't produce a new sample. Sources with acceptable delay (as configured by the maxdelay* options) should be prefered.
This commit is contained in:
@@ -1519,7 +1519,7 @@ receive_packet(NTP_Packet *message, struct timeval *now, double now_err, NCR_Ins
|
|||||||
pkt_root_delay, pkt_root_dispersion);
|
pkt_root_delay, pkt_root_dispersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
return valid_packet;
|
return good_packet;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ================================================== */
|
/* ================================================== */
|
||||||
|
|||||||
@@ -792,7 +792,7 @@ NSR_ProcessReceive(NTP_Packet *message, struct timeval *now, double now_err, NTP
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (record->tentative) {
|
if (record->tentative) {
|
||||||
/* This was the first valid reply from the source */
|
/* This was the first good reply from the source */
|
||||||
record->tentative = 0;
|
record->tentative = 0;
|
||||||
|
|
||||||
if (record->pool != INVALID_POOL) {
|
if (record->pool != INVALID_POOL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user