Skip Menu |

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

Report information
The Basics
Id: 92211
Status: resolved
Priority: 0/
Queue: Net-IP

People
Owner: cpan [...] bat.ru
Requestors: phil [...] cpanel.net
Cc:
AdminCc:

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



Subject: Valid IPv6 range is rejected
Date: Thu, 16 Jan 2014 14:27:23 -0600
To: bug-Net-IP [...] rt.cpan.org
From: Phil King <phil [...] cpanel.net>
The validation rules examine an IPv6 address, looking for a maximum of 7 colons. I have encountered a specific case, when describing a /112 range, where 8 colons is legal: e.g. 2001:db8:3:4:5:6:7::/112 Here is a proposed solution: # Count octets my $n = ( $ip =~ tr/:/:/ ); - return 0 unless ( $n > 0 and $n < 8 ); + return 0 unless ( $n > 0 and $n < ( $ip =~ /::$/ ? 9 : 8 ) ); This address is legal, at least according to this utility: https://www.ultratools.com/tools/ipv6CIDRToRangeResult?ipAddress=2001%3Adb8%3A3%3A4%3A5%3A6%3A7%3A%3A%2F112 --- Phil King Product Owner The Angry Llama team
On Thu Jan 16 15:27:30 2014, phil@cpanel.net wrote: Show quoted text
> The validation rules examine an IPv6 address, looking for a maximum of > 7 colons. I have encountered a specific case, when describing a /112 > range, where 8 colons is legal: > e.g. 2001:db8:3:4:5:6:7::/112
This is indeed a valid range. Similar fix was applied to 1.26. Thanks for the report!