[SCM] Debian packaging of AllKnowingDNS CPAN distribution branch, master, updated. debian/1.2-1-4-g0d617d7

Michael Stapelberg michael at stapelberg.de
Wed Mar 28 16:18:48 UTC 2012


The following commit has been merged in the master branch:
commit 719a241819f188dc6b35d7591e73eb4f59422ca0
Author: Michael Stapelberg <michael at stapelberg.de>
Date:   Wed Mar 28 18:03:16 2012 +0200

    Imported Upstream version 1.3

diff --git a/Changes b/Changes
index 8e2abf1..c4a97c1 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,9 @@
 History file for AllKnowingDNS
 
+1.3 2012-03-28
+
+- Return an empty NOERROR response for non-AAA records
+
 1.2 2012-03-12
 
 - Fix documentation (provide proper NAME sections)
diff --git a/META.yml b/META.yml
index d2a616d..92b73b1 100644
--- a/META.yml
+++ b/META.yml
@@ -27,4 +27,4 @@ requires:
   perl: 5.10.0
 resources:
   license: http://opensource.org/licenses/bsd-license.php
-version: 1.2
+version: 1.3
diff --git a/all-knowing-dns.conf b/all-knowing-dns.conf
index 2d0e819..015eb3e 100644
--- a/all-knowing-dns.conf
+++ b/all-knowing-dns.conf
@@ -1,4 +1,4 @@
-# Configuration file for AllKnowingDNS v1.2
+# Configuration file for AllKnowingDNS v1.3
 
 # RaumZeitLabor
 network 2001:4d88:100e:ccc0::/64
diff --git a/lib/App/AllKnowingDNS/Config.pm b/lib/App/AllKnowingDNS/Config.pm
index 1b14d32..33ec27f 100644
--- a/lib/App/AllKnowingDNS/Config.pm
+++ b/lib/App/AllKnowingDNS/Config.pm
@@ -116,7 +116,7 @@ __END__
 
 =head1 VERSION
 
-Version 1.2
+Version 1.3
 
 =head1 AUTHOR
 
diff --git a/lib/App/AllKnowingDNS/Handler.pm b/lib/App/AllKnowingDNS/Handler.pm
index f4aca4e..8b43a07 100644
--- a/lib/App/AllKnowingDNS/Handler.pm
+++ b/lib/App/AllKnowingDNS/Handler.pm
@@ -79,6 +79,10 @@ sub handle_aaaa_query {
     my ($digits) = ($qname =~ /$regexp/);
     return ('NXDOMAIN', undef, undef, undef) unless defined($digits);
 
+    if ($qtype ne 'AAAA') {
+        return ('NOERROR', [ ], [], [], { aa => 1 });
+    }
+
     # Pad with zeros so that we can match 4 digits each.
     $digits = "0$digits" while (length($digits) % 4) != 0;
 
@@ -114,8 +118,7 @@ sub reply_handler {
         return handle_ptr_query($querylog, $zone, $qname, $qclass, $qtype);
     }
 
-    if ($qtype eq 'AAAA' &&
-        defined(my $zone = $config->zone_for_aaaa($qname))) {
+    if (defined(my $zone = $config->zone_for_aaaa($qname))) {
         return handle_aaaa_query($zone, $qname, $qclass, $qtype);
     }
 
@@ -128,7 +131,7 @@ __END__
 
 =head1 VERSION
 
-Version 1.2
+Version 1.3
 
 =head1 AUTHOR
 
diff --git a/script/all-knowing-dns b/script/all-knowing-dns
index 7e6e124..820679f 100755
--- a/script/all-knowing-dns
+++ b/script/all-knowing-dns
@@ -15,7 +15,7 @@ use Net::DNS::Nameserver;
 use Privileges::Drop;
 use v5.10;
 
-our $VERSION = '1.2';
+our $VERSION = '1.3';
 
 my $configfile = '/etc/all-knowing-dns.conf';
 my $querylog = 0;
@@ -118,7 +118,7 @@ Enable logging every query to stdout (for debugging).
 
 The configuration file is wonderfully simple:
 
-    # Configuration file for AllKnowingDNS v1.2
+    # Configuration file for AllKnowingDNS v1.3
 
     listen 79.140.39.197
     listen 2001:4d88:100e:1::3
@@ -233,7 +233,7 @@ appropriate .ip6.arpa zone for your network and one regular domain.
 
 =head1 VERSION
 
-Version 1.2
+Version 1.3
 
 =head1 AUTHOR
 
diff --git a/t/004-handler.t b/t/004-handler.t
index b5ffff2..83f106b 100644
--- a/t/004-handler.t
+++ b/t/004-handler.t
@@ -57,6 +57,18 @@ is($rr->type, 'AAAA', 'RR type is AAAA');
 is($rr->rdatastr, '2001:4d88:100e:ccc0:219:dbff:fe43:2ec7', 'RR ok');
 
 ################################################################################
+# Check resolving hostnames to A records
+################################################################################
+
+$qname = 'ipv6-0219dbfffe432ec7-blah.nutzer.raumzeitlabor.de';
+$qclass = 'IN';
+$qtype = 'A';
+$peerhost = 'testsuite';
+($rcode, $ans, $auth, $add) = reply_handler($config, 0, $qname, $qclass, $qtype, $peerhost);
+is($rcode, 'NOERROR', 'no error when handling query');
+is(scalar @$ans, 0, 'zero answer RRs');
+
+################################################################################
 # A pathetic example for resolving hostname to AAAA record: a /112 net
 ################################################################################
 

-- 
Debian packaging of AllKnowingDNS CPAN distribution



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