Bug 459309 - check_ntp fails if servers have non-alarm leap indicator
check_ntp fails if servers have non-alarm leap indicator
Product: Fedora
Classification: Fedora
Component: nagios-plugins (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mike McGrath
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-08-15 20:02 EDT by Martin Poole
Modified: 2008-10-03 18:35 EDT (History)
3 users (show)

See Also:
Fixed In Version: 1.4.12
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-09-28 23:35:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Martin Poole 2008-08-15 20:02:23 EDT
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):


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:
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 ){


  if ( LI(slist[cserver].flags) == LI_ALARM ){
Comment 1 Mike McGrath 2008-09-28 23:35:40 EDT
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 10:04:38 EDT
nagios-plugins-1.4.13-4.fc9 has been submitted as an update for Fedora 9.
Comment 3 Fedora Update System 2008-10-02 10:05:34 EDT
nagios-plugins-1.4.13-4.fc8 has been submitted as an update for Fedora 8.
Comment 4 Fedora Update System 2008-10-03 18:31:20 EDT
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 18:35:09 EDT
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.