r64398 - in /trunk/libnetaddr-ip-perl: ./ Lite/ Lite/t/ debian/ debian/patches/
periapt-guest at users.alioth.debian.org
periapt-guest at users.alioth.debian.org
Fri Oct 29 09:07:34 UTC 2010
Author: periapt-guest
Date: Fri Oct 29 09:07:13 2010
New Revision: 64398
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=64398
Log:
* New upstream release (Closes: #508775)
* Refreshed and removed patches where fixed upstream (Closes: #565563)
Added:
trunk/libnetaddr-ip-perl/Lite/t/bug62521.t
- copied unchanged from r64397, branches/upstream/libnetaddr-ip-perl/current/Lite/t/bug62521.t
trunk/libnetaddr-ip-perl/Lite/t/v4_new_cis.t
- copied unchanged from r64397, branches/upstream/libnetaddr-ip-perl/current/Lite/t/v4_new_cis.t
trunk/libnetaddr-ip-perl/Lite/t/v6-new_cis6_base.t
- copied unchanged from r64397, branches/upstream/libnetaddr-ip-perl/current/Lite/t/v6-new_cis6_base.t
trunk/libnetaddr-ip-perl/Lite/t/v6-new_cis_base.t
- copied unchanged from r64397, branches/upstream/libnetaddr-ip-perl/current/Lite/t/v6-new_cis_base.t
Modified:
trunk/libnetaddr-ip-perl/Changes
trunk/libnetaddr-ip-perl/IP.pm
trunk/libnetaddr-ip-perl/Lite/Changes
trunk/libnetaddr-ip-perl/Lite/Lite.pm
trunk/libnetaddr-ip-perl/Lite/README
trunk/libnetaddr-ip-perl/MANIFEST
trunk/libnetaddr-ip-perl/META.yml
trunk/libnetaddr-ip-perl/debian/changelog
trunk/libnetaddr-ip-perl/debian/patches/series
trunk/libnetaddr-ip-perl/debian/patches/spelling.patch
Modified: trunk/libnetaddr-ip-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnetaddr-ip-perl/Changes?rev=64398&op=diff
==============================================================================
--- trunk/libnetaddr-ip-perl/Changes (original)
+++ trunk/libnetaddr-ip-perl/Changes Fri Oct 29 09:07:13 2010
@@ -1,14 +1,27 @@
Revision history for Perl extension NetAddr::IP
+4.035 Thu Oct 28 14:26:19 PDT 2010
+ fix bug in Lite v1.21 where new6 improperly assigns the mask value
+ for and ipv4 address in 32 bit space instead of 128 bit space
+
+ Thanks to Mark Martinec and Steve Huff (SHUFF) * shuff at cpan.org
+ for spotting and replicating that bug
+
+ added new_cis and new_cis6 to Lite.pm v1.21 to accomodate
+ Cisco syntax that has IP and MASK seperated by a space.
+
+ Updated typo in documentation that left out example
+ print new6 stuff
+
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 <Dusty.Mabe at tekelec.com> for spotting this bug
+ Updated Lite::_xnew v1.20 to properly handle ipV6 notation of the form
+ xxxx:xxxx:xxxx:xxxx:xxxx:xxxx, DDD
+
+ Thanks to Dusty Mabe <Dusty.Mabe at tekelec.com> 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
+ Conditionalize import of AF_INET6 in Util.pm
+ NetAddr::IP::UtilPolluted
4.032 Wed Sep 22 13:39:08 PDT 2010
Added overload => 'ne' and '!=' to Lite.pm v1.18
@@ -18,15 +31,15 @@
NetAddr::IP::Util.pm 1.33 in its own namespace
4.030 Tue Jul 20 15:32:23 PDT 2010
- Resolve named hosts in Lite.pm using gethostbyname, followed by
+ Resolve named hosts in Lite.pm using gethostbyname, followed by
gethostbyname6 to determine whether to set ipV6 flag
- Thanks to Dusty Mabe <Dusty.Mabe at tekelec.com> for spotting this bug
+ Thanks to Dusty Mabe <Dusty.Mabe at tekelec.com> for spotting this bug
4.029 Thu Jul 8 18:17:38 PDT 2010
In NetAddr::IP::Lite,
- added support for the sub "new" to resolve host6 names
- if the OPTIONAL perl Socket6 module is available
+ added support for the sub "new" to resolve host6 names
+ if the OPTIONAL perl Socket6 module is available
Thanks to "Mabe, Dusty" <Dusty.Mabe at tekelec.com> for spotting
this and suggesting a fix.
@@ -43,13 +56,13 @@
4.027 Tue Jun 9 10:31:11 PDT 2009
In NetAddr::IP::Util v1.31,
- ferret out shell value for Makefile.PL when calling
- ./configure for systems where the 'x' bit gets lost
- due to bug in Archive::Tar
+ ferret out shell value for Makefile.PL when calling
+ ./configure for systems where the 'x' bit gets lost
+ due to bug in Archive::Tar
4.026 Sat Mar 7 16:35:33 PST 2009
- make the compiler test check the environment for
- CC before using Perl's default compiler
+ make the compiler test check the environment for
+ CC before using Perl's default compiler
4.025 Sat Mar 7 16:15:18 PST 2009
revised compiler test in Makefile.PL for Util v1.29
Modified: trunk/libnetaddr-ip-perl/IP.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnetaddr-ip-perl/IP.pm?rev=64398&op=diff
==============================================================================
--- trunk/libnetaddr-ip-perl/IP.pm (original)
+++ trunk/libnetaddr-ip-perl/IP.pm Fri Oct 29 09:07:13 2010
@@ -4,7 +4,7 @@
use strict;
#use diagnostics;
-use NetAddr::IP::Lite 1.19 qw(Zero Zeros Ones V4mask V4net);
+use NetAddr::IP::Lite 1.21 qw(Zero Zeros Ones V4mask V4net);
use NetAddr::IP::Util 1.34 qw(
sub128
inet_aton
@@ -34,7 +34,7 @@
@ISA = qw(Exporter NetAddr::IP::Lite);
-$VERSION = do { sprintf " %d.%03d", (q$Revision: 4.34 $ =~ /\d+/g) };
+$VERSION = do { sprintf " %d.%03d", (q$Revision: 4.35 $ =~ /\d+/g) };
=pod
@@ -60,7 +60,7 @@
);
NOTE: NetAddr::IP::Util has a full complement of network address
- utilites to convert back and from from binary to text.
+ utilites to convert back and forth between binary and text.
inet_aton, inet_ntoa, ipv6_aton, ipv6_n2x, ipv6_n2d
inet_any2d, inet_n2dx, inet_n2ad, inetanyto6, ipv6to4
@@ -471,27 +471,40 @@
=item C<-E<gt>new_from_aton($netaddr)>
+=item C<-E<gt>new_cis("$addr $mask)>
+
+=item C<-E<gt>new_cis6("$addr $mask)>
+
The first two methods create a new address with the supplied address in
-C<$addr> and an optional netmask C<$mask>, which can be omitted to get
-a /32 or /128 netmask for IPv4 / IPv6 addresses respectively
-
-B<new_from_aton> takes a packed IPv4 address and assumes a /32 mask. This
-function replaces the DEPRECATED :aton functionality which is fundamentally
-broken.
+C<$addr> and an optional netmask C<$mask>, which can be omitted to get
+a /32 or /128 netmask for IPv4 / IPv6 addresses respectively.
The third method C<new_no> is exclusively for IPv4 addresses and filters
improperly formatted
dot quad strings for leading 0's that would normally be interpreted as octal
format by NetAddr per the specifications for inet_aton.
-C<-E<gt>new6> marks the address as being in ipV6 address space even if the
-format would suggest otherwise.
-
- i.e. ->new6('1.2.3.4') will result in ::102:304
+B<new_from_aton> takes a packed IPv4 address and assumes a /32 mask. This
+function replaces the DEPRECATED :aton functionality which is fundamentally
+broken.
+
+The last two methods B<new_cis> and B<new_cis6> differ from B<new> and
+B<new6> only in that they except the common Cisco address notation for
+address/mask pairs with a B<space> as a seperator instead of a slash (/)
+
+ i.e. ->new_cis('1.2.3.0 24')
+ or
+ ->new_cis6('::1.2.3.0 120')
+
+C<-E<gt>new6> and
+C<-E<gt>new_cis6> mark the address as being in ipV6 address space even
+if the format would suggest otherwise.
+
+ i.e. ->new6('1.2.3.4') will result in ::102:304
addresses submitted to ->new in ipV6 notation will
remain in that notation permanently. i.e.
- ->new('::1.2.3.4') will result in ::102:304
+ ->new('::1.2.3.4') will result in ::102:304
whereas new('1.2.3.4') would print out as 1.2.3.4
See "STRINGIFICATION" below.
Modified: trunk/libnetaddr-ip-perl/Lite/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnetaddr-ip-perl/Lite/Changes?rev=64398&op=diff
==============================================================================
--- trunk/libnetaddr-ip-perl/Lite/Changes (original)
+++ trunk/libnetaddr-ip-perl/Lite/Changes Fri Oct 29 09:07:13 2010
@@ -1,4 +1,17 @@
Revision history for Perl extension NetAddr::IP::Lite
+
+1.21 Thu Oct 28 14:26:19 PDT 2010
+ fix bug where new6 improperly assigns the mask value
+ for and ipv4 address in 32 bit space instead of 128 bit space
+
+ Thanks to Mark Martinec and Steve Huff (SHUFF) * shuff at cpan.org
+ for spotting and replicating that bug
+
+ added new_cis and new_cis6 to Lite.pm v1.21 to accomodate
+ Cisco syntax that has IP and MASK seperated by a space.
+
+ Updated typo in documentation that left out example
+ print new6 stuff
1.20 Mon Oct 25 16:22:01 PDT 2010
Updated _xnew to properly handle ipV6 notation of the form
@@ -7,8 +20,8 @@
Thanks to Dusty Mabe <Dusty.Mabe at tekelec.com> 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
+ Conditionalize import of AF_INET6 in Util.pm
+ NetAddr::IP::UtilPolluted
1.18 Wed Sep 22 13:39:08 PDT 2010
Added overload => 'ne' and '!=' to Lite.pm
Modified: trunk/libnetaddr-ip-perl/Lite/Lite.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnetaddr-ip-perl/Lite/Lite.pm?rev=64398&op=diff
==============================================================================
--- trunk/libnetaddr-ip-perl/Lite/Lite.pm (original)
+++ trunk/libnetaddr-ip-perl/Lite/Lite.pm Fri Oct 29 09:07:13 2010
@@ -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.20 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+$VERSION = do { my @r = (q$Revision: 1.21 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
require Exporter;
@@ -292,7 +292,7 @@
my $ip = new6 NetAddr::IP::Lite '192.168.1.123';
print "$ip\n";
-Will print the string
+Will print the string 0:0:0:0:0:0:C0A8:17B/128
=item B<Equality>
@@ -481,8 +481,12 @@
=item C<-E<gt>new_from_aton($netaddr)>
+=item C<-E<gt>new_cis("$addr $mask)>
+
+=item C<-E<gt>new_cis6("$addr $mask)>
+
The first two methods create a new address with the supplied address in
-C<$addr> and an optional netmask C<$mask>, which can be omitted to get
+C<$addr> and an optional netmask C<$mask>, which can be omitted to get
a /32 or /128 netmask for IPv4 / IPv6 addresses respectively.
The third method C<new_no> is exclusively for IPv4 addresses and filters
@@ -494,14 +498,23 @@
function replaces the DEPRECATED :aton functionality which is fundamentally
broken.
-C<-E<gt>new6> marks the address as being in ipV6 address space even if the
-format would suggest otherwise.
-
- i.e. ->new6('1.2.3.4') will result in ::102:304
+The last two methods B<new_cis> and B<new_cis6> differ from B<new> and
+B<new6> only in that they except the common Cisco address notation for
+address/mask pairs with a B<space> as a seperator instead of a slash (/)
+
+ i.e. ->new_cis('1.2.3.0 24')
+ or
+ ->new_cis6('::1.2.3.0 120')
+
+C<-E<gt>new6> and
+C<-E<gt>new_cis6> mark the address as being in ipV6 address space even
+if the format would suggest otherwise.
+
+ i.e. ->new6('1.2.3.4') will result in ::102:304
addresses submitted to ->new in ipV6 notation will
remain in that notation permanently. i.e.
- ->new('::1.2.3.4') will result in ::102:304
+ ->new('::1.2.3.4') will result in ::102:304
whereas new('1.2.3.4') would print out as 1.2.3.4
See "STRINGIFICATION" below.
@@ -638,6 +651,24 @@
goto &_xnew;
}
+sub new_cis($;$$) {
+ my @in = @_;
+ if ( $in[1] && $in[1] =~ m!^(.+)\s+(.+)$! ) {
+ $in[1] = $1 .'/'. $2;
+ }
+ @_ = (0, at in);
+ goto &_xnew;
+}
+
+sub new_cis6($;$$) {
+ my @in = @_;
+ if ( $in[1] && $in[1] =~ m!^(.+)\s+(.+)$! ) {
+ $in[1] = $1 .'/'. $2;
+ }
+ @_ = (1, at in);
+ goto &_xnew;
+}
+
sub _no_octal {
$_[0] =~ m/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/;
return sprintf("%d.%d.%d.%d",$1,$2,$3,$4);
@@ -694,24 +725,28 @@
# parse mask
if ($mask =~ /^(\d+)$/) {
+ my $mval = $1;
if (! $isV6 && index($ip,':') < 0) { # is ipV4
- if ($1 == 32) { # cidr 32
+ if ($mval == 32) { # cidr 32
$mask = Ones;
}
elsif ($mask < 32) { # small cidr
- $mask = shiftleft(Ones,32 -$1);
+ $mask = shiftleft(Ones,32 -$mval);
} else { # is a binary mask
- $mask = pack('L3N',0xffffffff,0xffffffff,0xffffffff,$1);
+ $mask = pack('L3N',0xffffffff,0xffffffff,0xffffffff,$mval);
}
} else { # is ipV6
$isV6 = 1;
- if ($1 == 128) { # cidr 128
+ if ($mval == 128) { # cidr 128
$mask = Ones;
}
+ elsif ($ip =~ /^\d+\.\d+\.\d+\.\d+$/) { # corner case of ipV4 with new6
+ $mask = shiftleft(Ones,32 -$mval);
+ }
elsif ($mask < 128) { # small cidr
- $mask = shiftleft(Ones,128 -$1);
+ $mask = shiftleft(Ones,128 -$mval);
} else { # is a binary mask
- $mask = bcd2bin($1);
+ $mask = bcd2bin($mval);
}
}
} elsif ($mask =~ m/^\d+\.\d+\.\d+\.\d+$/) { # ipv4 form of mask
Modified: trunk/libnetaddr-ip-perl/Lite/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnetaddr-ip-perl/Lite/README?rev=64398&op=diff
==============================================================================
--- trunk/libnetaddr-ip-perl/Lite/README (original)
+++ trunk/libnetaddr-ip-perl/Lite/README Fri Oct 29 09:07:13 2010
@@ -88,7 +88,7 @@
my $ip = new6 NetAddr::IP::Lite '192.168.1.123';
print "$ip\n";
- Will print the string
+ Will print the string 0:0:0:0:0:0:C0A8:17B/128
Equality
You can test for equality with either "eq", "ne", "==" or "!=".
@@ -165,6 +165,8 @@
"->new6([$addr, [ $mask]])"
"->new_no([$addr, [ $mask]])"
"->new_from_aton($netaddr)"
+ "->new_cis("$addr $mask)"
+ "->new_cis6("$addr $mask)"
The first two methods create a new address with the supplied address
in "$addr" and an optional netmask "$mask", which can be omitted to
get a /32 or /128 netmask for IPv4 / IPv6 addresses respectively.
@@ -178,8 +180,17 @@
This function replaces the DEPRECATED :aton functionality which is
fundamentally broken.
- "->new6" marks the address as being in ipV6 address space even if
- the format would suggest otherwise.
+ The last two methods new_cis and new_cis6 differ from new and new6
+ only in that they except the common Cisco address notation for
+ address/mask pairs with a space as a seperator instead of a slash
+ (/)
+
+ i.e. ->new_cis('1.2.3.0 24')
+ or
+ ->new_cis6('::1.2.3.0 120')
+
+ "->new6" and "->new_cis6" mark the address as being in ipV6 address
+ space even if the format would suggest otherwise.
i.e. ->new6('1.2.3.4') will result in ::102:304
Modified: trunk/libnetaddr-ip-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnetaddr-ip-perl/MANIFEST?rev=64398&op=diff
==============================================================================
--- trunk/libnetaddr-ip-perl/MANIFEST (original)
+++ trunk/libnetaddr-ip-perl/MANIFEST Fri Oct 29 09:07:13 2010
@@ -10,6 +10,7 @@
Lite/t/bigints.t
Lite/t/bits.t
Lite/t/broadcast.t
+Lite/t/bug62521.t
Lite/t/cidr.t
Lite/t/constants.t
Lite/t/contains.t
@@ -46,6 +47,7 @@
Lite/t/v4-new-first.t
Lite/t/v4-new_from_aton.t
Lite/t/v4-new.t
+Lite/t/v4_new_cis.t
Lite/t/v4-no_octal.t
Lite/t/v4-num.t
Lite/t/v4-numeric.t
@@ -55,6 +57,8 @@
Lite/t/v4-wnew.t
Lite/t/v6-contains.t
Lite/t/v6-inc.t
+Lite/t/v6-new_cis6_base.t
+Lite/t/v6-new_cis_base.t
Lite/t/v6-new-base.t
Lite/t/v6-numeric.t
Lite/t/v6-old-base.t
Modified: trunk/libnetaddr-ip-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnetaddr-ip-perl/META.yml?rev=64398&op=diff
==============================================================================
--- trunk/libnetaddr-ip-perl/META.yml (original)
+++ trunk/libnetaddr-ip-perl/META.yml Fri Oct 29 09:07:13 2010
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: NetAddr-IP
-version: 4.034
+version: 4.035
abstract: Manages IPv4 and IPv6 addresses and subnets
license: ~
author:
Modified: trunk/libnetaddr-ip-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnetaddr-ip-perl/debian/changelog?rev=64398&op=diff
==============================================================================
--- trunk/libnetaddr-ip-perl/debian/changelog (original)
+++ trunk/libnetaddr-ip-perl/debian/changelog Fri Oct 29 09:07:13 2010
@@ -1,3 +1,10 @@
+libnetaddr-ip-perl (4.035+dfsg-1) UNRELEASED; urgency=low
+
+ * New upstream release (Closes: #508775)
+ * Refreshed and removed patches where fixed upstream (Closes: #565563)
+
+ -- Nicholas Bamber <nicholas at periapt.co.uk> Fri, 29 Oct 2010 09:56:36 +0100
+
libnetaddr-ip-perl (4.034+dfsg-1) unstable; urgency=low
* New upstream release
Modified: trunk/libnetaddr-ip-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnetaddr-ip-perl/debian/patches/series?rev=64398&op=diff
==============================================================================
--- trunk/libnetaddr-ip-perl/debian/patches/series (original)
+++ trunk/libnetaddr-ip-perl/debian/patches/series Fri Oct 29 09:07:13 2010
@@ -1,3 +1,2 @@
lite_makefile.patch
spelling.patch
-pod_missing_string.patch
Modified: trunk/libnetaddr-ip-perl/debian/patches/spelling.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnetaddr-ip-perl/debian/patches/spelling.patch?rev=64398&op=diff
==============================================================================
--- trunk/libnetaddr-ip-perl/debian/patches/spelling.patch (original)
+++ trunk/libnetaddr-ip-perl/debian/patches/spelling.patch Fri Oct 29 09:07:13 2010
@@ -2,7 +2,7 @@
Origin: vendor
Bug: http://rt.cpan.org/Ticket/Display.html?id=62118
Author: gregor herrmann <gregoa at debian.org>
-Last-Update: 2010-10-14
+Last-Update: 2010-10-29
Reviewed-by: Nicholas Bamber <nicholas at periapt.co.uk>
--- a/IP.pm
+++ b/IP.pm
@@ -10,7 +10,7 @@
);
NOTE: NetAddr::IP::Util has a full complement of network address
-- utilites to convert back and from from binary to text.
+- utilites to convert back and forth between binary and text.
+ utilities to convert back and forth between binary and text.
inet_aton, inet_ntoa, ipv6_aton, ipv6_n2x, ipv6_n2d
More information about the Pkg-perl-cvs-commits
mailing list