Don't set NTP source as reachable when reply doesn't have valid data

This fixes using uninitialized sourcestats values when selecting source.
This commit is contained in:
Miroslav Lichvar 2009-11-12 12:40:45 +01:00
parent 707b623ea8
commit e88af337cd

View file

@ -1071,7 +1071,7 @@ receive_packet(NTP_Packet *message, struct timeval *now, NCR_Instance inst, int
LOG(LOGS_INFO, LOGF_NtpCore, "kod_rate=%d valid_kod=%d", kod_rate, valid_kod);
#endif
if (valid_header) {
if (valid_header && valid_data) {
inst->tx_count = 0;
SRC_SetReachable(inst->source);
}