Bug 459309 - check_ntp fails if servers have non-alarm leap indicator
Summary: check_ntp fails if servers have non-alarm leap indicator
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: nagios-plugins
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mike McGrath
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-08-16 00:02 UTC by Martin Poole
Modified: 2008-10-03 22:35 UTC (History)
3 users (show)

Fixed In Version: 1.4.12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-09-29 03:35:40 UTC
Type: ---


Attachments (Terms of Use)

Description Martin Poole 2008-08-16 00:02:23 UTC
Description of problem:

ntp servers that have either the LI_EXTRASEC or LI_MISSINGSEC value for the leap indicator are incorrectly treated as offset unknown,

Version-Release number of selected component (if applicable):

nagios-plugins-ntp-1.4.11-4.fc9.i386.rpm

How reproducible:

requires a server with one of the mentioned leap indicators. will show in a -vv output as the li= value like

sending request to peer 0
response from peer 0: packet contents:
        flags: 0x64
          li=1 (0x40)
          vn=4 (0x20)
          mode=4 (0x04)
        stratum = 3
        poll = 16
        precision = 7.62939e-06
        rtdelay = 0.0128936767578125
        rtdisp = 0.041259765625
        refid = d6b92d9
        refts = 1218843191.598644
        origts = 1218843213.636477
        rxts = 1218843213.637985
        txts = 1218843213.638051
offset 0.001145395159


Steps to Reproduce:
1.
2.
3.
  
Actual results:

NTP OK: Offset unknown|

Expected results:

NTP OK: Offset 0.001268528635 secs|offset=0.001269s;60.000000;120.000000;

Additional info:

flags used ...

/* bits 1,2 are the leap indicator */
#define LI_MASK 0xc0
#define LI(x) ((x&LI_MASK)>>6)
#define LI_SET(x,y) do{ x |= ((y<<6)&LI_MASK); }while(0)
/* and these are the values of the leap indicator */
#define LI_NOWARNING 0x00
#define LI_EXTRASEC 0x01
#define LI_MISSINGSEC 0x02
#define LI_ALARM 0x03

This appear to have been fixed in 1.4.12 upstream where the leap indicator test has been updated from


  if ( LI(slist[cserver].flags) != LI_NOWARNING ){

to

  if ( LI(slist[cserver].flags) == LI_ALARM ){

Comment 1 Mike McGrath 2008-09-29 03:35:40 UTC
I'll be pushing 1.4.13 out everywhere tonight, this was fixed in 1.4.12.

Comment 2 Fedora Update System 2008-10-02 14:04:38 UTC
nagios-plugins-1.4.13-4.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/nagios-plugins-1.4.13-4.fc9

Comment 3 Fedora Update System 2008-10-02 14:05:34 UTC
nagios-plugins-1.4.13-4.fc8 has been submitted as an update for Fedora 8.
http://admin.fedoraproject.org/updates/nagios-plugins-1.4.13-4.fc8

Comment 4 Fedora Update System 2008-10-03 22:31:20 UTC
nagios-plugins-1.4.13-4.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2008-10-03 22:35:09 UTC
nagios-plugins-1.4.13-4.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.