]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
fix NSEC for asterisk ents and add test
authorKees Monshouwer <mind04@monshouwer.org>
Sat, 31 Aug 2013 17:32:44 +0000 (19:32 +0200)
committermind04 <mind04@monshouwer.org>
Fri, 22 Nov 2013 00:02:29 +0000 (01:02 +0100)
12 files changed:
modules/tinydnsbackend/data
modules/tinydnsbackend/data.cdb
pdns/packethandler.cc
regression-tests.nobackend/tinydns-data-check/expected_result
regression-tests/ent-asterisk/command [new file with mode: 0755]
regression-tests/ent-asterisk/description [new file with mode: 0644]
regression-tests/ent-asterisk/expected_result [new file with mode: 0644]
regression-tests/ent-asterisk/expected_result.dnssec [new file with mode: 0644]
regression-tests/ent-asterisk/expected_result.narrow [new file with mode: 0644]
regression-tests/ent-asterisk/expected_result.nsec3 [new file with mode: 0644]
regression-tests/ent-asterisk/skip.noent [new file with mode: 0644]
regression-tests/example.com

index cbcbd13f34b92498ac1741a532918e5d27e506de..63a08f5b7a54ff66dd9663f97aad8322ebaacc77 100644 (file)
@@ -20017,7 +20017,7 @@ Cexternal.example.com:somewhere.else.net.:120
 +host-9998.example.com:192.168.1.14:120
 +host-9999.example.com:192.168.1.15:120
 :hwinfo.example.com:13:\003abc\003def:120
-3ipv6.example.com:200106a80000000102104bfffe4b4c61:120
+:ipv6.example.com:28:\040\001\006\250\000\000\000\001\002\020K\377\376KLa:120
 &italy.example.com::italy-ns1.example.com.:120
 &italy.example.com::italy-ns2.example.com.:120
 +italy-ns1.example.com:192.168.5.1:120
@@ -20047,6 +20047,7 @@ Cstart1.example.com:start2.example.com.:120
 Cstart2.example.com:start3.example.com.:120
 Cstart3.example.com:start4.example.com.:120
 +start4.example.com:192.168.2.2:120
++host.\052.sub.example.com:192.168.6.1:120
 :text.example.com:16:\025Hi\054\040this\040is\040some\040text:120
 :text0.example.com:16:\014k\075rsa\073\040p\075one:120
 :text1.example.com:16:\014k\075rsa\073\040p\075one:120
index c44ab853a4d209a4978a392e6e2331c79b25741a..2d6d6642aaebf5802f8c684d838b5b04414ad774 100644 (file)
Binary files a/modules/tinydnsbackend/data.cdb and b/modules/tinydnsbackend/data.cdb differ
index 91a98bdcd621e72de877c9dadd33e2d0fddc0e76..56bb7e9fc8b167ddec7f4cc08ccb074ebe995701 100644 (file)
@@ -671,7 +671,7 @@ void PacketHandler::addNSEC(DNSPacket *p, DNSPacket *r, const string& target, co
 
   if (mode == 2) {
     // wildcard NO-DATA
-    before='.';
+    before.clear();
     sd.db->getBeforeAndAfterNames(sd.domain_id, auth, wildcard, before, after);
     emitNSEC(before, after, target, sd, r, mode);
   }
index aec66ab875587545ee48a15c6e2af46d2432a820..62d0ff0a25b9030ef45786b625dd17d1647b93c7 100644 (file)
@@ -1,4 +1,4 @@
-f1eebfc1577c3dcf26b4390fbc7bb0b2  ../regression-tests/example.com
+4bc48a8d9b8d04b553be67639e5656e8  ../regression-tests/example.com
 a2dd754820cb88fdd3d80b54a212a270  ../regression-tests/test.com
 21213b4e8cd56e4184696a1bafd987d7  ../regression-tests/wtest.com
 6e4ac6e3a6cd717df107a7bc2e466ac7  ../regression-tests/dnssec-parent.com
diff --git a/regression-tests/ent-asterisk/command b/regression-tests/ent-asterisk/command
new file mode 100755 (executable)
index 0000000..bce5a5e
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+cleandig sub.host.sub.example.com a dnssec
diff --git a/regression-tests/ent-asterisk/description b/regression-tests/ent-asterisk/description
new file mode 100644 (file)
index 0000000..9aeca63
--- /dev/null
@@ -0,0 +1 @@
+Check if asterisk empty non-terminal is interpreted as wildcard wihout type
diff --git a/regression-tests/ent-asterisk/expected_result b/regression-tests/ent-asterisk/expected_result
new file mode 100644 (file)
index 0000000..f0a6a86
--- /dev/null
@@ -0,0 +1,4 @@
+1      example.com.    IN      SOA     86400   ns1.example.com. ahu.example.com. 2000081501 28800 7200 604800 86400
+2      .       IN      OPT     32768   
+Rcode: 0, RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
+Reply to question for qname='sub.host.sub.example.com.', qtype=A
diff --git a/regression-tests/ent-asterisk/expected_result.dnssec b/regression-tests/ent-asterisk/expected_result.dnssec
new file mode 100644 (file)
index 0000000..98cd61b
--- /dev/null
@@ -0,0 +1,10 @@
+1      example.com.    IN      RRSIG   86400   SOA 8 2 100000 [expiry] [inception] [keytag] example.com. ...
+1      example.com.    IN      SOA     86400   ns1.example.com. ahu.example.com. 2000081501 28800 7200 604800 86400
+1      host.*.sub.example.com. IN      NSEC    86400   text.example.com. A RRSIG NSEC
+1      host.*.sub.example.com. IN      RRSIG   86400   NSEC 8 5 86400 [expiry] [inception] [keytag] example.com. ...
+1      start4.example.com.     IN      NSEC    86400   host.*.sub.example.com. A RRSIG NSEC
+1      start4.example.com.     IN      RRSIG   86400   NSEC 8 3 86400 [expiry] [inception] [keytag] example.com. ...
+2      .       IN      OPT     32768   
+Rcode: 0, RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
+Reply to question for qname='sub.host.sub.example.com.', qtype=A
+./ent-asterisk/unbound-host.out:sub.host.sub.example.com has no address (BOGUS (security failure))
diff --git a/regression-tests/ent-asterisk/expected_result.narrow b/regression-tests/ent-asterisk/expected_result.narrow
new file mode 100644 (file)
index 0000000..46769e0
--- /dev/null
@@ -0,0 +1,11 @@
+1      5ui8h56r4776maicvhpdegs6chr19i99.example.com.   IN      NSEC3   86400   1 [flags] 1 abcd 5UI8H56R4776MAICVHPDEGS6CHR19I9A
+1      5ui8h56r4776maicvhpdegs6chr19i99.example.com.   IN      RRSIG   86400   NSEC3 8 3 86400 [expiry] [inception] [keytag] example.com. ...
+1      example.com.    IN      RRSIG   86400   SOA 8 2 100000 [expiry] [inception] [keytag] example.com. ...
+1      example.com.    IN      SOA     86400   ns1.example.com. ahu.example.com. 2000081501 28800 7200 604800 86400
+1      hhrsadparthvtuou67trentjstdodla0.example.com.   IN      NSEC3   86400   1 [flags] 1 abcd HHRSADPARTHVTUOU67TRENTJSTDODLA1
+1      hhrsadparthvtuou67trentjstdodla0.example.com.   IN      RRSIG   86400   NSEC3 8 3 86400 [expiry] [inception] [keytag] example.com. ...
+1      pbl3rtqv3mt7eb29gqp0a17o0h42nj76.example.com.   IN      NSEC3   86400   1 [flags] 1 abcd PBL3RTQV3MT7EB29GQP0A17O0H42NJ78
+1      pbl3rtqv3mt7eb29gqp0a17o0h42nj76.example.com.   IN      RRSIG   86400   NSEC3 8 3 86400 [expiry] [inception] [keytag] example.com. ...
+2      .       IN      OPT     32768   
+Rcode: 0, RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
+Reply to question for qname='sub.host.sub.example.com.', qtype=A
diff --git a/regression-tests/ent-asterisk/expected_result.nsec3 b/regression-tests/ent-asterisk/expected_result.nsec3
new file mode 100644 (file)
index 0000000..b462df8
--- /dev/null
@@ -0,0 +1,11 @@
+1      5ui8h56r4776maicvhpdegs6chr19i99.example.com.   IN      NSEC3   86400   1 [flags] 1 abcd 5UMB87SUFNRRMLILGL48A5GUUHG7RI58
+1      5ui8h56r4776maicvhpdegs6chr19i99.example.com.   IN      RRSIG   86400   NSEC3 8 3 86400 [expiry] [inception] [keytag] example.com. ...
+1      example.com.    IN      RRSIG   86400   SOA 8 2 100000 [expiry] [inception] [keytag] example.com. ...
+1      example.com.    IN      SOA     86400   ns1.example.com. ahu.example.com. 2000081501 28800 7200 604800 86400
+1      hhrsadparthvtuou67trentjstdodla0.example.com.   IN      NSEC3   86400   1 [flags] 1 abcd HHTKKD5HB125SGANBTKMQK84LULH60LH
+1      hhrsadparthvtuou67trentjstdodla0.example.com.   IN      RRSIG   86400   NSEC3 8 3 86400 [expiry] [inception] [keytag] example.com. ...
+1      pbkjnd53pnsru5jmaqnk3k936pv2pq5j.example.com.   IN      NSEC3   86400   1 [flags] 1 abcd PBL4SE96F8T4H4Q24UQMRQ4KS96AHPV3 A RRSIG
+1      pbkjnd53pnsru5jmaqnk3k936pv2pq5j.example.com.   IN      RRSIG   86400   NSEC3 8 3 86400 [expiry] [inception] [keytag] example.com. ...
+2      .       IN      OPT     32768   
+Rcode: 0, RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
+Reply to question for qname='sub.host.sub.example.com.', qtype=A
diff --git a/regression-tests/ent-asterisk/skip.noent b/regression-tests/ent-asterisk/skip.noent
new file mode 100644 (file)
index 0000000..e69de29
index 3ab717b283460cb635698535eebee58af1b52035..4e18d384905bd5185b6411afcb3f8fd75b2e381f 100644 (file)
@@ -93,7 +93,8 @@ text0                 IN      TXT     "k=rsa; p=one"
 text1                  IN      TXT     "k=rsa\; p=one"
 text2                  IN      TXT     "k=rsa\\; p=one"
 text3                  IN      TXT     "k=rsa\\\; p=one"
-
+;
+host.*.sub             IN      A       192.168.6.1
 ;
 ipv6                   IN      AAAA    2001:6A8:0:1:210:4BFF:FE4B:4C61
 ;