BIND 10 trac1608, updated. 0f0ab5b692e5670b0ff6774d0003a5f676a79dcc [1608] maintain NSEC3 RRsets in the form of RBNodeRRset(ptr), too.
BIND 10 source code commits
bind10-changes at lists.isc.org
Sat Mar 10 07:42:13 UTC 2012
The branch, trac1608 has been updated
via 0f0ab5b692e5670b0ff6774d0003a5f676a79dcc (commit)
from b87b288e07b97629fa80b36b0cfa0833727b785a (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 0f0ab5b692e5670b0ff6774d0003a5f676a79dcc
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Fri Mar 9 23:41:27 2012 -0800
[1608] maintain NSEC3 RRsets in the form of RBNodeRRset(ptr), too.
This will help compare RRsets for duplicate avoidance in an efficient mannter.
-----------------------------------------------------------------------
Summary of changes:
src/lib/datasrc/memory_datasrc.cc | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory_datasrc.cc b/src/lib/datasrc/memory_datasrc.cc
index 3ea5ce4..744d59b 100644
--- a/src/lib/datasrc/memory_datasrc.cc
+++ b/src/lib/datasrc/memory_datasrc.cc
@@ -88,7 +88,12 @@ const DomainNode::Flags DOMAINFLAG_GLUE = DomainNode::FLAG_USER2;
// (upper cased) of the owner name of the corresponding NSEC3 (i.e., map
// value). We can use the standard string comparison (if the comparison
// target is also upper cased) due to the nature of NSEC3 owner names.
-typedef map<string, ConstRRsetPtr> NSEC3Map;
+//
+// Note: We maintain the RRsets in the form of RBNodeRRset even if they are
+// not stored in the RB tree. The reason is because comparison can be
+// more efficient if we make sure all RRsets returned from this module are
+// of the same type.
+typedef map<string, ConstRBNodeRRsetPtr> NSEC3Map;
typedef NSEC3Map::value_type NSEC3Pair;
// Actual zone data: Essentially a set of zone's RRs. This is defined as
@@ -683,7 +688,8 @@ struct InMemoryZoneFinder::InMemoryZoneFinderImpl {
return (result::EXIST);
}
- zone_data.nsec3_data_->map_.insert(NSEC3Pair(fst_label, rrset));
+ zone_data.nsec3_data_->map_.insert(
+ NSEC3Pair(fst_label, ConstRBNodeRRsetPtr(new RBNodeRRset(rrset))));
return (result::SUCCESS);
}
@@ -1228,7 +1234,7 @@ InMemoryZoneFinder::findNSEC3(const Name& name, bool recursive) {
const unsigned int olabels = impl_->origin_.getLabelCount();
const unsigned int qlabels = name.getLabelCount();
- ConstRRsetPtr covering_proof; // placeholder of the next closer proof
+ ConstRBNodeRRsetPtr covering_proof; // placeholder of the next closer proof
// Examine all names from the query name to the origin name, stripping
// the deepest label one by one, until we find a name that has a matching
// NSEC3 hash.
More information about the bind10-changes
mailing list