Hello community,
here is the log from the commit of package perl-Net-DNS
checked in at Mon Oct 8 12:28:02 CEST 2007.
--------
--- perl-Net-DNS/perl-Net-DNS.changes 2007-07-03 08:42:35.000000000 +0200
+++ /mounts/work_src_done/STABLE/perl-Net-DNS/perl-Net-DNS.changes 2007-10-08 09:54:17.000000000 +0200
@@ -1,0 +2,7 @@
+Mon Oct 8 09:32:23 CEST 2007 - anicka@suse.cz
+
+- update to 0.61
+ * Modification of $_ in various places.
+ * t/11-inet6 assumed lowercase domain names.
+
+-------------------------------------------------------------------
Old:
----
Net-DNS-0.60.tar.bz2
New:
----
Net-DNS-0.61.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Net-DNS.spec ++++++
--- /var/tmp/diff_new_pack.R12349/_old 2007-10-08 12:27:58.000000000 +0200
+++ /var/tmp/diff_new_pack.R12349/_new 2007-10-08 12:27:58.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package perl-Net-DNS (Version 0.60)
+# spec file for package perl-Net-DNS (Version 0.61)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,17 +12,17 @@
Name: perl-Net-DNS
BuildRequires: perl-Digest-HMAC perl-Net-IP
-Version: 0.60
+Version: 0.61
Release: 1
Provides: perl_dns
Obsoletes: perl_dns
Requires: perl-Digest-HMAC
Requires: perl-Net-IP
Requires: perl = %{perl_version}
-Autoreqprov: on
+AutoReqProv: on
Group: Development/Libraries/Perl
-License: Artistic License, GPL v2 or later
-URL: http://cpan.org/modules/by-module/Net/
+License: Artistic License; GPL v2 or later
+Url: http://cpan.org/modules/by-module/Net/
Summary: Perl interface to the DNS resolver
Source: Net-DNS-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -61,8 +61,11 @@
%{perl_vendorarch}/Net
%{perl_vendorarch}/auto/Net
/var/adm/perl-modules/%{name}
-
%changelog
+* Mon Oct 08 2007 - anicka@suse.cz
+- update to 0.61
+ * Modification of $_ in various places.
+ * t/11-inet6 assumed lowercase domain names.
* Tue Jul 03 2007 - anicka@suse.cz
- update to 0.60
* Fix spelling mistakes in change log using interactive
++++++ Net-DNS-0.60.tar.bz2 -> Net-DNS-0.61.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Net-DNS-0.60/Changes new/Net-DNS-0.61/Changes
--- old/Net-DNS-0.60/Changes 2007-06-21 16:40:00.000000000 +0200
+++ new/Net-DNS-0.61/Changes 2007-08-01 13:48:39.000000000 +0200
@@ -1,6 +1,15 @@
+$Id: Changes 675 2007-08-01 10:44:07Z olaf $
Revision history for Net::DNS -*-text-*-
=============================
+*** 0.61, 1 August 2007
+
+Fix rt.cpan.org #28106, 28198, and 28590
+ Modification of $_ in various places.
+
+Fix
+ t/11-inet6 assumed lowercase domain names.
+
*** 0.60 20 June 2007
Fix spelling mistakes in change log using interactive spell checker (aspell).
@@ -88,8 +97,8 @@
ship Net::DNS::Resolver::Base with its own copies of ip_is_ipv[4|6] and
supplied a patch with those functions stripped from Net::IP.
- Note that the package still depends on Net::IP because there are a
- few tests that use it.
+ Note that the package still depends on Net::IP because
+ Net::DNS::Nameserver and a few tests depend on it.
Fix rt 22334
Fixed "perl Makefile.PL --xs" behavior, patch by Tamas Palfalvi
@@ -369,7 +378,7 @@
Fix rt.cpan.org 15119
- main_loop() consumed 100% of memory, because of a bug that
+ main_loop() consumed 100% of CPU, because of a bug that
caused loop_once() to loop ad infinitum.
Fix rt.cpan.org 15299
@@ -1309,4 +1318,4 @@
Chris Reinhardt
Michael Fuhr
-$Id: Changes 654 2007-06-20 15:02:50Z olaf $
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Net-DNS-0.60/contrib/check_soa new/Net-DNS-0.61/contrib/check_soa
--- old/Net-DNS-0.60/contrib/check_soa 2007-06-21 16:39:57.000000000 +0200
+++ new/Net-DNS-0.61/contrib/check_soa 2007-08-01 13:48:35.000000000 +0200
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
-$VERSION = (qw$LastChangedRevision: 657 $)[1];
-$VERSION ||= 0.21;
+$VERSION = (qw$LastChangedRevision: 673 $)[1];
+$VERSION ||= 0.22;
=head1 NAME
@@ -158,9 +158,9 @@
my @ns = NS($name); # find NS serving name
unless ( @ns ) {
- displayRR($name, 'ANY'); # show RR for name if any
- report("unable to find NS for $name."); # name apparently in root zone
print $resolver->string; # show resolver state
+ displayRR($name, 'NS'); # show response code
+ displayRR($name, 'ANY'); # show any RR for name
exit; # game over
}
@@ -201,7 +201,7 @@
report("absolute name expected:\t$1 <----- '.' absent") if $resolver->query($1, 'ANY');
}
-displayRR($name, 'ANY') unless $name =~ /^$zone\.*$/i; # show RR for non-delegated name
+displayRR($name, 'ANY'); # show RR for user-specified name
print "----\n";
@@ -277,11 +277,11 @@
my $packet;
if ( $socket ) {
- until ($_ = $res->bgisready($socket)) { # timed wait on socket
+ until ( $res->bgisready($socket) ) { # timed wait on socket
last if time > ($sent + $udp_timeout);
catnap($udp_wait); # snatch a few milliseconds sleep
}
- $packet = $res->bgread($socket) if $_; # read response if available
+ $packet = $res->bgread($socket) if $res->bgisready($socket); # get response
} else {
$packet = $res->send($zone, 'SOA'); # use sequential query model
}
@@ -309,7 +309,7 @@
report("non-authoritative answer\tTTL", clock($ttl)) unless $aa;
} elsif ( @soa = grep{$_->type eq 'SOA'} $packet->authority ) {
my $ttl = $soa[0]->ttl; # RFC2308, 2.2 (1)(2)
- report("NCACHE response\tTTL", clock($ttl));
+ report("NODATA response\tTTL", clock($ttl));
return @fail unless grep{$_->name =~ /^$zone$/i} @soa;
report('requested SOA in authority section; violates RFC2308');
} elsif ( my @ns = grep{$_->type eq 'NS'} $packet->authority ) {
@@ -349,10 +349,10 @@
sub clock { # human-friendly TTL
if ( (my $s = shift) < 180000 ) {
my $h = int( ($s+180)/360 )/10;
- return "$s (${h}H)";
+ return "$s (${h}h)";
} else {
my $d = int( ($s+43200)/86400 );
- return "$s (${d}D)";
+ return "$s (${d}d)";
}
}
@@ -362,10 +362,12 @@
my $rcode = $header->rcode; # response code
my $na = $header->tc ? 'tc' : ''; # non-auth response
my $aa = $header->aa ? "aa $na" : $na; # authoritative answer
- my $question = ($packet->question)[0] || Net::DNS::Question->new(@_);
+ my ($question) = $packet->question;
my $qname = $question->qname;
+ my $qtype = $question->qtype;
my @answer = $packet->answer;
- foreach ( @answer ) { # print RR with status flags
+ my @rr = grep{$_->type !~ /^(NS|SOA)$/o} @answer; # almost ANY
+ foreach ( ($qtype eq 'ANY') ? @rr : @answer) { # print RR with status flags
my $string = $_->string; # display IPv6 compact form
$string =~ s/(:[:0]*:)(?!.*::|.+\1)/::/o if $_->type eq 'AAAA';
my $l = 95; # abbreviate long RR
@@ -424,9 +426,9 @@
@referral = grep{$_->type eq 'NS'} $packet->authority;
last if @ns = grep{$_->name =~ /^$domain$/i} @referral;
# IP (pre 0.59 compatibility)
- my ($q) = grep{$_->qtype eq 'PTR'} $packet->question;
- return NS($q->qname) if $q;
- ($_, $domain) = split /\./, $domain, 2; # strip leftmost label
+ my ($x) = grep{$_->qtype eq 'PTR'} $packet->question;
+ return NS($x->qname) if $x;
+ ($x, $domain) = split /\./, $domain, 2; # strip leftmost label
}
return @ns;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Net-DNS-0.60/lib/Net/DNS/Question.pm new/Net-DNS-0.61/lib/Net/DNS/Question.pm
--- old/Net-DNS-0.60/lib/Net/DNS/Question.pm 2007-06-21 16:40:00.000000000 +0200
+++ new/Net-DNS-0.61/lib/Net/DNS/Question.pm 2007-08-01 13:48:39.000000000 +0200
@@ -1,6 +1,6 @@
package Net::DNS::Question;
#
-# $Id: Question.pm 659 2007-06-21 14:26:19Z olaf $
+# $Id: Question.pm 673 2007-08-01 09:56:57Z olaf $
#
use strict;
BEGIN {
@@ -12,7 +12,7 @@
use Carp;
use Net::DNS;
-$VERSION = (qw$LastChangedRevision: 659 $)[1];
+$VERSION = (qw$LastChangedRevision: 673 $)[1];
=head1 NAME
@@ -44,10 +44,11 @@
sub new {
my $class = shift;
- my $qname = defined ($_ = shift) ? $_ : '';
+ my $qname = shift;
my $qtype = uc shift || 'A';
my $qclass = uc shift || 'IN';
+ $qname = '' unless defined $qname; # || ''; is NOT same!
$qname =~ s/\.+$//o; # strip gratuitous trailing dot
# Check if the caller has the type and class reversed.
@@ -57,9 +58,10 @@
and exists $Net::DNS::typesbyname{$qclass};
# if argument is an IP address, do appropriate reverse lookup
- if ( $qname =~ m/\d$|[:\/]/o ) {
- my $type = $qtype =~ m/^(A|AAAA)$/o ? 'PTR' : $qtype;
- ($qname, $qtype) = ($_, $type) if $_ = dns_addr($qname);
+ my $reverse = dns_addr($qname) if $qname =~ m/\d$|[:\/]/o;
+ if ( $reverse ) {
+ $qname = $reverse;
+ $qtype = 'PTR' if $qtype =~ m/^(A|AAAA)$/o;
}
my $self = { qname => $qname,
@@ -77,7 +79,8 @@
# If arg looks like IP4 address then map to in-addr.arpa space
if ( $arg =~ /((^|\d+\.)+\d+)($|\/(\d*))/o ) {
my @parse = split /\./, $1;
- my $last = ($_ = ($4 || @parse<<3)) > 24 ? 3 : ($_-1)>>3;
+ my $prefx = $4 || @parse<<3;
+ my $last = $prefx > 24 ? 3 : ($prefx-1)>>3;
return join '.', reverse( (@parse,(0)x3)[0 .. $last] ), 'in-addr.arpa';
}
@@ -85,8 +88,9 @@
if ( $arg =~ /^((\w*:)+)(\w*)($|\/(\d*))/o ) {
my @parse = split /:/, (reverse "0${1}0${3}"), 9;
my @xpand = map{/^$/ ? ('0')x(9-@parse) : $_} @parse;
+ my $prefx = $5 || @xpand<<4;
my $hex = pack 'A4'x8, map{$_.'000'} ('0')x(8-@xpand), @xpand;
- my $len = ($_ = ($5 || @xpand<<4)) > 124 ? 32 : ($_+3)>>2;
+ my $len = $prefx > 124 ? 32 : ($prefx+3)>>2;
return join '.', split(//, substr($hex,-$len) ), 'ip6.arpa';
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Net-DNS-0.60/lib/Net/DNS/Resolver/Base.pm new/Net-DNS-0.61/lib/Net/DNS/Resolver/Base.pm
--- old/Net-DNS-0.60/lib/Net/DNS/Resolver/Base.pm 2007-06-21 16:39:59.000000000 +0200
+++ new/Net-DNS-0.61/lib/Net/DNS/Resolver/Base.pm 2007-08-01 13:48:36.000000000 +0200
@@ -1,6 +1,6 @@
package Net::DNS::Resolver::Base;
#
-# $Id: Base.pm 630 2007-02-09 11:04:36Z olaf $
+# $Id: Base.pm 673 2007-08-01 09:56:57Z olaf $
#
use strict;
@@ -24,7 +24,7 @@
use Net::DNS;
use Net::DNS::Packet;
-$VERSION = (qw$LastChangedRevision: 630 $)[1];
+$VERSION = (qw$LastChangedRevision: 673 $)[1];
#
@@ -319,15 +319,13 @@
if (@_) {
my @a;
foreach my $ns (@_) {
- if ($ns =~ /^(\d+(:?\.\d+){0,3})$/) {
- if ( _ip_is_ipv4($ns) ) {
- push @a, ($1 eq '0') ? '0.0.0.0' : $1;
- }
-
- }
- elsif ( _ip_is_ipv6($ns) ) {
+
+ if ( _ip_is_ipv4($ns) ) {
+ push @a, ($ns eq '0') ? '0.0.0.0' : $ns;
+
+ } elsif ( _ip_is_ipv6($ns) ) {
push @a, ($ns eq '0') ? '::0' : $ns;
-
+
} else {
my $defres = Net::DNS::Resolver->new;
my @names;
@@ -1475,59 +1473,42 @@
return $sock;
}
-# The next two is lightweight versions of subroutines from Net::IP module
-
-sub _ip_is_ipv4 {
- $_ = shift;
-
- return 0 if !m/^[\d\.]+$/ || m/^\./ || m/\.$/;
-
-
- # Single Numbers are considered to be IPv4
- return 1 if m/^(\d+)$/ && $1 < 256;
- # Count quads
- my $n = tr/\./\./;
+# Lightweight versions of subroutines from Net::IP module, recoded to fix rt#28198
- # IPv4 must have from 1 to 4 quads
- # remember 1.1 expands to 1.0.0.1 and is legal.
- return 0 unless $n >= 0 && $n < 4 && !m/\.\./;
+sub _ip_is_ipv4 {
+ my @field = split /\./, shift;
- foreach (split /\./) { # Check for invalid quads
- return 0 unless $_ >= 0 && $_ < 256;
- }
+ return 0 if @field > 4; # too many fields
- 1;
+ foreach ( @field ) {
+ return 0 unless /./; # reject if empty
+ return 0 if /[^0-9]/; # reject non-digit
+ return 0 if $_ > 255; # reject bad value
+ }
+ return 1;
}
-sub _ip_is_ipv6 {
- $_ = shift;
-
- # Count octets
- my $n = tr/:/:/;
- return 0 unless $n > 0 && $n < 8;
-
- # Does the IP address start/finishes with : || have more than one '::' pattern ?
- return 0 if m/^:[^:]/ || m/[^:]:$/ || s/:(?=:)//g > 1;
- # $k is a counter
- my $k;
+sub _ip_is_ipv6 {
- foreach (split /:/) {
- $k++;
+ for ( shift ) {
+ my @field = split /:/; # split into fields
+ return 0 if (@field < 3) or (@field > 8);
- next unless $_; # Empty octet ?
-
- next if /^[a-f\d]{1,4}$/i; # Normal v6 octet ?
-
- if ($k == $n + 1) { # Last octet - is it IPv4 ?
- next if _ip_is_ipv4($_);
- }
+ return 0 if /::.*::/; # reject multiple ::
- return 0;
- }
+ if ( /\./ ) { # IPv6:IPv4
+ return 0 unless _ip_is_ipv4(pop @field);
+ }
- 1;
+ foreach ( @field ) {
+ next unless /./; # skip ::
+ return 0 if /[^0-9a-f]/i; # reject non-hexdigit
+ return 0 if length $_ > 4; # reject bad value
+ }
+ }
+ return 1;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Net-DNS-0.60/lib/Net/DNS.pm new/Net-DNS-0.61/lib/Net/DNS.pm
--- old/Net-DNS-0.60/lib/Net/DNS.pm 2007-06-21 16:40:00.000000000 +0200
+++ new/Net-DNS-0.61/lib/Net/DNS.pm 2007-08-01 13:48:39.000000000 +0200
@@ -1,7 +1,7 @@
package Net::DNS;
#
-# $Id: DNS.pm 654 2007-06-20 15:02:50Z olaf $
+# $Id: DNS.pm 673 2007-08-01 09:56:57Z olaf $
#
use strict;
@@ -43,8 +43,8 @@
@ISA = qw(Exporter DynaLoader);
- $VERSION = '0.60';
- $SVNVERSION = (qw$LastChangedRevision: 654 $)[1];
+ $VERSION = '0.61';
+ $SVNVERSION = (qw$LastChangedRevision: 673 $)[1];
$HAVE_XS = eval {
local $SIG{'__DIE__'} = 'DEFAULT';
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/Net-DNS-0.60/META.yml new/Net-DNS-0.61/META.yml
--- old/Net-DNS-0.60/META.yml 2007-06-21 19:43:37.000000000 +0200
+++ new/Net-DNS-0.61/META.yml 2007-08-01 13:50:28.000000000 +0200
@@ -1,17 +1,19 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
-name: Net-DNS
-version: 0.60
-version_from: lib/Net/DNS.pm
-installdirs: site
-requires:
+--- #YAML:1.0
+name: Net-DNS
+version: 0.61
+abstract: Perl DNS resolver module
+license: ~
+generated_by: ExtUtils::MakeMaker version 6.36
+distribution_type: module
+requires:
Digest::HMAC_MD5: 1
Digest::MD5: 2.12
IO::Socket: 0
MIME::Base64: 2.11
Net::IP: 1.2
Test::More: 0.18
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
-license: perl
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.2.html
+ version: 1.2
+author:
+ - Olaf Kolkman
participants (1)
-
root@Hilbert.suse.de