From 0b66867288b1eb9b9c7a2ffa5cf5e3fd473dc1e7 Mon Sep 17 00:00:00 2001 From: Thomas Guyot-Sionnest Date: Wed, 26 Sep 2007 04:16:21 +0000 Subject: Patch #1798774: check_ntp: honor ntp flags git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1799 f882894a-f735-0410-b71e-b25c423dba1c diff --git a/NEWS b/NEWS index ffff548..5d950ba 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,7 @@ This file documents the major additions and syntax changes between releases. Check_radius now supports radiusclient-ng Check_by_ssh now supports multiline output IPv6 support can now be disabled using ./configure --without-ipv6 + Fix check_ntp now honor ntp flags 1.4.9 4th June 2006 Inclusion of contrib/check_cluster2 as check_cluster with some improvements diff --git a/THANKS.in b/THANKS.in index f6fe941..cef2a77 100644 --- a/THANKS.in +++ b/THANKS.in @@ -225,3 +225,4 @@ Christoph Schell Andrew Elwell Heiti Ernits Sebastien Guay +MAtteo HCE Valsasna diff --git a/plugins/check_ntp.c b/plugins/check_ntp.c index 28c23d8..abd254c 100644 --- a/plugins/check_ntp.c +++ b/plugins/check_ntp.c @@ -86,6 +86,7 @@ typedef struct { double rtdelay; /* converted from the ntp_message */ double rtdisp; /* converted from the ntp_message */ double offset[AVG_NUM]; /* offsets from each response */ + uint8_t flags; /* byte with leapindicator,vers,mode. see macros */ } ntp_server_results; /* this structure holds everything in an ntp control message as per rfc1305 */ @@ -302,6 +303,12 @@ int best_offset_server(const ntp_server_results *slist, int nservers){ /* for each server */ for(cserver=0; cserver