Standard Nagios Plugins 1.4.9 and IPv6 problem?

Frost, Mark {PBG} mark.frost1 at pepsi.com
Fri Sep 21 17:14:05 CEST 2007


This was my original assertion.  It does open a socket with parameters
for IPv6 (AF_INET6) and then tells the resolver to run the query.  There
is no configuration in the resolver library itself or resolv.conf, etc,
that says "hey, also send out IPv6 queries, would you?"

I guess the big problem I have here is what is necessary to convince an
application that a system does not use IPv6?  That there's no interface
configured to use IPv6? (check)  That there's no routing or other
networking setup at boot time to enable it? (check)  I feel that I'm an
unfortunate victim of Linux just throws IPv6 include files into its base
configuration whether I want them or not so the plugins assume that they
might as well try it.  There's no package I can uninstall to remove
Linux's knowledge of IPv6 and it's protocols.  I'm stuck with it.

I mean, if I had include files for Appletalk on my system (but no
configured interfaces or other network apparatus) should an application
try to send out Appletalk packets whether I ask for them or not?

I'm told that there were some kernel modules installed by default that
could possibly be disabled that might dissuade the plugins from thinking
they should try IPv6, but from what I thought I read from the code, I
don't think that's going to matter.  This theory was tested on an
OpenSuse box and it didn't affect the issue, so I'm thinking it won't
matter on the Red Hat box either.

Sorry to seem testy.  I find that I'm a little annoyed that this problem
kind of came from out of nowhere for us.

Thanks

Mark

-----Original Message-----
From: nagios-users-bounces at lists.sourceforge.net
[mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of Holger
Weiss
Sent: Friday, September 21, 2007 11:00 AM
To: Nagios Users
Subject: Re: [Nagios-users] Standard Nagios Plugins 1.4.9 and IPv6
problem?

* "Frost, Mark {PBG}" <mark.frost1 at pepsi.com> [2007-09-20 14:36]:
> The thing about #3 is that it seems that no matter how compile the
> plugins, it will still use IPv6 if it detects that your include files
> support AF_INET6.  You can't turn it off short of finding some way to
> turn it off in your OS which seems a bit extreme to me.  I've always
> accepted that on any flavor of Linux I use, IPv6 is available even if
> I'm not using it.  The idea that some application is going to start
> using it when I have no configured interface or any other indication
> that IPv6 is in use baffles me.  Beyond that that these plugins would
> opt to generate an extra say 4x network traffic that I can explicitly
> tell them not to also baffles me.  I mean, what do I have to do to
> convince 'check_nt' that no, I really really really don't want it
> sending out IPv6 traffic?

To be nitpicking, it doesn't "send out IPv6 traffic", it merely asks
your resolver library for the address of some host name without
explicitely stating that it's only interested in an IPv4 address.
Asking for an IPv4 address only is certainly possible, though IMO it's
more appropriate to disable IPv6 system-wide if, well, you want it
disabled system-wide.  However, disabling IPv6 lookups on the
application level can of course be useful in certain cases within mixed
v4/v6 environments.  And I agree that "--without-ipv6" doesn't do what
you'd expect it to do.  At least it doesn't seem to be a documented
option :-)

Anyway, if noone beats me on it, I'll fix "--without-ipv6" for the next
release (at least for most C plugins), and I'll put "-4"/"-6" flags for
all plugins which lookup host names on my TODO list.  Until then, the
following patch should work around your problem for most C plugins:

-----------------------------------------------------------
--- netutils.c.orig	2007-01-20 07:07:48.000000000 +0100
+++ netutils.c	2007-09-21 16:28:13.117372070 +0200
@@ -39,7 +39,7 @@
 unsigned int socket_timeout = DEFAULT_SOCKET_TIMEOUT; 
 int econn_refuse_state = STATE_CRITICAL;
 int was_refused = FALSE;
-int address_family = AF_UNSPEC;
+int address_family = PF_INET;
 
 /* handles socket timeouts */
 void
-----------------------------------------------------------

Holger

------------------------------------------------------------------------
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when
reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list