]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1305] introduce WILDCARD_CNAME for ZoneFinder::Result, and use it for CNAME
authorJINMEI Tatuya <jinmei@isc.org>
Sat, 15 Oct 2011 00:00:30 +0000 (17:00 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Sat, 15 Oct 2011 00:00:30 +0000 (17:00 -0700)
on a wildcard.

src/lib/datasrc/database.cc
src/lib/datasrc/tests/database_unittest.cc
src/lib/datasrc/zone.h

index e476297885c9f2b2aa12b3e035b1ef8cee15e3af..54e559020b3947de91583bfdfc01cc5e5f088240 100644 (file)
@@ -553,7 +553,7 @@ DatabaseClient::Finder::find(const isc::dns::Name& name,
                             if (cni != found.second.end() &&
                                 type != RRType::CNAME()) {
                                 result_rrset = cni->second;
-                                result_status = CNAME;
+                                result_status = WILDCARD_CNAME;
                             } else if (nsi != found.second.end()) {
                                 result_rrset = nsi->second;
                                 result_status = DELEGATION;
index 8cd70eff5696b4d478df8403ab900daa0be72e95..0ae8c256b5b29e1d74bc007f3289aabe8602495b 100644 (file)
@@ -1626,7 +1626,7 @@ TYPED_TEST(DatabaseClientTest, wildcard) {
     this->expected_sig_rdatas_.clear();
     doFindTest(*finder, isc::dns::Name("a.cnamewild.example.org."),
                isc::dns::RRType::TXT(), isc::dns::RRType::CNAME(),
-               this->rrttl_, ZoneFinder::CNAME,
+               this->rrttl_, ZoneFinder::WILDCARD_CNAME,
                this->expected_rdatas_, this->expected_sig_rdatas_);
 
     this->expected_rdatas_.clear();
index c83b14b77914d2bda2c610a0bf586e1f72388b1f..640a55ace43000cf1288a43e973b4b3591e9836f 100644 (file)
@@ -63,6 +63,10 @@ public:
     /// actually the best wildcard we have). Data sources that don't
     /// support DNSSEC don't need to distinguish them.
     ///
+    /// In case of CNAME, if the CNAME is a wildcard (i.e., its owner name
+    /// starts with the label "*"), WILDCARD_CNAME will be returned instead
+    /// of CNAME.
+    ///
     /// In case of NXRRSET related results, the returned NSEC record
     /// belongs to the domain which would provide the result if it
     /// contained the correct type (in case of NXRRSET, it is the queried
@@ -97,6 +101,7 @@ public:
         CNAME,    ///< The search encounters and returns a CNAME RR
         DNAME,    ///< The search encounters and returns a DNAME RR
         WILDCARD, ///< Succes by wildcard match, for DNSSEC
+        WILDCARD_CNAME, ///< CNAME on wildcard, search returns CNAME, for DNSSEC
         WILDCARD_NXRRSET ///< NXRRSET on wildcard, for DNSSEC
     };