ntp: check also reference timestamp in test3

Zero reference timestamp doesn't pass test7, but only before we reach
the next NTP era.
This commit is contained in:
Miroslav Lichvar 2015-03-25 17:21:26 +01:00
parent 47839b7701
commit f93f2a15af

View file

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