On Tue, Oct 20, 2020 at 09:20:32AM +0200, Martijn van Duren wrote:
> I have an icinga-instance running on openbsd.amsterdam. Here I found
> that sometimes check_ping from the monitoring-plugins package fails,
> because ping(8) sends "failed to get receiving hop limit", but still
> receives all the ping replies. These packets/annomalies are clearly
> not meant for us.

But it is. This is comming from the local machine,
see L949ff of netinet6/ip6_input.c.
sbcreatecontrol() fails because it tries to allocate space with
M_DONTWAIT. Looks like you drove your system out of resources.

While the local system receives all replies and passes them on to
ping6(8) they are not counted as received. So ping6(8) will report
packet loss while there is none.
I think it's a mistake to hide the warning because it will lead people
on a wild goose chase.
Also since ping6(8) will report packet loss I'm not conviced this will
solve your problem.

> 
> Since this check is done before the ICMP6_ECHO_REPLY check and our
> manpage states:
> -v      Verbose output.  ICMP packets other than ECHO_REPLY that are
>         received are listed.
> I think the following diff is warranted and solves my false warning
> states.
> 
> OK?
> 
> martijn@
> 
> Index: ping.c
> ===================================================================
> RCS file: /cvs/src/sbin/ping/ping.c,v
> retrieving revision 1.240
> diff -u -p -r1.240 ping.c
> --- ping.c    11 Feb 2020 18:41:39 -0000      1.240
> +++ ping.c    20 Oct 2020 07:19:49 -0000
> @@ -1180,7 +1180,8 @@ pr_pack(u_char *buf, int cc, struct msgh
>               icp6 = (struct icmp6_hdr *)buf;
>  
>               if ((hoplim = get_hoplim(mhdr)) == -1) {
> -                     warnx("failed to get receiving hop limit");
> +                     if (options & F_VERBOSE)
> +                             warnx("failed to get receiving hop limit");
>                       return;
>               }
>  
> 

-- 
I'm not entirely sure you are real.

Reply via email to