]> granicus.if.org Git - pdns/commitdiff
make sure mixed-case queries get a correct apex NSEC3 type bitmap
authorPeter van Dijk <peter.van.dijk@netherlabs.nl>
Thu, 25 Apr 2013 09:21:07 +0000 (09:21 +0000)
committerPeter van Dijk <peter.van.dijk@netherlabs.nl>
Thu, 25 Apr 2013 09:21:07 +0000 (09:21 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@3176 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/packethandler.cc
regression-tests/uppercase-nsec/description
regression-tests/uppercase-nsec/expected_result.nsec3

index 462f6893d2dd3213203cb969329eb2b32dae17dd..1fabbf49abb0c0c3ea901b8c09afe7e952561b93 100644 (file)
@@ -461,7 +461,7 @@ void emitNSEC3(DNSBackend& B, const NSEC3PARAMRecordContent& ns3prc, const SOADa
         n3rc.d_set.insert(rr.qtype.getCode());
     }
 
-    if(unhashed == sd.qname) {
+    if(toLower(unhashed) == toLower(sd.qname)) {
       n3rc.d_set.insert(QType::NSEC3PARAM);
       n3rc.d_set.insert(QType::DNSKEY);
     }
index 3c0fcd94fdce62c45ba89d10913242466836d6ee..49190f9cf0945980ea6dc894fde3203d9159ad4f 100644 (file)
@@ -1,2 +1,4 @@
 Make sure we lowercase the next name in an NSEC because validators
 do not (RFC6840 5.1).
+Also, make sure our NSEC3 apex bitmap includes DNSKEY and NSEC3PARAM
+if the zone name part of the query includes uppercase.
index eeead1cbdede72a0d0e8ad8cbf3fc6b0a12ec9cb..70c5e021e922a13446afe8ebb61a1c3ebff2d5e7 100644 (file)
@@ -1,4 +1,4 @@
-1      2eu2gulbu53h9uvhfalshpbo2a83t6l2.Test.com.      IN      NSEC3   86400   1 1 1 abcd 2GKS2N3JPQF62QOHAVFQ1PHOLM3HR7RA NS SOA MX RRSIG
+1      2eu2gulbu53h9uvhfalshpbo2a83t6l2.Test.com.      IN      NSEC3   86400   1 1 1 abcd 2GKS2N3JPQF62QOHAVFQ1PHOLM3HR7RA NS SOA MX RRSIG DNSKEY NSEC3PARAM
 1      2eu2gulbu53h9uvhfalshpbo2a83t6l2.Test.com.      IN      RRSIG   86400   NSEC3 8 3 86400 [expiry] [inception] [keytag] test.com. ...
 1      Test.com.       IN      RRSIG   3600    SOA 8 2 3600 [expiry] [inception] [keytag] test.com. ...
 1      Test.com.       IN      SOA     3600    ns1.Test.com. ahu.example.com. 2005092501 28800 7200 604800 86400