[Nagiosplug-devel] check_icmp RTA calculation issue
Hiren Patel
hir3npatel at gmail.com
Sun Jun 14 13:41:30 CEST 2009
Zambelli, Patrick wrote:
> Hello,
>
>
>
> 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.
>
>
>
> Checking the source code of check_icmp.c of the last plugin version I
> found the condition in line 1030 where the value early is compared to
> value early. Since also the comment is indicating if early > later … I
> would suggest to change to condition to this:
>
>
>
> /* if early > later we return 0 so as to indicate a timeout */
>
> if(early->tv_sec > later->tv_sec ||
>
> (early->tv_sec == later->tv_sec && early->tv_usec > later->tv_usec))
>
> {
>
> return 0;
>
> }
I think the developers prefer diffs for these, I noticed that this is
still not committed to svn, diff attached.
thanks for reporting this and the fix.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: check_icmp
URL: <http://nagios-plugins.org/archive/devel/attachments/20090614/7bf5e1b4/attachment.ksh>
More information about the Devel
mailing list