From: Miroslav Lichvar Date: Wed, 25 Mar 2015 16:21:26 +0000 (+0100) Subject: ntp: check also reference timestamp in test3 X-Git-Tag: 2.0-pre2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f93f2a15af130c23f1ae7a2d2c4ca1e8dcfa49d7;p=thirdparty%2Fchrony.git ntp: check also reference timestamp in test3 Zero reference timestamp doesn't pass test7, but only before we reach the next NTP era. --- diff --git a/ntp_core.c b/ntp_core.c index 6550f8ca..c62aafc7 100644 --- a/ntp_core.c +++ b/ntp_core.c @@ -1151,6 +1151,7 @@ receive_packet(NTP_Packet *message, struct timeval *now, double now_err, NCR_Ins association if not properly 'up'. */ test3 = (message->originate_ts.hi || message->originate_ts.lo) && (message->receive_ts.hi || message->receive_ts.lo) && + (message->reference_ts.hi || message->reference_ts.lo) && (message->transmit_ts.hi || message->transmit_ts.lo); /* Test 4 would check for denied access. It would always pass as this