BIND 10 trac1584review, updated. 4851408343c11ba763b1c7e4318ef68f1e3393fc [1584review] added a test for CNAME+wildcard with NSEC3 case.

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Feb 16 22:33:24 UTC 2012


The branch, trac1584review has been updated
       via  4851408343c11ba763b1c7e4318ef68f1e3393fc (commit)
      from  31ae358bc11d43cde0206b534548d142a42f3fcc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4851408343c11ba763b1c7e4318ef68f1e3393fc
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Feb 16 14:32:47 2012 -0800

    [1584review] added a test for CNAME+wildcard with NSEC3 case.

-----------------------------------------------------------------------

Summary of changes:
 src/bin/auth/tests/query_unittest.cc |   33 ++++++++++++++++++++++++++++++++-
 1 files changed, 32 insertions(+), 1 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/auth/tests/query_unittest.cc b/src/bin/auth/tests/query_unittest.cc
index 5757065..8bee193 100644
--- a/src/bin/auth/tests/query_unittest.cc
+++ b/src/bin/auth/tests/query_unittest.cc
@@ -191,6 +191,12 @@ const char* const nsec3_atwild_txt =
     "ji6neoaepv8b5o6k4ev33abha8ht9fgc.example.com. 3600 IN NSEC3 1 1 12 "
     "aabbccdd r53bq7cc2uvmubfu5ocmm6pers9tk9en\n";
 
+// NSEC3 for cnamewild.example.com (used in wildcard tests, will be added on
+// demand not to confuse other tests)
+const char* const nsec3_atcnamewild_txt =
+    "k8udemvp1j2f7eg6jebps17vp3n8i58h.example.com. 3600 IN NSEC3 1 1 12 "
+    "aabbccdd r53bq7cc2uvmubfu5ocmm6pers9tk9en\n";
+
 // NSEC3 for *.uwild.example.com (will be added on demand not to confuse
 // other tests)
 const char* const nsec3_wild_txt =
@@ -349,6 +355,10 @@ public:
             "0p9mhaveqvm6t7vbl5lop2u3t2rp3ton"; // a bit larger than H(<apex>)
         hash_map_[Name("x.y.wild.example.com")] =
             "q04jkcevqvmu85r014c7dkba38o0ji6r"; // a bit larger than H(www)
+        hash_map_[Name("cnamewild.example.com")] =
+            "k8udemvp1j2f7eg6jebps17vp3n8i58h";
+        hash_map_[Name("www.cnamewild.example.com")] =
+            "q04jkcevqvmu85r014c7dkba38o0ji6r"; // a bit larger than H(www)
 
         // For closest encloser proof for www1.uwild.example.com:
         hash_map_[Name("uwild.example.com")] =
@@ -1379,7 +1389,28 @@ TEST_F(QueryTest, wildcardNSEC3) {
                    string(nsec3_apex_txt) +
                    mock_finder->hash_map_[Name("example.com.")] +
                    string(".example.com. 3600 IN RRSIG ") +
-                   getCommonRRSIGText("NSEC3") + "\n").c_str(),
+                   getCommonRRSIGText("NSEC3")).c_str(),
+                  NULL, // we are not interested in additionals in this test
+                  mock_finder->getOrigin());
+}
+
+TEST_F(QueryTest, CNAMEwildNSEC3) {
+    // Similar to CNAMEwildNSEC, but with NSEC3.
+    // The next closer is qname itself, the covering NSEC3 for it
+    // is (in our setup) the NSEC3 for the www.example.com.
+    mock_finder->setNSEC3Flag(true);
+    mock_finder->addRecord(nsec3_atcnamewild_txt);
+
+    Query(memory_client, Name("www.cnamewild.example.com"), RRType::A(),
+          response, true).process();
+    responseCheck(response, Rcode::NOERROR(), AA_FLAG, 2, 2, 0,
+                  (string(cnamewild_txt).replace(0, 1, "www") +
+                   string("www.cnamewild.example.com. 3600 IN RRSIG ") +
+                   getCommonRRSIGText("CNAME") + "\n").c_str(),
+                  (string(nsec3_www_txt) +
+                   mock_finder->hash_map_[Name("www.example.com.")] +
+                   string(".example.com. 3600 IN RRSIG ") +
+                   getCommonRRSIGText("NSEC3")).c_str(),
                   NULL, // we are not interested in additionals in this test
                   mock_finder->getOrigin());
 }



More information about the bind10-changes mailing list