On Tue, 2020-10-20 at 15:19 +0200, Florian Obser wrote:
> 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.
What I meant to say is meant for ping(8). All the icmp echo replies
still arrive and are accounted for.
> sbcreatecontrol() fails because it tries to allocate space with
> M_DONTWAIT. Looks like you drove your system out of resources.
I see nothing in dmesg or the logs. Is there another to verify this?
And assuming it is indeed run out of resources, is there a way to
fix this, because the (virtual) hardware doesn't looks swamped.
>
> 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.
In this case it's the other way around: warnings are being generated,
but all icmp echo replies are received intact by ping(8). But I
understand your point. The question remains then how I can debug this
further.
> 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;
> > }
> >
> >