]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
ntp: check also reference timestamp in test3
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 25 Mar 2015 16:21:26 +0000 (17:21 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 27 Mar 2015 09:37:54 +0000 (10:37 +0100)
Zero reference timestamp doesn't pass test7, but only before we reach
the next NTP era.

ntp_core.c

index 6550f8caa1240d3628a920717bce0af1a3cfdcdb..c62aafc7524f38e988f14a12f6f1d8349ba7fa99 100644 (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