Package: libnet-cidr-perl
Version: 0.14-1
Severity: important

consider the following code:

-----------

use Net::CIDR;
@cidrlist=Net::CIDR::cidradd("127.23.11.1/32", @cidrlist);

printf("it matches!\n")
  if Net::CIDR::cidrlookup("::1", @cidrlist);

printf("got here\n");

-----------

I would expect the cidrlookup to return 0 (the specified IPv6 address
clearly does not fall in the IPv4 address range).  but instead, the
code dies entirely with:

Invalid netblock: 127.23.11.1-0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1 at ./testcidr.pl 
line 10

and never even prints "got here".

Putting IPv6 in the cidradd() call and IPv4 in cidrlookup() fails with
a similar error:

Invalid netblock: 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1-127.23.11.1 at ./testcidr.pl 
line 10

This is problematic generally, but i see the problem specifically for
munin-node, which has a list of cidr_allow addresses.  If an IPv6
cidr_allow is listed first, then any connection from an IPv4 host will
be rejected with this error in /var/log/munin/munin-node.log.  If an
IPv4 cidr_allow is listed first, then any connection from an IPv6 host
will be rejected with this error in /var/log/munin/munin-node.log.
This is troublesome if you want to allow both IPv4 and IPv6
connections to the munin-node.

            --dkg

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing'), (200, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.0.0-1-686-pae (SMP w/1 CPU core)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libnet-cidr-perl depends on:
ii  perl  5.12.4-4

libnet-cidr-perl recommends no packages.

libnet-cidr-perl suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to