BIND 10 trac1576, updated. 5eaa333fe39ddc02af78ffceba8173497e1352c3 [1576] added log messages for findNSEC3
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Feb 8 05:34:49 UTC 2012
The branch, trac1576 has been updated
via 5eaa333fe39ddc02af78ffceba8173497e1352c3 (commit)
from 82f947e1bc6978f7bde731955b96dc5c68840a6f (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 5eaa333fe39ddc02af78ffceba8173497e1352c3
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Tue Feb 7 21:34:27 2012 -0800
[1576] added log messages for findNSEC3
-----------------------------------------------------------------------
Summary of changes:
src/lib/datasrc/datasrc_messages.mes | 24 ++++++++++++++++++++++++
src/lib/datasrc/memory_datasrc.cc | 11 +++++++++++
2 files changed, 35 insertions(+), 0 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/datasrc_messages.mes b/src/lib/datasrc/datasrc_messages.mes
index f05ff21..d8ad07b 100644
--- a/src/lib/datasrc/datasrc_messages.mes
+++ b/src/lib/datasrc/datasrc_messages.mes
@@ -332,6 +332,30 @@ should be followed. The requested domain is an apex of some zone.
% DATASRC_MEM_FIND find '%1/%2'
Debug information. A search for the requested RRset is being started.
+% DATASRC_MEM_FINDNSEC3 finding NSEC3 for %1, mode %2
+Debug information. A search in an in-memory data source for NSEC3 that
+matches or covers the given name is being started.
+
+% DATASRC_MEM_FINDNSEC3_COVER found a covering NSEC3 for %1: %2
+Debug information. An NSEC3 that covers the given name is found and
+being returned. The found NSEC3 RRset is also displayed.
+
+% DATASRC_MEM_FINDNSEC3_MATCH found a matching NSEC3 for %1 at label count %2: %3
+Debug information. An NSEC3 that matches (a possibly superdomain of)
+the given name is found and being returned. When the shown label
+count is smaller than that of the given name, the matching NSEC3 is
+for a superdomain of the given name (see DATASRC_MEM_FINDNSEC3_TRYHASH).
+The found NSEC3 RRset is also displayed.
+
+% DATASRC_MEM_FINDNSEC3_TRYHASH looking for NSEC3 for %1 at label count %2 (hash %3)
+Debug information. In an attempt of finding an NSEC3 for the give name,
+(a possibly superdomain of) the name is hashed and searched for in the
+NSEC3 name space. When the shown label count is smaller than that of the
+shown name, the search tries the superdomain name that share the shown
+(higher) label count of the shown name (e.g., for
+www.example.com. with shown label count of 3, example.com. is being
+tried).
+
% DATASRC_MEM_FIND_ZONE looking for zone '%1'
Debug information. A zone object for this zone is being searched for in the
in-memory data source.
diff --git a/src/lib/datasrc/memory_datasrc.cc b/src/lib/datasrc/memory_datasrc.cc
index e368b53..5137727 100644
--- a/src/lib/datasrc/memory_datasrc.cc
+++ b/src/lib/datasrc/memory_datasrc.cc
@@ -882,6 +882,9 @@ InMemoryZoneFinder::findAll(const Name& name,
ZoneFinder::FindNSEC3Result
InMemoryZoneFinder::findNSEC3(const Name& name, bool recursive) {
+ LOG_DEBUG(logger, DBG_TRACE_BASIC, DATASRC_MEM_FINDNSEC3).arg(name).
+ arg(recursive ? "recursive" : "non-recursive");
+
if (!impl_->zone_data_->nsec3_data_) {
isc_throw(DataSourceError,
"findNSEC3 attempt for non NSEC3 signed zone: " <<
@@ -914,6 +917,8 @@ InMemoryZoneFinder::findNSEC3(const Name& name, bool recursive) {
const string hlabel = nsec3hash.calculate(
labels == qlabels ? name : name.split(qlabels - labels, labels));
NSEC3Map::const_iterator found = map.lower_bound(hlabel);
+ LOG_DEBUG(logger, DBG_TRACE_BASIC, DATASRC_MEM_FINDNSEC3_TRYHASH).
+ arg(name).arg(labels).arg(hlabel);
// If the given hash is larger than the largest stored hash or
// the first label doesn't match the target, identify the "previous"
@@ -932,10 +937,16 @@ InMemoryZoneFinder::findNSEC3(const Name& name, bool recursive) {
covering_proof = (--found)->second;
}
if (!recursive) { // in non recursive mode, we are done.
+ LOG_DEBUG(logger, DBG_TRACE_BASIC,
+ DATASRC_MEM_FINDNSEC3_COVER).
+ arg(name).arg(*covering_proof);
return (FindNSEC3Result(false, labels, covering_proof,
ConstRRsetPtr()));
}
} else { // found an exact match.
+ LOG_DEBUG(logger, DBG_TRACE_BASIC,
+ DATASRC_MEM_FINDNSEC3_MATCH).arg(name).arg(labels).
+ arg(*found->second);
return (FindNSEC3Result(true, labels, found->second,
covering_proof));
}
More information about the bind10-changes
mailing list