]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2267] unify the call to addRdataSet.
authorJINMEI Tatuya <jinmei@isc.org>
Wed, 19 Sep 2012 16:47:13 +0000 (09:47 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Wed, 19 Sep 2012 16:47:13 +0000 (09:47 -0700)
as suggested in review.

src/lib/datasrc/memory/memory_client.cc

index 46999df7f68d8159c88244cd7087a28579074cca..50ad775ea1e86a6c0958e49cb1ab7c01debd1c9f 100644 (file)
@@ -456,17 +456,14 @@ public:
         LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEMORY_MEM_ADD_RRSET).
             arg(rrset->getName()).arg(rrset->getType()).arg(zone_name);
 
-        if (rrset->getType() == RRType::NSEC3()) {
-            addRdataSet(zone_name, zone_data, rrset, sig_rrset);
-            return;
-        }
-
         // Add wildcards possibly contained in the owner name to the domain
-        // tree.
+        // tree.  This can only happen for the normal (non-NSEC3) tree.
         // Note: this can throw an exception, breaking strong exception
         // guarantee.  (see also the note for the call to contextCheck()
         // above).
-        addWildcards(zone_name, zone_data, rrset->getName());
+        if (rrset->getType() != RRType::NSEC3()) {
+            addWildcards(zone_name, zone_data, rrset->getName());
+        }
 
         addRdataSet(zone_name, zone_data, rrset, sig_rrset);