diff --git a/Changes b/Changes index 581d00d..64d65d1 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,11 @@ Revision history for Perl extension NetAddr::IP +4.034 Mon Oct 25 16:22:01 PDT 2010 + Updated Lite::_xnew v1.20 to properly handle ipV6 notation of the form + xxxx:xxxx:xxxx:xxxx:xxxx:xxxx, DDD + + Thanks to Dusty Mabe for spotting this bug + 4.033 Wed Sep 29 10:32:50 PDT 2010 Conditionalize import of AF_INET6 in Util.pm NetAddr::IP::UtilPolluted diff --git a/IP.pm b/IP.pm index 347d195..6b66a8c 100644 --- a/IP.pm +++ b/IP.pm @@ -34,7 +34,7 @@ @ISA = qw(Exporter NetAddr::IP::Lite); -$VERSION = do { sprintf " %d.%03d", (q$Revision: 4.33 $ =~ /\d+/g) }; +$VERSION = do { sprintf " %d.%03d", (q$Revision: 4.34 $ =~ /\d+/g) }; =pod diff --git a/Lite/Changes b/Lite/Changes index ffdd19c..c7765e2 100644 --- a/Lite/Changes +++ b/Lite/Changes @@ -1,5 +1,11 @@ Revision history for Perl extension NetAddr::IP::Lite +1.20 Mon Oct 25 16:22:01 PDT 2010 + Updated _xnew to properly handle ipV6 notation of the form + xxxx:xxxx:xxxx:xxxx:xxxx:xxxx, DDD + + Thanks to Dusty Mabe for spotting this bug + 1.19 Wed Sep 29 10:32:50 PDT 2010 Conditionalize import of AF_INET6 in Util.pm NetAddr::IP::UtilPolluted diff --git a/Lite/Lite.pm b/Lite/Lite.pm index 8886818..0a9631b 100644 --- a/Lite/Lite.pm +++ b/Lite/Lite.pm @@ -29,7 +29,7 @@ use vars qw(@ISA @EXPORT_OK $VERSION $Accept_Binary_IP $Old_nth $AUTOLOAD *Zero); -$VERSION = do { my @r = (q$Revision: 1.19 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +$VERSION = do { my @r = (q$Revision: 1.20 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; require Exporter; @@ -681,7 +681,7 @@ $ip = $fip6{$ip}; last; } else { - return undef; + return undef unless $isV6; } } else { $mask = lc $_[0]; @@ -694,7 +694,7 @@ # parse mask if ($mask =~ /^(\d+)$/) { - if (index($ip,':') < 0) { # is ipV4 + if (! $isV6 && index($ip,':') < 0) { # is ipV4 if ($1 == 32) { # cidr 32 $mask = Ones; } diff --git a/META.yml b/META.yml index f02eec9..8e9105f 100644 --- a/META.yml +++ b/META.yml @@ -1,6 +1,6 @@ --- #YAML:1.0 name: NetAddr-IP -version: 4.033 +version: 4.034 abstract: Manages IPv4 and IPv6 addresses and subnets license: ~ author: