r74199 - in /trunk/libnet-ip-perl/debian: changelog patches/ip_reverse.patch patches/series

periapt-guest at users.alioth.debian.org periapt-guest at users.alioth.debian.org
Wed May 11 20:42:51 UTC 2011


Author: periapt-guest
Date: Wed May 11 20:42:23 2011
New Revision: 74199

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=74199
Log:
TODO: standarize watch file
- Correct license as per RT ticket
* Added patch to fix issue with ip_reverse (Closes: #623681)

Added:
    trunk/libnet-ip-perl/debian/patches/ip_reverse.patch
Modified:
    trunk/libnet-ip-perl/debian/changelog
    trunk/libnet-ip-perl/debian/patches/series

Modified: trunk/libnet-ip-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-ip-perl/debian/changelog?rev=74199&op=diff
==============================================================================
--- trunk/libnet-ip-perl/debian/changelog (original)
+++ trunk/libnet-ip-perl/debian/changelog Wed May 11 20:42:23 2011
@@ -1,4 +1,7 @@
 libnet-ip-perl (1.25-3) UNRELEASED; urgency=low
+
+  TODO: standarize watch file
+  - Correct license as per RT ticket
 
   * Took package over for the Debian Perl Group (Closes: #625260)
   * Reviewed long description
@@ -11,6 +14,7 @@
   * Added rules to fix shebang in example scripts
   * Refreshed copyright
   * Added patch to fix spelling errors and reviewed ipcount patch
+  * Added patch to fix issue with ip_reverse (Closes: #623681)
 
  -- Nicholas Bamber <nicholas at periapt.co.uk>  Tue, 03 May 2011 17:19:49 +0100
 

Added: trunk/libnet-ip-perl/debian/patches/ip_reverse.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-ip-perl/debian/patches/ip_reverse.patch?rev=74199&op=file
==============================================================================
--- trunk/libnet-ip-perl/debian/patches/ip_reverse.patch (added)
+++ trunk/libnet-ip-perl/debian/patches/ip_reverse.patch Wed May 11 20:42:23 2011
@@ -1,0 +1,46 @@
+Author: Nicholas Bamber <nicholas at periapt.co.uk>
+Bug: http://rt.cpan.org/Public/Bug/Display.html?d=42793
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=623681
+Subject: ip_reverse() for IPv4 ignores prefixlen parameter
+ The problem particularly occurs where there are a lot of zeros
+ in the less significant quads. You can use a /number to force
+ retention of those quads in the reversed address but the code
+ was ignoring that instruction. There is some ambiguity over what
+ should happen when the number of bits specified does not fall
+ on a boundary. I have tested with Net::IP::XS and tried to follow
+ what they do.
+Last-Update: 2011-05-11
+--- /dev/null
++++ b/t/reverse_ip.t
+@@ -0,0 +1,13 @@
++use Test::More tests=>4;
++use Net::IP;
++
++my $obj = Net::IP->new('10.10.0.0/31');
++is($obj->reverse_ip, '0.10.10.in-addr.arpa.', 'reverse_ip');
++$obj->set('192.168.0.0/24');
++is($obj->reverse_ip, '0.168.192.in-addr.arpa.', 'reverse_ip');
++$obj->set('192.0.0.0/24');
++is($obj->reverse_ip, '0.0.192.in-addr.arpa.', 'reverse_ip');
++$obj->set('192.0.0.0/32');
++is($obj->reverse_ip, '0.0.0.192.in-addr.arpa.', 'reverse_ip');
++
++
+--- a/IP.pm
++++ b/IP.pm
+@@ -1769,12 +1769,13 @@
+ 
+     if ($ip_version == 4) {
+         my @quads    = split /\./, $ip;
+-        my $no_quads = ($len / 8);
++        my $no_quads = 4 - int($len / 8);
+ 
+         my @reverse_quads = reverse @quads;
+ 
+-        while (@reverse_quads and $reverse_quads[0] == 0) {
++        while (@reverse_quads and $reverse_quads[0] == 0 and $no_quads > 0) {
+             shift(@reverse_quads);
++            --$no_quads;
+         }
+ 
+         return join '.', @reverse_quads, 'in-addr', 'arpa.';

Modified: trunk/libnet-ip-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libnet-ip-perl/debian/patches/series?rev=74199&op=diff
==============================================================================
--- trunk/libnet-ip-perl/debian/patches/series (original)
+++ trunk/libnet-ip-perl/debian/patches/series Wed May 11 20:42:23 2011
@@ -1,2 +1,3 @@
 spelling.patch
 ipcount.patch
+ip_reverse.patch




More information about the Pkg-perl-cvs-commits mailing list