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:
parent
cea21adbbb
commit
b0838280a9
2 changed files with 2 additions and 2 deletions
|
@ -1519,7 +1519,7 @@ receive_packet(NTP_Packet *message, struct timeval *now, double now_err, NCR_Ins
|
|||
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;
|
||||
|
||||
if (record->tentative) {
|
||||
/* This was the first valid reply from the source */
|
||||
/* This was the first good reply from the source */
|
||||
record->tentative = 0;
|
||||
|
||||
if (record->pool != INVALID_POOL) {
|
||||
|
|
Loading…
Reference in a new issue