[icinga-devel] [patch] IPv6 support for nrpe and check_nrpe

Florian Obser florian at narrans.de
Mon Sep 6 21:26:46 CEST 2010


Hi,

I just pushed the attached patch to
git://github.com/fobser/icinga-nrpe-ipv6.git

nrpe now correctly listens on :: and 0.0.0.0 if server_address is not
configured. As an added bonus you can also configure a name with A and
AAAA records and nrpe listens on both addresses. I didn't try what
happens if you have multiple A or AAAA records, but I suspect it might
just work.

I removed Mike's(?) comments as I think this is resolved now:

//             server_address = "::";
/* it's better to work on IPv6 if not set as IPv4 Addresspace is 
included in IPv6  but shuld be discussed if this is ok as getaddrinfo 
will look in IPv6 Mode after a AAAA Entry if not a IP is in allowed hosts*/

This was in the following block:

         if(!server_address || !strlen(server_address)) {
                 server_address = NULL;
                 addrinfo.ai_flags=AI_PASSIVE;
                 }

Btw. checking for strlen(server_address) == 0 is just paranoia, with the 
current code you can't get a string of length 0, it's either bigger or NULL.

Best regards,
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nrpe_in6addr_any.patch
Type: text/x-patch
Size: 11226 bytes
Desc: not available
URL: <http://lists.icinga.org/pipermail/icinga-devel/attachments/20100906/945deed2/attachment.bin>


More information about the icinga-devel mailing list