[Nagiosplug-devel] check_icmp RTA calculation issue

matthias eble matthias.eble at mailing.kaufland-informationssysteme.com
Mon Jun 15 09:27:37 CEST 2009


Hi,

On Sun, 2009-06-14 at 13:41 +0200, Hiren Patel wrote:
> Zambelli, Patrick wrote:
> > I would like to report a behavior of check_icmp I discovered on an 
> > installation with ping and system time issues. The result of the 
> > execution of the Nagios check_icmp was containing strange rta
> values.
> > 
> > In most cases it is the max integer value minus something,
> indicating an 
> > integer value overflow.
> --- plugins-root/check_icmp.c	2009-06-12 09:43:54.000000000 +0200
> +++ /tmp/check_icmp.c	2009-06-14 13:37:34.000000000 +0200
> @@ -1035,7 +1035,7 @@
>  	if(!early) early = &prog_start;
>  
>  	/* if early > later we return 0 so as to indicate a timeout */
> -	if(early->tv_sec > early->tv_sec ||
> +	if(early->tv_sec > later->tv_sec ||
>  	   (early->tv_sec == later->tv_sec && early->tv_usec > later->tv_usec))
>  	{
>  		return 0;

I committed the change to git yesterday.
Thanks to both of you.
As a sidenote, fixing the clock issue would still be a good idea.

Matthias 





More information about the Devel mailing list