Skip Menu |

This queue is for tickets about the Net-CIDR CPAN distribution.

Report information
The Basics
Id: 67275
Status: rejected
Priority: 0/
Queue: Net-CIDR

People
Owner: Nobody in particular
Requestors: carsten [...] wolffcarsten.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: lookup of IPv4 address in IPv6 notation fails
Date: Wed, 6 Apr 2011 16:24:54 +0200
To: bug-Net-CIDR [...] rt.cpan.org
From: Carsten Wolff <carsten [...] wolffcarsten.de>
Hi, $ cat test.pl use Net::CIDR; print Net::CIDR::cidrlookup("::ffff:192.168.1.10", "192.168.1.0/24"); $ perl test.pl Invalid netblock: 192.168.5.255-0.0.0.0.0.0.0.0.0.0.255.255.192.168.5.10 at test.pl line 2 sub _ipv6to4 contains two commented lines (356-357). If I enable those lines again, the problem vanishes. Why are those lines commented? Can they be re- enabled in the next release? I need this for IPv6-support in Net::Server, which might be listening to either INET or INET6 or wildcard socket and uses cidrlookup() to lookup access for a peer it got via getpeername($sock). This means, getpeername might return an IPv4 address in IPv4 notation or IPv6 notation, depending on the type of socket. In both cases, the cidrlookup should be successfull, independently of the notation the admin used in the allow-rule of the config file. Also see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523846#53 I could work around this in Net::Server, but I think it would be nicer, if cidrlookup would behave as described above. Thanks, Carsten -- /\-ยด-/\ ( @ @ ) ________o0O___^___O0o________
Download signature.asc
application/pgp-signature 190b

Message body not shown because it is not plain text.

cidrlookup requires all parameters to use IPv6 or IPv4 format.