Hello community,

here is the log from the commit of package perl-Net-DNS for openSUSE:Factory 
checked in at 2017-08-29 11:36:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Net-DNS (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Net-DNS.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Net-DNS"

Tue Aug 29 11:36:55 2017 rev:48 rq:517968 version:1.12

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Net-DNS/perl-Net-DNS.changes        
2017-07-04 11:52:57.339291551 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Net-DNS.new/perl-Net-DNS.changes   
2017-08-29 11:36:56.912561479 +0200
@@ -1,0 +2,6 @@
+Sat Aug 19 05:53:41 UTC 2017 - co...@suse.com
+
+- updated to 1.12
+   see /usr/share/doc/packages/perl-Net-DNS/Changes
+
+-------------------------------------------------------------------

Old:
----
  Net-DNS-1.11.tar.gz

New:
----
  Net-DNS-1.12.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Net-DNS.spec ++++++
--- /var/tmp/diff_new_pack.lEoOSY/_old  2017-08-29 11:36:58.392353565 +0200
+++ /var/tmp/diff_new_pack.lEoOSY/_new  2017-08-29 11:36:58.412350755 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Net-DNS
-Version:        1.11
+Version:        1.12
 Release:        0
 %define cpan_name Net-DNS
 Summary:        Perl Interface to the Domain Name System
@@ -38,7 +38,7 @@
 Requires:       perl(Time::Local) >= 1.19
 Recommends:     perl(Digest::BubbleBabble) >= 0.01
 Recommends:     perl(Digest::GOST) >= 0.06
-Recommends:     perl(IO::Socket::IP) >= 0.32
+Recommends:     perl(IO::Socket::IP) >= 0.38
 Recommends:     perl(Net::LibIDN) >= 0.12
 Recommends:     perl(Scalar::Util) >= 1.25
 %{perl_requires}

++++++ Net-DNS-1.11.tar.gz -> Net-DNS-1.12.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.11/Changes new/Net-DNS-1.12/Changes
--- old/Net-DNS-1.11/Changes    2017-06-26 13:58:36.000000000 +0200
+++ new/Net-DNS-1.12/Changes    2017-08-18 12:20:26.000000000 +0200
@@ -1,4 +1,18 @@
-$Id: Changes 1581 2017-06-26 11:46:03Z willem $                       
-*-text-*-
+$Id: Changes 1592 2017-08-18 10:02:44Z willem $                       
-*-text-*-
+
+
+**** 1.12 Aug 18, 2017
+
+Fix rt.cpan.org #122586
+
+       Persistent UDP reports false timeouts
+
+Fix rt.cpan.org #122352
+
+       bgsend(): TCP retry can stall for IO::Socket::IP before 0.38
+
+Feature
+       CDS / CDNSKEY: Implement RFC8078 erratum 5049.
 
 
 **** 1.11 Jun 26, 2017
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.11/META.json new/Net-DNS-1.12/META.json
--- old/Net-DNS-1.11/META.json  2017-06-26 13:58:47.000000000 +0200
+++ new/Net-DNS-1.12/META.json  2017-08-18 12:20:39.000000000 +0200
@@ -34,7 +34,7 @@
          "recommends" : {
             "Digest::BubbleBabble" : "0.01",
             "Digest::GOST" : "0.06",
-            "IO::Socket::IP" : "0.32",
+            "IO::Socket::IP" : "0.38",
             "Net::LibIDN" : "0.12",
             "Scalar::Util" : "1.25"
          },
@@ -52,6 +52,6 @@
       }
    },
    "release_status" : "stable",
-   "version" : "1.11",
+   "version" : "1.12",
    "x_serialization_backend" : "JSON::PP version 2.27400"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.11/META.yml new/Net-DNS-1.12/META.yml
--- old/Net-DNS-1.11/META.yml   2017-06-26 13:58:47.000000000 +0200
+++ new/Net-DNS-1.12/META.yml   2017-08-18 12:20:39.000000000 +0200
@@ -20,7 +20,7 @@
 recommends:
   Digest::BubbleBabble: '0.01'
   Digest::GOST: '0.06'
-  IO::Socket::IP: '0.32'
+  IO::Socket::IP: '0.38'
   Net::LibIDN: '0.12'
   Scalar::Util: '1.25'
 requires:
@@ -33,5 +33,5 @@
   Test::More: '0.52'
   Time::Local: '1.19'
   perl: '5.006'
-version: '1.11'
+version: '1.12'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.011'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.11/Makefile.PL new/Net-DNS-1.12/Makefile.PL
--- old/Net-DNS-1.11/Makefile.PL        2017-06-26 13:58:36.000000000 +0200
+++ new/Net-DNS-1.12/Makefile.PL        2017-08-18 12:20:26.000000000 +0200
@@ -1,5 +1,5 @@
 #
-# $Id: Makefile.PL 1573 2017-06-12 11:03:59Z willem $  -*-perl-*-
+# $Id: Makefile.PL 1591 2017-08-18 09:58:18Z willem $  -*-perl-*-
 #
 
 
@@ -61,7 +61,7 @@
        'Digest::BubbleBabble' => 0.01,
        'Digest::GOST'         => 0.06,
        'IO::Socket::INET6'    => 2.51,
-       'IO::Socket::IP'       => 0.32,
+       'IO::Socket::IP'       => 0.38,
        'Net::LibIDN'          => 0.12,
        'Scalar::Util'         => 1.25,
        );
@@ -84,6 +84,16 @@
 
 delete $optional{'IO::Socket::INET6'} if USE_SOCKET_IP;                # 
exclude redundant dependency
 
+print <<EOT if !USE_SOCKET_IP && USE_SOCKET_INET6;
+#
+#      This Net::DNS installation uses the IO::Socket::INET6 package
+#      which has been superseded by IO::Socket::IP.
+#
+#      IPv6 support using IO::Socket::INET6 will be discontinued in
+#      a future release.
+#
+EOT
+
 
 # clean up existing makefile
 unlink('Makefile');
@@ -223,14 +233,14 @@
        my %install_type = qw(perl INSTALLPRIVLIB site INSTALLSITELIB vendor 
INSTALLVENDORLIB);
        my $install_site = join '', '$(DESTDIR)$(', 
$install_type{$self->{INSTALLDIRS}}, ')';
        for ($install_site) {
-               s/\$\(([A-Z_]+)\)/$self->{$1}/g while /\$\(/;   # expand 
Makefile macros
+               s/\$\(([A-Z_]+)\)/$self->{$1}/eg while /\$\(/;  # expand 
Makefile macros
                s|([/])[/]+|$1|g;                               # remove 
gratuitous //s
        }
 
-       eval { require Net::DNS };
+       eval 'require Net::DNS';
 
        my $nameregex = '\W+Net\WDNS.pm$';
-       my @installed = grep $_ =~ m/$nameregex/i, values %INC;
+       my @installed = grep m/$nameregex/io, values %INC;
        my %noinstall;
 
        foreach (@installed) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.11/lib/Net/DNS/Packet.pm 
new/Net-DNS-1.12/lib/Net/DNS/Packet.pm
--- old/Net-DNS-1.11/lib/Net/DNS/Packet.pm      2017-06-26 13:58:36.000000000 
+0200
+++ new/Net-DNS-1.12/lib/Net/DNS/Packet.pm      2017-08-18 12:20:26.000000000 
+0200
@@ -1,9 +1,9 @@
 package Net::DNS::Packet;
 
 #
-# $Id: Packet.pm 1546 2017-03-06 09:27:31Z willem $
+# $Id: Packet.pm 1584 2017-07-28 16:15:17Z willem $
 #
-our $VERSION = (qw$LastChangedRevision: 1546 $)[1];
+our $VERSION = (qw$LastChangedRevision: 1584 $)[1];
 
 
 =head1 NAME
@@ -727,7 +727,7 @@
 to truncate the packet and set the TC bit according to the rules of
 RFC2181 Section 9.
 
-The minimum maximum length that is honoured is 512 octets.
+The smallest length limit that is honoured is 512 octets.
 
 =cut
 
@@ -760,8 +760,7 @@
        $size = UDPSZ unless $size > UDPSZ;
        $size -= $sigrr->_size if $sigrr;
 
-       my $data = pack 'x' x 12;                               # header 
placeholder
-       my $hdsz = length $data;
+       my $data = pack 'x' x HEADER_LENGTH;                    # header 
placeholder
        $self->{count} = [];
 
        my $tc;
@@ -810,7 +809,7 @@
 
        my @part = qw(question answer authority additional);
        my @size = map scalar( @{$self->{$_}} ), @part;
-       pack 'n6 a*', $self->header->id, $self->{status}, @size, substr( $data, 
$hdsz );
+       pack 'n6 a*', $self->header->id, $self->{status}, @size, substr( $data, 
HEADER_LENGTH );
 }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.11/lib/Net/DNS/RR/CDNSKEY.pm 
new/Net-DNS-1.12/lib/Net/DNS/RR/CDNSKEY.pm
--- old/Net-DNS-1.11/lib/Net/DNS/RR/CDNSKEY.pm  2017-06-26 13:58:36.000000000 
+0200
+++ new/Net-DNS-1.12/lib/Net/DNS/RR/CDNSKEY.pm  2017-08-18 12:20:26.000000000 
+0200
@@ -1,9 +1,9 @@
 package Net::DNS::RR::CDNSKEY;
 
 #
-# $Id: CDNSKEY.pm 1580 2017-06-26 11:44:49Z willem $
+# $Id: CDNSKEY.pm 1586 2017-08-15 09:01:57Z willem $
 #
-our $VERSION = (qw$LastChangedRevision: 1580 $)[1];
+our $VERSION = (qw$LastChangedRevision: 1586 $)[1];
 
 
 use strict;
@@ -20,28 +20,18 @@
 use integer;
 
 
-sub _encode_rdata {                    ## encode rdata as wire-format octet 
string
-       my $self = shift;
-
-       return $self->SUPER::_encode_rdata() if $self->{algorithm};
-       return defined $self->{algorithm} ? pack( 'xxH*x', '03' ) : '';
+sub algorithm {
+       my ( $self, $arg ) = @_;
+       return $self->SUPER::algorithm($arg) if $arg;
+       return $self->SUPER::algorithm() unless defined $arg;
+       @{$self}{qw(flags protocol algorithm)} = ( 0, 3, 0 );
 }
 
 
-sub _format_rdata {                    ## format rdata portion of RR string.
+sub key {
        my $self = shift;
-
-       return $self->SUPER::_format_rdata() if $self->{algorithm};
-       return defined $self->{algorithm} ? '0 3 0 0' : '';
-}
-
-
-sub algorithm {
-       my ( $self, $arg ) = @_;
-
-       return $self->SUPER::algorithm($arg) if $arg;
-       @{$self}{qw(flags protocol algorithm keybin)} = ( 0, 3, 0, '' ) if 
defined $arg;
-       return $self->SUPER::algorithm();
+       return $self->SUPER::key(@_) unless defined( $_[0] ) && length( $_[0] ) 
< 2;
+       return $self->SUPER::keybin( $_[0] ? '' : chr(0) );
 }
 
 
@@ -104,6 +94,6 @@
 
 =head1 SEE ALSO
 
-L<perl>, L<Net::DNS>, L<Net::DNS::RR>, L<Net::DNS::RR::DNSKEY>, RFC7344, 
RFC8087
+L<perl>, L<Net::DNS>, L<Net::DNS::RR>, L<Net::DNS::RR::DNSKEY>, RFC7344, 
RFC8078(erratum 5049)
 
 =cut
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.11/lib/Net/DNS/RR/CDS.pm 
new/Net-DNS-1.12/lib/Net/DNS/RR/CDS.pm
--- old/Net-DNS-1.11/lib/Net/DNS/RR/CDS.pm      2017-06-26 13:58:36.000000000 
+0200
+++ new/Net-DNS-1.12/lib/Net/DNS/RR/CDS.pm      2017-08-18 12:20:26.000000000 
+0200
@@ -1,9 +1,9 @@
 package Net::DNS::RR::CDS;
 
 #
-# $Id: CDS.pm 1580 2017-06-26 11:44:49Z willem $
+# $Id: CDS.pm 1586 2017-08-15 09:01:57Z willem $
 #
-our $VERSION = (qw$LastChangedRevision: 1580 $)[1];
+our $VERSION = (qw$LastChangedRevision: 1586 $)[1];
 
 
 use strict;
@@ -20,36 +20,24 @@
 use integer;
 
 
-sub _encode_rdata {                    ## encode rdata as wire-format octet 
string
-       my $self = shift;
-
-       return $self->SUPER::_encode_rdata() if $self->{algorithm};
-       return defined $self->{algorithm} ? pack 'x4' : '';
-}
-
-
-sub _format_rdata {                    ## format rdata portion of RR string.
-       my $self = shift;
-
-       return $self->SUPER::_format_rdata() if $self->{algorithm};
-       return defined $self->{algorithm} ? '0 0 0 0' : '';
-}
-
-
 sub algorithm {
        my ( $self, $arg ) = @_;
-
        return $self->SUPER::algorithm($arg) if $arg;
-       @{$self}{qw(keytag algorithm digtype digestbin)} = ( 0, 0, 0, '' ) if 
defined $arg;
-       return $self->SUPER::algorithm();
+       return $self->SUPER::algorithm() unless defined $arg;
+       @{$self}{qw(keytag algorithm digtype)} = ( 0, 0, 0 );
 }
 
 
 sub digtype {
        my ( $self, $arg ) = @_;
+       $self->SUPER::digtype( $arg ? $arg : () );
+}
+
 
-       return $self->SUPER::digtype($arg) if $arg;
-       return $self->SUPER::digtype();
+sub digest {
+       my $self = shift;
+       return $self->SUPER::digest(@_) unless defined( $_[0] ) && length( 
$_[0] ) < 2;
+       return $self->SUPER::digestbin( $_[0] ? '' : chr(0) );
 }
 
 
@@ -112,6 +100,6 @@
 
 =head1 SEE ALSO
 
-L<perl>, L<Net::DNS>, L<Net::DNS::RR>, L<Net::DNS::RR::DS>, RFC7344, RFC8087
+L<perl>, L<Net::DNS>, L<Net::DNS::RR>, L<Net::DNS::RR::DS>, RFC7344, 
RFC8078(erratum 5049)
 
 =cut
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.11/lib/Net/DNS/RR/CERT.pm 
new/Net-DNS-1.12/lib/Net/DNS/RR/CERT.pm
--- old/Net-DNS-1.11/lib/Net/DNS/RR/CERT.pm     2017-06-26 13:58:36.000000000 
+0200
+++ new/Net-DNS-1.12/lib/Net/DNS/RR/CERT.pm     2017-08-18 12:20:26.000000000 
+0200
@@ -1,9 +1,9 @@
 package Net::DNS::RR::CERT;
 
 #
-# $Id: CERT.pm 1567 2017-05-19 09:52:52Z willem $
+# $Id: CERT.pm 1582 2017-07-07 21:45:14Z willem $
 #
-our $VERSION = (qw$LastChangedRevision: 1567 $)[1];
+our $VERSION = (qw$LastChangedRevision: 1582 $)[1];
 
 
 use strict;
@@ -42,7 +42,7 @@
 #
 {
        my @algbyname = (
-               'DELETE'             => 0,                      # 
[RFC4034][RFC4398][RFC8087]
+               'DELETE'             => 0,                      # 
[RFC4034][RFC4398][RFC8078]
                'RSAMD5'             => 1,                      # 
[RFC3110][RFC4034]
                'DH'                 => 2,                      # [RFC2539]
                'DSA'                => 3,                      # 
[RFC3755][RFC2536]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.11/lib/Net/DNS/RR/DNSKEY.pm 
new/Net-DNS-1.12/lib/Net/DNS/RR/DNSKEY.pm
--- old/Net-DNS-1.11/lib/Net/DNS/RR/DNSKEY.pm   2017-06-26 13:58:36.000000000 
+0200
+++ new/Net-DNS-1.12/lib/Net/DNS/RR/DNSKEY.pm   2017-08-18 12:20:26.000000000 
+0200
@@ -1,9 +1,9 @@
 package Net::DNS::RR::DNSKEY;
 
 #
-# $Id: DNSKEY.pm 1567 2017-05-19 09:52:52Z willem $
+# $Id: DNSKEY.pm 1586 2017-08-15 09:01:57Z willem $
 #
-our $VERSION = (qw$LastChangedRevision: 1567 $)[1];
+our $VERSION = (qw$LastChangedRevision: 1586 $)[1];
 
 
 use strict;
@@ -28,7 +28,7 @@
 #
 {
        my @algbyname = (
-               'DELETE'             => 0,                      # 
[RFC4034][RFC4398][RFC8087]
+               'DELETE'             => 0,                      # 
[RFC4034][RFC4398][RFC8078]
                'RSAMD5'             => 1,                      # 
[RFC3110][RFC4034]
                'DH'                 => 2,                      # [RFC2539]
                'DSA'                => 3,                      # 
[RFC3755][RFC2536]
@@ -54,7 +54,7 @@
 
        my %algbyval = reverse @algbyname;
 
-       my @algrehash = map /^\d/ ? ($_) x 3 : do { s/[\W]//g; uc($_) }, 
@algbyname;
+       my @algrehash = map /^\d/ ? ($_) x 3 : do { s/[\W_]//g; uc($_) }, 
@algbyname;
        my %algbyname = @algrehash;    # work around broken cperl
 
        sub _algbyname {
@@ -77,15 +77,16 @@
        my $self = shift;
        my ( $data, $offset ) = @_;
 
-       my $keylength = $self->{rdlength} - 4;
-       @{$self}{qw(flags protocol algorithm keybin)} = unpack "\@$offset n C2 
a$keylength", $$data;
+       my $rdata = substr $$data, $offset, $self->{rdlength};
+       $self->{keybin} = unpack '@4 a*', $rdata;
+       @{$self}{qw(flags protocol algorithm)} = unpack 'n C*', $rdata;
 }
 
 
 sub _encode_rdata {                    ## encode rdata as wire-format octet 
string
        my $self = shift;
 
-       return '' unless $self->{algorithm};
+       return '' unless defined $self->{algorithm};
        pack 'n C2 a*', @{$self}{qw(flags protocol algorithm keybin)};
 }
 
@@ -93,20 +94,22 @@
 sub _format_rdata {                    ## format rdata portion of RR string.
        my $self = shift;
 
-       return '' unless $self->{algorithm};
-       $self->_annotation( 'Key ID =', $self->keytag );
+       my $algorithm = $self->{algorithm};
+       return '' unless defined $algorithm;
+       $self->_annotation( 'Key ID =', $self->keytag ) if $algorithm;
        return $self->SUPER::_format_rdata() unless BASE64;
-       my @base64 = split /\s+/, MIME::Base64::encode( $self->{keybin} );
-       my @rdata = ( @{$self}{qw(flags protocol algorithm)}, @base64 );
+       my @base64 = split /\s+/, MIME::Base64::encode( $self->{keybin} ) || 
'-';
+       my @rdata = ( @{$self}{qw(flags protocol)}, $algorithm, @base64 );
 }
 
 
 sub _parse_rdata {                     ## populate RR from rdata in argument 
list
        my $self = shift;
 
-       $self->flags(shift);
+       my $flags = shift;              ## avoid destruction by CDNSKEY 
algorithm(0)
        $self->protocol(shift);
-       return unless $self->algorithm(shift);
+       $self->algorithm(shift);
+       $self->flags($flags);
        $self->key(@_);
 }
 
@@ -171,7 +174,7 @@
 
        unless ( ref($self) ) {         ## class method or simple function
                my $argn = pop;
-               return $argn =~ /[^0-9]/ ? _algbyname($argn) : _algbyval($argn);
+               return $argn =~ /\D/ ? _algbyname($argn) : _algbyval($argn);
        }
 
        return $self->{algorithm} unless defined $arg;
@@ -182,9 +185,8 @@
 
 sub key {
        my $self = shift;
-
-       $self->keybin( MIME::Base64::decode( join "", @_ ) ) if scalar @_;
-       MIME::Base64::encode( $self->keybin(), "" ) if defined wantarray;
+       return MIME::Base64::encode( $self->keybin(), "" ) unless scalar @_;
+       $self->keybin( MIME::Base64::decode( join "", @_ ) );
 }
 
 
@@ -196,7 +198,7 @@
 }
 
 
-sub publickey { &key; }
+sub publickey { shift->key(@_); }
 
 
 sub privatekeyname {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.11/lib/Net/DNS/RR/DS.pm 
new/Net-DNS-1.12/lib/Net/DNS/RR/DS.pm
--- old/Net-DNS-1.11/lib/Net/DNS/RR/DS.pm       2017-06-26 13:58:36.000000000 
+0200
+++ new/Net-DNS-1.12/lib/Net/DNS/RR/DS.pm       2017-08-18 12:20:26.000000000 
+0200
@@ -1,9 +1,9 @@
 package Net::DNS::RR::DS;
 
 #
-# $Id: DS.pm 1567 2017-05-19 09:52:52Z willem $
+# $Id: DS.pm 1586 2017-08-15 09:01:57Z willem $
 #
-our $VERSION = (qw$LastChangedRevision: 1567 $)[1];
+our $VERSION = (qw$LastChangedRevision: 1586 $)[1];
 
 
 use strict;
@@ -39,7 +39,7 @@
 #
 {
        my @algbyname = (
-               'DELETE'             => 0,                      # 
[RFC4034][RFC4398][RFC8087]
+               'DELETE'             => 0,                      # 
[RFC4034][RFC4398][RFC8078]
                'RSAMD5'             => 1,                      # 
[RFC3110][RFC4034]
                'DH'                 => 2,                      # [RFC2539]
                'DSA'                => 3,                      # 
[RFC3755][RFC2536]
@@ -65,7 +65,7 @@
 
        my %algbyval = reverse @algbyname;
 
-       my @algrehash = map /^\d/ ? ($_) x 3 : do { s/[\W]//g; uc($_) }, 
@algbyname;
+       my @algrehash = map /^\d/ ? ($_) x 3 : do { s/[\W_]//g; uc($_) }, 
@algbyname;
        my %algbyname = @algrehash;    # work around broken cperl
 
        sub _algbyname {
@@ -101,8 +101,8 @@
 
        my %digestbyval = reverse @digestbyname;
 
-       my @digestrehash = map /^\d/ ? ($_) x 3 : do { s/[\W]//g; uc($_) }, 
@digestbyname, @digestalias;
-       my %digestbyname = @digestrehash;                       # work around 
broken cperl
+       my @digestrehash = map /^\d/ ? ($_) x 3 : do { s/[\W_]//g; uc($_) }, 
@digestbyname;
+       my %digestbyname = ( @digestalias, @digestrehash );     # work around 
broken cperl
 
        sub _digestbyname {
                my $arg = shift;
@@ -124,15 +124,16 @@
        my $self = shift;
        my ( $data, $offset ) = @_;
 
-       my $length = $self->{rdlength} - 4;
-       @{$self}{qw(keytag algorithm digtype digestbin)} = unpack "\@$offset n 
C2 a$length", $$data;
+       my $rdata = substr $$data, $offset, $self->{rdlength};
+       $self->{digestbin} = unpack '@4 a*', $rdata;
+       @{$self}{qw(keytag algorithm digtype)} = unpack 'n C*', $rdata;
 }
 
 
 sub _encode_rdata {                    ## encode rdata as wire-format octet 
string
        my $self = shift;
 
-       return '' unless $self->{algorithm};
+       return '' unless defined $self->{algorithm};
        pack 'n C2 a*', @{$self}{qw(keytag algorithm digtype digestbin)};
 }
 
@@ -140,9 +141,9 @@
 sub _format_rdata {                    ## format rdata portion of RR string.
        my $self = shift;
 
-       return '' unless $self->{algorithm};
-       $self->_annotation( $self->babble ) if BABBLE;
-       my @digest = split /(\S{64})/, $self->digest;
+       return '' unless defined $self->{algorithm};
+       $self->_annotation( $self->babble ) if BABBLE && $self->{algorithm};
+       my @digest = split /(\S{64})/, $self->digest || '-';
        my @rdata = ( @{$self}{qw(keytag algorithm digtype)}, @digest );
 }
 
@@ -150,8 +151,9 @@
 sub _parse_rdata {                     ## populate RR from rdata in argument 
list
        my $self = shift;
 
-       $self->keytag(shift);
-       return unless $self->algorithm(shift);
+       my $keytag = shift;             ## avoid destruction by CDS algorithm(0)
+       $self->algorithm(shift);
+       $self->keytag($keytag);
        $self->digtype(shift);
        $self->digest(@_);
 }
@@ -195,10 +197,8 @@
 
 sub digest {
        my $self = shift;
-       my @args = map { /[^0-9A-Fa-f]/ ? croak "corrupt hexadecimal" : $_ } @_;
-
-       $self->digestbin( pack "H*", join "", @args ) if scalar @args;
-       unpack "H*", $self->digestbin() if defined wantarray;
+       return unpack "H*", $self->digestbin() unless scalar @_;
+       $self->digestbin( pack "H*", map /[^\dA-F]/i ? croak "corrupt hex" : 
$_, join "", @_ );
 }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.11/lib/Net/DNS/RR/RRSIG.pm 
new/Net-DNS-1.12/lib/Net/DNS/RR/RRSIG.pm
--- old/Net-DNS-1.11/lib/Net/DNS/RR/RRSIG.pm    2017-06-26 13:58:36.000000000 
+0200
+++ new/Net-DNS-1.12/lib/Net/DNS/RR/RRSIG.pm    2017-08-18 12:20:26.000000000 
+0200
@@ -1,9 +1,9 @@
 package Net::DNS::RR::RRSIG;
 
 #
-# $Id: RRSIG.pm 1567 2017-05-19 09:52:52Z willem $
+# $Id: RRSIG.pm 1582 2017-07-07 21:45:14Z willem $
 #
-our $VERSION = (qw$LastChangedRevision: 1567 $)[1];
+our $VERSION = (qw$LastChangedRevision: 1582 $)[1];
 
 
 use strict;
@@ -91,7 +91,7 @@
 #
 {
        my @algbyname = (
-               'DELETE'             => 0,                      # 
[RFC4034][RFC4398][RFC8087]
+               'DELETE'             => 0,                      # 
[RFC4034][RFC4398][RFC8078]
                'RSAMD5'             => 1,                      # 
[RFC3110][RFC4034]
                'DH'                 => 2,                      # [RFC2539]
                'DSA'                => 3,                      # 
[RFC3755][RFC2536]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.11/lib/Net/DNS/RR/SIG.pm 
new/Net-DNS-1.12/lib/Net/DNS/RR/SIG.pm
--- old/Net-DNS-1.11/lib/Net/DNS/RR/SIG.pm      2017-06-26 13:58:36.000000000 
+0200
+++ new/Net-DNS-1.12/lib/Net/DNS/RR/SIG.pm      2017-08-18 12:20:26.000000000 
+0200
@@ -15,9 +15,9 @@
 package Net::DNS::RR::SIG;
 
 #
-# $Id: SIG.pm 1567 2017-05-19 09:52:52Z willem $
+# $Id: SIG.pm 1582 2017-07-07 21:45:14Z willem $
 #
-our $VERSION = (qw$LastChangedRevision: 1567 $)[1];
+our $VERSION = (qw$LastChangedRevision: 1582 $)[1];
 
 
 use strict;
@@ -123,7 +123,7 @@
 #
 {
        my @algbyname = (
-               'DELETE'             => 0,                      # 
[RFC4034][RFC4398][RFC8087]
+               'DELETE'             => 0,                      # 
[RFC4034][RFC4398][RFC8078]
                'RSAMD5'             => 1,                      # 
[RFC3110][RFC4034]
                'DH'                 => 2,                      # [RFC2539]
                'DSA'                => 3,                      # 
[RFC3755][RFC2536]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.11/lib/Net/DNS/Resolver/Base.pm 
new/Net-DNS-1.12/lib/Net/DNS/Resolver/Base.pm
--- old/Net-DNS-1.11/lib/Net/DNS/Resolver/Base.pm       2017-06-26 
13:58:36.000000000 +0200
+++ new/Net-DNS-1.12/lib/Net/DNS/Resolver/Base.pm       2017-08-18 
12:20:26.000000000 +0200
@@ -1,9 +1,9 @@
 package Net::DNS::Resolver::Base;
 
 #
-# $Id: Base.pm 1573 2017-06-12 11:03:59Z willem $
+# $Id: Base.pm 1588 2017-08-17 12:41:15Z willem $
 #
-our $VERSION = (qw$LastChangedRevision: 1573 $)[1];
+our $VERSION = (qw$LastChangedRevision: 1588 $)[1];
 
 
 #
@@ -293,8 +293,6 @@
                                push @iplist, _cname_addr( $packet, $names );
                        }
 
-                       $self->errorstring( $defres->errorstring );
-
                        my %unique = map( ( $_ => $_ ), @iplist );
 
                        my @address = values(%unique);          # tainted
@@ -358,8 +356,9 @@
 
 sub errorstring {
        my $self = shift;
-       $self->{errorstring} = shift if scalar @_;
-       return $self->{errorstring};
+       my $text = shift || return $self->{errorstring};
+       $self->_diag( 'errorstring:', $text );
+       return $self->{errorstring} = $text;
 }
 
 
@@ -420,11 +419,11 @@
 
 
 sub _send_tcp {
-       my ( $self, $packet, $packet_data ) = @_;
+       my ( $self, $query, $query_data ) = @_;
 
        $self->_reset_errorstring;
 
-       my $tcp_packet = pack 'n a*', length($packet_data), $packet_data;
+       my $tcp_packet = pack 'n a*', length($query_data), $query_data;
        my @ns = $self->nameservers();
        my $lastanswer;
        my $timeout = $self->{tcp_timeout};
@@ -444,31 +443,32 @@
                $self->answerfrom($ip);
                $self->_diag( 'answer from', "[$ip]", length($buffer), 'bytes' 
);
 
-               my $ans = $self->_decode_reply( \$buffer, $packet ) || next;
-
-               $ans->answerfrom($ip);
-               $lastanswer = $ans;
+               my $reply = Net::DNS::Packet->decode( \$buffer, $self->{debug} 
);
+               $self->errorstring($@);
+               next unless $self->_accept_reply( $reply, $query );
+               $reply->answerfrom($ip);
 
-               my $rcode = $ans->header->rcode;
-               last if $rcode eq 'NOERROR';
-               last if $rcode eq 'NXDOMAIN';
-               $self->errorstring($rcode);
-       }
+               if ( $self->{tsig_rr} && !$reply->verify($query) ) {
+                       $self->errorstring( $reply->verifyerr );
+                       next;
+               }
 
-       return unless $lastanswer;
+               $lastanswer = $reply;
 
-       if ( $self->{tsig_rr} && !$lastanswer->verify($packet) ) {
-               $self->_diag( $self->errorstring( $lastanswer->verifyerr ) );
-               return;
+               my $rcode = $reply->header->rcode;
+               $self->errorstring($rcode);                     # historical 
quirk
+               return $reply if $rcode eq 'NOERROR';
+               return $reply if $rcode eq 'NXDOMAIN';
        }
 
-       $self->errorstring( $lastanswer->header->rcode );       # historical 
quirk
+       $self->{errorstring} = $lastanswer->header->rcode if $lastanswer;
+       $self->errorstring('query timed out') unless $self->{errorstring};
        return $lastanswer;
 }
 
 
 sub _send_udp {
-       my ( $self, $packet, $packet_data ) = @_;
+       my ( $self, $query, $query_data ) = @_;
 
        $self->_reset_errorstring;
 
@@ -476,7 +476,6 @@
        my $port    = $self->{port};
        my $retrans = $self->{retrans} || 1;
        my $retry   = $self->{retry} || 1;
-       my $select  = IO::Select->new();
        my $servers = scalar(@ns);
        my $timeout = $servers ? do { no integer; $retrans / $servers } : 0;
        my $lastanswer;
@@ -485,9 +484,11 @@
 RETRY: for ( 1 .. $retry ) {                                   # assumed to be 
a small number
 
                # Try each nameserver.
+               my $select = IO::Select->new();
+
 NAMESERVER: foreach my $ns (@ns) {
 
-                       # Construct an array of 3 element arrays
+                       # state vector replaces corresponding element of @ns 
array
                        unless ( ref $ns ) {
                                my $socket = $self->_create_udp_socket($ns) || 
next;
                                my $dst_sockaddr = $self->_create_dst_sockaddr( 
$ns, $port );
@@ -499,53 +500,53 @@
 
                        $self->_diag( 'udp send', "[$ip]:$port" );
 
-                       $socket->send( $packet_data, 0, $dst_sockaddr );
+                       $select->add($socket);
+                       $socket->send( $query_data, 0, $dst_sockaddr );
                        $self->errorstring( $$ns[3] = $! );
 
                        # handle failure to detect taint inside socket->send()
                        die 'Insecure dependency while running with -T switch'
                                        if TESTS && 
Scalar::Util::tainted($dst_sockaddr);
 
-                       $select->add($socket);
-
+                       my $reply;
                        while ( my ($socket) = $select->can_read($timeout) ) {
-                               $select->remove($socket);
-
                                my $peer = $socket->peerhost;
                                $self->answerfrom($peer);
 
                                my $buffer = _read_udp( $socket, 
$self->_packetsz );
                                $self->_diag( "answer from [$peer]", 
length($buffer), 'bytes' );
 
-                               my $ans = $self->_decode_reply( \$buffer, 
$packet ) || next;
-
-                               $ans->answerfrom($peer);
-                               $lastanswer = $ans;
-
-                               my $rcode = $ans->header->rcode;
-                               last if $rcode eq 'NOERROR';
-                               last if $rcode eq 'NXDOMAIN';
+                               my $packet = Net::DNS::Packet->decode( 
\$buffer, $self->{debug} );
+                               $self->errorstring($@);
+                               next unless $self->_accept_reply( $packet, 
$query );
+                               $reply = $packet;
+                               $reply->answerfrom($peer);
+                               last;
+                       }                                       #SELECT LOOP
 
-                               $self->errorstring( $$ns[3] = $rcode );
-                       }                                       #SELECTOR LOOP
+                       next unless $reply;
 
-                       next unless $lastanswer;
-
-                       if ( $self->{tsig_rr} && !$lastanswer->verify($packet) 
) {
-                               my $error = $$ns[3] = $lastanswer->verifyerr;
-                               $self->_diag( $self->errorstring($error) );
+                       if ( $self->{tsig_rr} && !$reply->verify($query) ) {
+                               $self->errorstring( $$ns[3] = $reply->verifyerr 
);
                                next;
                        }
 
-                       $self->errorstring( $lastanswer->header->rcode );    # 
historical quirk
-                       return $lastanswer;
+                       $lastanswer = $reply;
+
+                       my $rcode = $reply->header->rcode;
+                       $self->errorstring($rcode);             # historical 
quirk
+                       return $reply if $rcode eq 'NOERROR';
+                       return $reply if $rcode eq 'NXDOMAIN';
+                       $$ns[3] = $rcode;
                }                                               #NAMESERVER LOOP
+
                no integer;
                $timeout += $timeout;
        }                                                       #RETRY LOOP
 
-       $self->_diag( $self->errorstring('query timed out') ) unless 
$lastanswer;
-       return;
+       $self->{errorstring} = $lastanswer->header->rcode if $lastanswer;
+       $self->errorstring('query timed out') unless $self->{errorstring};
+       return $lastanswer;
 }
 
 
@@ -582,7 +583,6 @@
                return $socket;
        }
 
-       $self->_diag( $self->errorstring );
        return undef;
 }
 
@@ -612,7 +612,6 @@
                return $socket;
        }
 
-       $self->_diag( $self->errorstring );
        return undef;
 }
 
@@ -648,9 +647,8 @@
 
 
 sub bgread {
-       my ( $self, $handle ) = @_;
        while (&bgbusy) {                                       # side effect: 
TCP retry
-               IO::Select->new($handle)->can_read(0.02);       # cut CPU by 3 
orders of magnitude
+               IO::Select->new( $_[1] )->can_read(0.02);       # use 3 orders 
of magnitude less CPU
        }
        &_bgread;
 }
@@ -673,7 +671,10 @@
        my $buffer = $dgram ? _read_udp( $handle, $self->_packetsz ) : 
_read_tcp($handle);
        $self->_diag( "answer from [$peer]", length($buffer), 'bytes' );
 
-       my $reply = $self->_decode_reply( \$buffer, $query ) || return;
+       my $reply = Net::DNS::Packet->decode( \$buffer, $self->{debug} );
+       $self->errorstring($@);
+       return unless $self->_accept_reply( $reply, $query );
+       $reply->answerfrom($peer);
 
        return $reply unless $self->{tsig_rr} && !$reply->verify($query);
        $self->errorstring( $reply->verifyerr );
@@ -681,19 +682,16 @@
 }
 
 
-sub _decode_reply {
-       my ( $self, $bufref, $query ) = @_;
-
-       my $reply = Net::DNS::Packet->decode( $bufref, $self->{debug} );
-       $self->errorstring($@);
+sub _accept_reply {
+       my ( $self, $reply, $query ) = @_;
 
        return unless $reply;
 
        my $header = $reply->header;
        return unless $header->qr;
 
-       return $reply unless $query;                            # SpamAssassin 
3.4.1 workaround
-       return ( $header->id != $query->header->id ) ? undef : $reply;
+       return 1 unless $query;                                 # SpamAssassin 
3.4.1 workaround
+       return $header->id == $query->header->id;
 }
 
 
@@ -896,8 +894,8 @@
                                unless USE_SOCKET_INET6 && $ip6_addr;
        }
 
-       $self->{persistent}{$sock_key} = $self->{persistent_tcp} ? $socket : 
undef;
        $self->errorstring("no socket $sock_key $!") unless $socket;
+       $self->{persistent}{$sock_key} = $self->{persistent_tcp} ? $socket : 
undef;
        return $socket;
 }
 
@@ -937,8 +935,8 @@
                                unless USE_SOCKET_INET6 && $ip6_addr;
        }
 
-       $self->{persistent}{$sock_key} = $self->{persistent_udp} ? $socket : 
undef;
        $self->errorstring("no socket $sock_key $!") unless $socket;
+       $self->{persistent}{$sock_key} = $self->{persistent_udp} ? $socket : 
undef;
        return $socket;
 }
 
@@ -959,20 +957,14 @@
        }
                if USE_SOCKET_IP;
 
-BEGIN {
-       import Socket6 qw(AI_NUMERICHOST) if USE_SOCKET_INET6;
-}
-
-my @inet6 = ( AF_INET6, SOCK_DGRAM, 0, AI_NUMERICHOST ) if USE_SOCKET_INET6;
+my $inet6 = [AF_INET6, SOCK_DGRAM, 0, Socket6::AI_NUMERICHOST()] if 
USE_SOCKET_INET6;
 
 sub _create_dst_sockaddr {             ## create UDP destination sockaddr 
structure
        my ( $self, $ip, $port ) = @_;
 
        unless (USE_SOCKET_IP) {
-               return ( Socket6::getaddrinfo( $ip, $port, @inet6 ) )[3]
-                               if USE_SOCKET_INET6 && _ipv6($ip);
-
-               return sockaddr_in( $port, inet_aton($ip) );    # NB: errors 
raised in socket->send
+               return sockaddr_in( $port, inet_aton($ip) ) unless _ipv6($ip);
+               return ( Socket6::getaddrinfo( $ip, $port, @$inet6 ) )[3] if 
USE_SOCKET_INET6;
        }
 
        ( Socket::getaddrinfo( $ip, $port, _ipv6($ip) ? $hints6 : $hints4 ) 
)[1]->{addr}
@@ -984,15 +976,17 @@
 
 sub _ipv4 {
        for (shift) {
-               return /^[0-9.]+\.[0-9]+$/;                     # dotted digits
+               return if m/[^.0-9]/;                           # dots and 
digits only
+               return m/\.\d+\./;                              # dots 
separated by digits
        }
 }
 
 sub _ipv6 {
        for (shift) {
-               return 1 if /^[:0-9a-f]+:[0-9a-f]*$/i;          # mixed : and 
hexdigits
-               return 1 if /^[:0-9a-f]+:[0-9.]+$/i;            # prefix + 
dotted digits
-               return /^[:0-9a-f]+:[0-9a-f]*[%].+$/i;          # RFC4007 
scoped address
+               return   unless m/:.*:/;                        # must contain 
two colons
+               return 1 unless m/[^:0-9A-Fa-f]/;               # colons and 
hexdigits only
+               return 1 if m/^[:.0-9A-Fa-f]+\%.+$/;            # RFC4007 
scoped address
+               return m/^[:0-9A-Fa-f]+:[.0-9]+$/;              # prefix : 
dotted digits
        }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.11/lib/Net/DNS/Resolver.pm 
new/Net-DNS-1.12/lib/Net/DNS/Resolver.pm
--- old/Net-DNS-1.11/lib/Net/DNS/Resolver.pm    2017-06-26 13:58:36.000000000 
+0200
+++ new/Net-DNS-1.12/lib/Net/DNS/Resolver.pm    2017-08-18 12:20:26.000000000 
+0200
@@ -1,9 +1,9 @@
 package Net::DNS::Resolver;
 
 #
-# $Id: Resolver.pm 1576 2017-06-19 12:39:09Z willem $
+# $Id: Resolver.pm 1590 2017-08-18 09:56:05Z willem $
 #
-our $VERSION = (qw$LastChangedRevision: 1576 $)[1];
+our $VERSION = (qw$LastChangedRevision: 1590 $)[1];
 
 =head1 NAME
 
@@ -307,9 +307,6 @@
 Errors are indicated by returning C<undef> in which case
 the reason for failure may be determined using C<errorstring()>.
 
-The program may determine when the handle is ready for reading by
-calling C<bgbusy()>.
-
 The response L<Net::DNS::Packet> object is obtained by calling C<bgread()>.
 
 B<BEWARE>:
@@ -319,13 +316,14 @@
 
 =head2 bgread
 
+    $handle = $resolver->bgsend( 'www.example.com' );
     $packet = $resolver->bgread($handle);
 
 Reads the answer from a background query.
 The argument is the handle returned by C<bgsend()>.
 
 Returns a L<Net::DNS::Packet> object or C<undef> if no response was
-received or timeout occurred. 
+received before the timeout interval expired. 
 
 
 =head2 bgbusy
@@ -388,6 +386,14 @@
 The default is true.
 
 
+=head2 domain
+
+    $domain = $resolver->domain;
+    $resolver->domain( 'domain.example' );
+
+Gets or sets the resolver default domain.
+
+
 =head2 igntc
 
     print 'igntc flag: ', $resolver->igntc, "\n";
@@ -524,7 +530,7 @@
     $resolver->udppacketsize(2048);
 
 Get or set the UDP packet size.
-If set to a value greater than the default DNS packet size,
+If set to a value not less than the default DNS packet size,
 an EDNS extension will be added indicating support for
 large UDP datagram.
 
@@ -548,14 +554,6 @@
 received in response to a query.
 
 
-=head2 answersize
-
-    print 'size of last answer: ', $resolver->answersize, "\n";
-
-Returns the size in bytes of the most recent packet received in
-response to a query.
-
-
 =head2 errorstring
 
     print 'query status: ', $resolver->errorstring, "\n";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.11/lib/Net/DNS.pm 
new/Net-DNS-1.12/lib/Net/DNS.pm
--- old/Net-DNS-1.11/lib/Net/DNS.pm     2017-06-26 13:58:36.000000000 +0200
+++ new/Net-DNS-1.12/lib/Net/DNS.pm     2017-08-18 12:20:26.000000000 +0200
@@ -1,13 +1,13 @@
 package Net::DNS;
 
 #
-# $Id: DNS.pm 1581 2017-06-26 11:46:03Z willem $
+# $Id: DNS.pm 1592 2017-08-18 10:02:44Z willem $
 #
 require 5.006;
 our $VERSION;
-$VERSION = '1.11';
+$VERSION = '1.12';
 $VERSION = eval $VERSION;
-our $SVNVERSION = (qw$LastChangedRevision: 1581 $)[1];
+our $SVNVERSION = (qw$LastChangedRevision: 1592 $)[1];
 
 
 =head1 NAME
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.11/t/00-version.t 
new/Net-DNS-1.12/t/00-version.t
--- old/Net-DNS-1.11/t/00-version.t     2017-06-26 13:58:36.000000000 +0200
+++ new/Net-DNS-1.12/t/00-version.t     2017-08-18 12:20:26.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: 00-version.t 1573 2017-06-12 11:03:59Z willem $ -*-perl-*-
+# $Id: 00-version.t 1582 2017-07-07 21:45:14Z willem $ -*-perl-*-
 
 use strict;
 use Test::More;
@@ -35,28 +35,26 @@
 }
 
 
-END {
+eval {
        my %macro;                                              # extract 
Makefile macros
        open MAKEFILE, 'Makefile' or die $!;
        while (<MAKEFILE>) {
-               next if /^#/;
-               next unless /^([A-Z_]+)\s+=\s+(.*)$/;
-               $macro{$1} = $2;
+               $macro{$1} = $2 if /^([A-Z_]+)\s+=\s+(.*)$/;
        }
        close MAKEFILE;
 
        my %install_type = qw(perl INSTALLPRIVLIB site INSTALLSITELIB vendor 
INSTALLVENDORLIB);
        my $install_site = join '', '$(DESTDIR)$(', 
$install_type{$macro{INSTALLDIRS}}, ')';
        for ($install_site) {
-               s/\$\(([A-Z_]+)\)/$macro{$1}/g while /\$\(/;    # expand 
Makefile macros
+               s/\$\(([A-Z_]+)\)/$macro{$1}/eg while /\$\(/;   # expand 
Makefile macros
                s|([/])[/]+|$1|g;                               # remove 
gratuitous //s
        }
 
-       local @INC = grep $_ !~ m/\bblib\W(arch|lib)$/i, @INC;
-       eval { require Net::DNS };
+       local @INC = grep !m/\bblib\W(arch|lib)$/i, @INC;
+       eval 'require Net::DNS';
 
        my $nameregex = '\W+Net\WDNS.pm$';
-       my @installed = grep $_ =~ m/$nameregex/i, values %INC;
+       my @installed = grep m/$nameregex/io, values %INC;
        my %noinstall;
 
        foreach (@installed) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.11/t/01-resolver.t 
new/Net-DNS-1.12/t/01-resolver.t
--- old/Net-DNS-1.11/t/01-resolver.t    2017-06-26 13:58:36.000000000 +0200
+++ new/Net-DNS-1.12/t/01-resolver.t    2017-08-18 12:20:26.000000000 +0200
@@ -1,7 +1,7 @@
-# $Id: 01-resolver.t 1573 2017-06-12 11:03:59Z willem $        -*-perl-*-
+# $Id: 01-resolver.t 1590 2017-08-18 09:56:05Z willem $        -*-perl-*-
 
 use strict;
-use Test::More tests => 26;
+use Test::More tests => 28;
 
 
 BEGIN {
@@ -87,19 +87,22 @@
 
 {
        my $resolver = Net::DNS::Resolver->new();
-       foreach my $value (qw(1.2.3.4 ::1 ::1.2.3.4)) {
-               is( $resolver->srcaddr($value), $value, 
"\$resolver->srcaddr($value)" );
+       foreach my $ip (qw(127.0.0.1 ::1 fe80::1234%1)) {
+               is( $resolver->srcaddr($ip), $ip, "\$resolver->srcaddr($ip)" );
        }
 }
 
 
 {                                      ## exercise possibly unused socket code
+                                       ## check for smoke and flames only
        my $resolver = Net::DNS::Resolver->new();
-       foreach my $value (qw(127.0.0.1 ::1)) {
-               my $udp = eval { $resolver->_create_udp_socket($value) };
-               ok( !$@, "resolver->_create_udp_socket($value)" );
-               my $tcp = eval { $resolver->_create_tcp_socket($value) };
-               ok( !$@, "resolver->_create_tcp_socket($value)" );
+       foreach my $ip (qw(127.0.0.1 ::1 ::ffff:127.0.0.1)) {
+               eval { $resolver->_create_udp_socket($ip) };
+               ok( !$@, "\$resolver->_create_udp_socket($ip)" );
+               eval { $resolver->_create_dst_sockaddr( $ip, 53 ) };
+               #ok( !$@, "\$resolver->_create_dst_sockaddr($ip,53)" ); # 
Windows!
+               eval { $resolver->_create_tcp_socket($ip) };
+               ok( !$@, "\$resolver->_create_tcp_socket($ip)" );
        }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.11/t/05-CDNSKEY.t 
new/Net-DNS-1.12/t/05-CDNSKEY.t
--- old/Net-DNS-1.11/t/05-CDNSKEY.t     2017-06-26 13:58:36.000000000 +0200
+++ new/Net-DNS-1.12/t/05-CDNSKEY.t     2017-08-18 12:20:26.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: 05-CDNSKEY.t 1526 2017-01-16 09:17:54Z willem $ -*-perl-*-
+# $Id: 05-CDNSKEY.t 1586 2017-08-15 09:01:57Z willem $ -*-perl-*-
 #
 
 use strict;
@@ -15,7 +15,7 @@
        exit;
 }
 
-plan tests => 33;
+plan tests => 35;
 
 
 my $name = 'CDNSKEY.example';
@@ -102,15 +102,31 @@
 
 
 {
-       my $rr = new Net::DNS::RR("$name $type 0 3 0 0");
-       is( $rr->rdstring(),  '0 3 0 0', "DNSKEY delete: $name. $type 0 3 0 0" 
);
-       is( $rr->flags(),     0,         'DNSKEY delete: flags 0' );
-       is( $rr->protocol(),  3,         'DNSKEY delete: protocol 3' );
-       is( $rr->algorithm(), 0,         'DNSKEY delete: algorithm 0' );
-       is( $rr->keybin(),    '',        'DNSKEY delete: key empty' );
+       my @arg = qw(0 3 0 AA==);                               # per 
RFC8078(4), erratum 5049
+       my $rr  = new Net::DNS::RR("$name. $type @arg");
+       ok( ref($rr), "DNSKEY delete: $name. $type @arg" );
+       is( $rr->flags(),     0, 'DNSKEY delete: flags 0' );
+       is( $rr->protocol(),  3, 'DNSKEY delete: protocol 3' );
+       is( $rr->algorithm(), 0, 'DNSKEY delete: algorithm 0' );
 
-       my $rdata = $rr->rdata();
-       is( unpack( 'H*', $rdata ), '00000300', 'DNSKEY delete: rdata 
wire-format' );
+       is( $rr->string(), "$name.\tIN\t$type\t@arg", 'DNSKEY delete: 
presentation format' );
+
+       my $rdata = unpack 'H*', $rr->rdata();
+       is( $rdata, '0000030000', 'DNSKEY delete: rdata wire-format' );
+}
+
+
+{
+       my @arg = qw(0 3 0 0);                                  # per 
RFC8078(4) as published
+       my $rr  = new Net::DNS::RR("$name. $type @arg");
+       is( $rr->rdstring(), '0 3 0 AA==', 'DNSKEY delete: accept old format' );
+}
+
+
+{
+       my @arg = qw(0 0 0 -);                                  # unexpected 
empty field
+       my $rr  = new Net::DNS::RR("$name. $type @arg");
+       is( $rr->rdstring(), '0 3 0 -', 'DNSKEY delete: represent empty key' );
 }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.11/t/05-CDS.t new/Net-DNS-1.12/t/05-CDS.t
--- old/Net-DNS-1.11/t/05-CDS.t 2017-06-26 13:58:36.000000000 +0200
+++ new/Net-DNS-1.12/t/05-CDS.t 2017-08-18 12:20:26.000000000 +0200
@@ -1,7 +1,7 @@
-# $Id: 05-CDS.t 1526 2017-01-16 09:17:54Z willem $     -*-perl-*-
+# $Id: 05-CDS.t 1586 2017-08-15 09:01:57Z willem $     -*-perl-*-
 
 use strict;
-use Test::More tests => 29;
+use Test::More tests => 31;
 
 
 use Net::DNS;
@@ -82,15 +82,31 @@
 
 
 {
-       my $rr = new Net::DNS::RR("$name. $type 0 0 0 0");
-       is( $rr->rdstring(),  '0 0 0 0', "DS delete: $name. $type  0 0 0 0" );
-       is( $rr->keytag(),    0,         'DS delete: keytag 0' );
-       is( $rr->algorithm(), 0,         'DS delete: algorithm 0' );
-       is( $rr->digtype(),   0,         'DS delete: digtype 0' );
-       is( $rr->digest(),    '',        'DS delete: digest empty' );
+       my @arg = qw(0 0 0 00);                                 # per 
RFC8078(4), erratum 5049
+       my $rr  = new Net::DNS::RR("$name. $type @arg");
+       ok( ref($rr), "DS delete: $name. $type @arg" );
+       is( $rr->keytag(),    0, 'DS delete: keytag 0' );
+       is( $rr->algorithm(), 0, 'DS delete: algorithm 0' );
+       is( $rr->digtype(),   0, 'DS delete: digtype 0' );
 
-       my $rdata = $rr->rdata();
-       is( unpack( 'H*', $rdata ), '00000000', 'DS delete: rdata wire-format' 
);
+       is( $rr->string(), "$name.\tIN\t$type\t@arg", 'DS delete: presentation 
format' );
+
+       my $rdata = unpack 'H*', $rr->rdata();
+       is( $rdata, '0000000000', 'DS delete: rdata wire-format' );
+}
+
+
+{
+       my @arg = qw(0 0 0 0);                                  # per 
RFC8078(4) as published
+       my $rr  = new Net::DNS::RR("$name. $type @arg");
+       is( $rr->rdstring(), '0 0 0 00', 'DS delete: accept old format' );
+}
+
+
+{
+       my @arg = qw(0 0 0 -);                                  # unexpected 
empty field
+       my $rr  = new Net::DNS::RR("$name. $type @arg");
+       is( $rr->rdstring(), '0 0 0 -', 'DS delete: represent empty digest' );
 }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.11/t/08-IPv4.t new/Net-DNS-1.12/t/08-IPv4.t
--- old/Net-DNS-1.11/t/08-IPv4.t        2017-06-26 13:58:36.000000000 +0200
+++ new/Net-DNS-1.12/t/08-IPv4.t        2017-08-18 12:20:26.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: 08-IPv4.t 1567 2017-05-19 09:52:52Z willem $ -*-perl-*-
+# $Id: 08-IPv4.t 1584 2017-07-28 16:15:17Z willem $ -*-perl-*-
 
 use strict;
 use Test::More;
@@ -542,7 +542,7 @@
 
 
 {                                      ## exercise error paths in _send_???() 
and bgbusy()
-       my $resolver = Net::DNS::Resolver->new( nameservers => $IP );
+       my $resolver = Net::DNS::Resolver->new( nameservers => $IP, retry => 1 
);
        my $packet = $resolver->_make_query_packet(qw(net-dns.org SOA));
 
        my $mismatch = $resolver->_make_query_packet(qw(net-dns.org SOA));
@@ -553,20 +553,18 @@
 }
 
 
-{                                      ## exercise error paths in 
_decode_reply()
+{                                      ## exercise error paths in 
_accept_reply()
        my $resolver = Net::DNS::Resolver->new( nameservers => $NOIP );
 
-       my $corrupt = '';
-       ok( !$resolver->_decode_reply( \$corrupt ), '_decode_reply()    corrupt 
reply' );
-
        my $query = new Net::DNS::Packet(qw(net-dns.org SOA IN));
-       my $qdata = $query->data;
-       ok( !$resolver->_decode_reply( \$qdata ), '_decode_reply()      qr not 
set' );
-
        my $reply = new Net::DNS::Packet(qw(net-dns.org SOA IN));
        $reply->header->qr(1);
-       my $rdata = $reply->data;
-       ok( !$resolver->_decode_reply( \$rdata, $query ), '_decode_reply()      
id mismatch' );
+
+       ok( !$resolver->_accept_reply(undef), '_accept_reply()  corrupt reply' 
);
+
+       ok( !$resolver->_accept_reply($query), '_accept_reply() qr not set' );
+
+       ok( !$resolver->_accept_reply( $reply, $query ), '_accept_reply()       
id mismatch' );
 }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.11/t/08-IPv6.t new/Net-DNS-1.12/t/08-IPv6.t
--- old/Net-DNS-1.11/t/08-IPv6.t        2017-06-26 13:58:36.000000000 +0200
+++ new/Net-DNS-1.12/t/08-IPv6.t        2017-08-18 12:20:26.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: 08-IPv6.t 1567 2017-05-19 09:52:52Z willem $ -*-perl-*-
+# $Id: 08-IPv6.t 1584 2017-07-28 16:15:17Z willem $ -*-perl-*-
 
 use strict;
 use Test::More;
@@ -545,7 +545,7 @@
 
 
 {                                      ## exercise error paths in _send_???() 
and bgbusy()
-       my $resolver = Net::DNS::Resolver->new( nameservers => $IP );
+       my $resolver = Net::DNS::Resolver->new( nameservers => $IP, retry => 1 
);
        my $packet = $resolver->_make_query_packet(qw(net-dns.org SOA));
 
        my $mismatch = $resolver->_make_query_packet(qw(net-dns.org SOA));
@@ -556,20 +556,18 @@
 }
 
 
-{                                      ## exercise error paths in 
_decode_reply()
+{                                      ## exercise error paths in 
_accept_reply()
        my $resolver = Net::DNS::Resolver->new( nameservers => $NOIP );
 
-       my $corrupt = '';
-       ok( !$resolver->_decode_reply( \$corrupt ), '_decode_reply()    corrupt 
reply' );
-
        my $query = new Net::DNS::Packet(qw(net-dns.org SOA IN));
-       my $qdata = $query->data;
-       ok( !$resolver->_decode_reply( \$qdata ), '_decode_reply()      qr not 
set' );
-
        my $reply = new Net::DNS::Packet(qw(net-dns.org SOA IN));
        $reply->header->qr(1);
-       my $rdata = $reply->data;
-       ok( !$resolver->_decode_reply( \$rdata, $query ), '_decode_reply()      
id mismatch' );
+
+       ok( !$resolver->_accept_reply(undef), '_accept_reply()  corrupt reply' 
);
+
+       ok( !$resolver->_accept_reply($query), '_accept_reply() qr not set' );
+
+       ok( !$resolver->_accept_reply( $reply, $query ), '_accept_reply()       
id mismatch' );
 }
 
 


Reply via email to