ntpstat-0.2-multipacket.patch 736 B

12345678910111213
  1. diff -up ntp-4.2.4p7/ntpstat-0.2/ntpstat.c.ntpstat ntp-4.2.4p7/ntpstat-0.2/ntpstat.c
  2. --- ntpstat-0.2/ntpstat.c.ntpstat 2002-06-10 08:02:12.000000000 +0200
  3. +++ ntpstat-0.2/ntpstat.c 2009-07-20 12:22:35.000000000 +0200
  4. @@ -151,7 +151,7 @@ int main (void) {
  5. /* For the reply message to be valid, the first byte should be as sent,
  6. and the second byte should be the same, with the response bit set */
  7. byte1ok = ((ntpmsg.byte1&0x3F) == B1VAL);
  8. - byte2ok = (ntpmsg.byte2 == (B2VAL|RMASK));
  9. + byte2ok = ((ntpmsg.byte2 & ~MMASK) == (B2VAL|RMASK));
  10. if (!(byte1ok && byte2ok)) {
  11. fprintf (stderr,"status word is 0x%02x%02x\n", ntpmsg.byte1,ntpmsg.byte2 );
  12. die ("return data appears to be invalid based on status word");