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:
Miroslav Lichvar 2016-08-03 12:13:22 +02:00
parent cea21adbbb
commit b0838280a9
2 changed files with 2 additions and 2 deletions

View file

@ -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;
} }
/* ================================================== */ /* ================================================== */

View file

@ -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) {