From f93f2a15af130c23f1ae7a2d2c4ca1e8dcfa49d7 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 25 Mar 2015 17:21:26 +0100 Subject: [PATCH] ntp: check also reference timestamp in test3 Zero reference timestamp doesn't pass test7, but only before we reach the next NTP era. --- ntp_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ntp_core.c b/ntp_core.c index 6550f8c..c62aafc 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