diff --git a/Changes b/Changes index e629cdb..57428ac 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Revision history for Perl extension NetAddr::IP +4.065 Tue Oct 2 12:36:11 PDT 2012 + correct format for IPv6 embedded IPv4 addresses + in InetBase v0.8 + 4.064 Tue Sep 25 13:54:47 PDT 2012 added support for rfc3021 /31 networks to hostenum diff --git a/IP.pm b/IP.pm index 4347bff..e6c1c08 100644 --- a/IP.pm +++ b/IP.pm @@ -4,8 +4,8 @@ use strict; #use diagnostics; -use NetAddr::IP::Lite 1.45 qw(Zero Zeros Ones V4mask V4net); -use NetAddr::IP::Util 1.47 qw( +use NetAddr::IP::Lite 1.46 qw(Zero Zeros Ones V4mask V4net); +use NetAddr::IP::Util 1.48 qw( sub128 inet_aton inet_any2n @@ -36,7 +36,7 @@ @ISA = qw(Exporter NetAddr::IP::Lite); -$VERSION = do { sprintf " %d.%03d", (q$Revision: 4.64 $ =~ /\d+/g) }; +$VERSION = do { sprintf " %d.%03d", (q$Revision: 4.65 $ =~ /\d+/g) }; $rfc3021 = 0; diff --git a/Lite/Changes b/Lite/Changes index a77d60e..2e25116 100644 --- a/Lite/Changes +++ b/Lite/Changes @@ -1,6 +1,11 @@ Revision history for Perl extension NetAddr::IP::Lite +1.46 Tue Oct 2 12:36:11 PDT 2012 + correct incorrect format for IPv6 embedded IPv4 addresses + in InetBase v0.8 + 1.45 Fri Aug 10 11:46:18 PDT 2012 + --- 1.44 Tue May 8 16:24:03 PDT 2012 fixed bug that return $ip->num() = 2^128 for 0.0.0.0/0 diff --git a/Lite/Lite.pm b/Lite/Lite.pm index bef102e..efa7e59 100644 --- a/Lite/Lite.pm +++ b/Lite/Lite.pm @@ -32,7 +32,7 @@ use vars qw(@ISA @EXPORT_OK $VERSION $Accept_Binary_IP $Old_nth $AUTOLOAD *Zero); -$VERSION = do { my @r = (q$Revision: 1.45 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +$VERSION = do { my @r = (q$Revision: 1.46 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; require Exporter; diff --git a/Lite/Util/Changes b/Lite/Util/Changes index a0030b5..7b51e1b 100644 --- a/Lite/Util/Changes +++ b/Lite/Util/Changes @@ -1,3 +1,7 @@ +1.48 Tue Oct 2 12:36:11 PDT 2012 + correct incorrect format for IPv6 embedded IPv4 addresses + in InetBase v0.8 + 1.47 Fri Aug 10 11:46:18 PDT 2012 correct typo in documentation POD Thanks to Gregor Herrmann, Debian Perl Group diff --git a/Lite/Util/Util.pm b/Lite/Util/Util.pm index 295c2c2..5c9976d 100644 --- a/Lite/Util/Util.pm +++ b/Lite/Util/Util.pm @@ -21,7 +21,7 @@ @ISA = qw(Exporter DynaLoader); -$VERSION = do { my @r = (q$Revision: 1.47 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +$VERSION = do { my @r = (q$Revision: 1.48 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; @EXPORT_OK = qw( inet_aton @@ -150,7 +150,7 @@ sub mode() { $Mode }; -my $_newV4compat = pack('L4',0,0,0xffffffff,0); +my $_newV4compat = pack('N4',0,0,0xffff,0); sub inet_4map6 { my $naddr = shift; diff --git a/Lite/Util/lib/NetAddr/IP/InetBase.pm b/Lite/Util/lib/NetAddr/IP/InetBase.pm index a8d2148..3589b4d 100644 --- a/Lite/Util/lib/NetAddr/IP/InetBase.pm +++ b/Lite/Util/lib/NetAddr/IP/InetBase.pm @@ -11,7 +11,7 @@ @ISA = qw(Exporter); -$VERSION = do { my @r = (q$Revision: 0.07 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +$VERSION = do { my @r = (q$Revision: 0.08 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; @EXPORT_OK = qw( inet_aton @@ -253,7 +253,7 @@ ? 1 : 0; } -my $_newV4compat = pack('L4',0,0,0xffffffff,0); +my $_newV4compat = pack('N4',0,0,0xffff,0); sub isNewIPv4 { my $naddr = $_[0] ^ $_newV4compat; @@ -659,13 +659,13 @@ This function return true if the IPv6 128 bit string is of the form - ::ffff::d.d.d.d + ::ffff:d.d.d.d =item * $rv = isAnyIPv4($bits128); This function return true if the IPv6 bit string is of the form - ::d.d.d.d or ::ffff::d.d.d.d + ::d.d.d.d or ::ffff:d.d.d.d =item * NetAddr::IP::InetBase::lower(); diff --git a/Lite/Util/t/binet_n2dx.t b/Lite/Util/t/binet_n2dx.t index 98ebba3..8f99333 100644 --- a/Lite/Util/t/binet_n2dx.t +++ b/Lite/Util/t/binet_n2dx.t @@ -35,7 +35,7 @@ 1.2.3.4 1.2.3.4 A1B2:C3D4:E5D6:F7E8:08F9:190A:1.2.3.4 A1B2:C3D4:E5D6:F7E8:8F9:190A:102:304 ::1.2.3.4 1.2.3.4 - ::FFFF:FFFF:1.2.3.4 1.2.3.4 + ::FFFF:1.2.3.4 1.2.3.4 ); my $ff = ipv6_aton($num[1]); diff --git a/Lite/Util/t/bisIPv4.t b/Lite/Util/t/bisIPv4.t index bb51df9..57c6893 100644 --- a/Lite/Util/t/bisIPv4.t +++ b/Lite/Util/t/bisIPv4.t @@ -162,7 +162,7 @@ &ok; } -my $compat = ipv6_aton('::FFFF:FFFF:0:0'); +my $compat = ipv6_aton('::FFFF:0:0'); # check isAnyIPv4 with compatible high bits foreach (@num) { @@ -174,7 +174,6 @@ unless $rv eq $exp; &ok; } - # check isNewIPv4 with compatible high bits foreach (@num) { my $bstr = ipv6_aton($_); diff --git a/Lite/Util/t/inet_4map6.t b/Lite/Util/t/inet_4map6.t index 550ff00..edb06a8 100644 --- a/Lite/Util/t/inet_4map6.t +++ b/Lite/Util/t/inet_4map6.t @@ -31,13 +31,13 @@ 192.168.1.1 1.2.3.4 ::3.4.5.6 - ::FFFF:FFFF:4.5.6.7 + ::FFFF:4.5.6.7 ::1:5.4.3.2 - ::FEFF:FFFF:4.3.2.1 + ::FEFF:4.3.2.1 ); - my $p4 = '0:0:0:0:FFFF:FFFF:'; - my $p6 = '0:0:0:0:'; + my $p4 = '0:0:0:0:0:FFFF:'; + my $p6 = '0:0:0:0:0:'; foreach(0..$#stuff) { my $pass = 1; diff --git a/Lite/Util/t/inet_n2dx.t b/Lite/Util/t/inet_n2dx.t index 8af8287..93e5db5 100644 --- a/Lite/Util/t/inet_n2dx.t +++ b/Lite/Util/t/inet_n2dx.t @@ -35,7 +35,7 @@ 1.2.3.4 1.2.3.4 A1B2:C3D4:E5D6:F7E8:08F9:190A:1.2.3.4 A1B2:C3D4:E5D6:F7E8:8F9:190A:102:304 ::1.2.3.4 1.2.3.4 - ::FFFF:FFFF:1.2.3.4 1.2.3.4 + ::FFFF:1.2.3.4 1.2.3.4 ); my $ff = ipv6_aton($num[1]); diff --git a/Lite/Util/t/isIPv4.t b/Lite/Util/t/isIPv4.t index c1a6f5c..0c74dba 100644 --- a/Lite/Util/t/isIPv4.t +++ b/Lite/Util/t/isIPv4.t @@ -161,7 +161,7 @@ &ok; } -my $compat = ipv6_aton('::FFFF:FFFF:0:0'); +my $compat = ipv6_aton('::FFFF:0:0'); # check isAnyIPv4 with compatible high bits foreach (@num) { diff --git a/Lite/Util/t/naip_gethostbyname.t b/Lite/Util/t/naip_gethostbyname.t index 147254d..6da9b18 100644 --- a/Lite/Util/t/naip_gethostbyname.t +++ b/Lite/Util/t/naip_gethostbyname.t @@ -31,7 +31,7 @@ ++$test; } -my $exp = '0:0:0:0:FFFF:FFFF:7F00:1'; +my $exp = '0:0:0:0:0:FFFF:7F00:1'; my $host = '127.1'; my $got = ipv6_n2x( scalar naip_gethostbyname($host)); print "got: $got\nexp: $exp\nnot " diff --git a/Lite/Util/t/no6_naip_gethostbyname.t b/Lite/Util/t/no6_naip_gethostbyname.t index a37f537..1f02421 100644 --- a/Lite/Util/t/no6_naip_gethostbyname.t +++ b/Lite/Util/t/no6_naip_gethostbyname.t @@ -32,7 +32,7 @@ ++$test; } -my $exp = '0:0:0:0:FFFF:FFFF:7F00:1'; +my $exp = '0:0:0:0:0:FFFF:7F00:1'; my $host = '127.1'; my $got = ipv6_n2x( scalar naip_gethostbyname($host)); print "got: $got\nexp: $exp\nnot " diff --git a/META.yml b/META.yml index 792b667..f74ac1e 100644 --- a/META.yml +++ b/META.yml @@ -1,6 +1,6 @@ --- #YAML:1.0 name: NetAddr-IP -version: 4.064 +version: 4.065 abstract: Manages IPv4 and IPv6 addresses and subnets license: ~ author: