BIND 10 trac1577, updated. 7130e28820b2e9e603f64546deebf12b410b897d [1577] Logging for findNSEC3
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Apr 12 12:36:55 UTC 2012
The branch, trac1577 has been updated
via 7130e28820b2e9e603f64546deebf12b410b897d (commit)
from a29df11575ac9b1aa036ab212b49f4706ba1e607 (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 7130e28820b2e9e603f64546deebf12b410b897d
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Thu Apr 12 14:36:45 2012 +0200
[1577] Logging for findNSEC3
-----------------------------------------------------------------------
Summary of changes:
src/lib/datasrc/database.cc | 15 ++++++++++++++-
src/lib/datasrc/datasrc_messages.mes | 29 +++++++++++++++++++++++++++++
2 files changed, 43 insertions(+), 1 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/database.cc b/src/lib/datasrc/database.cc
index f7b2f22..a57e3d1 100644
--- a/src/lib/datasrc/database.cc
+++ b/src/lib/datasrc/database.cc
@@ -941,7 +941,9 @@ DatabaseClient::Finder::findInternal(const Name& name, const RRType& type,
ZoneFinder::FindNSEC3Result
DatabaseClient::Finder::findNSEC3(const Name& name, bool recursive) {
- // TODO: Some logging.
+ LOG_DEBUG(logger, DBG_TRACE_BASIC, DATASRC_DATABASE_FINDNSEC3).arg(name).
+ arg(recursive ? "recursive" : "non-recursive");
+
// First, validate the input
const NameComparisonResult cmp_result(name.compare(getOrigin()));
@@ -980,6 +982,8 @@ DatabaseClient::Finder::findNSEC3(const Name& name, bool recursive) {
const string hash(calculator->calculate(labels == qlabels ? name :
name.split(qlabels - labels,
labels)));
+ LOG_DEBUG(logger, DBG_TRACE_BASIC, DATASRC_DATABASE_FINDNSEC3_TRYHASH).
+ arg(name).arg(labels).arg(hash);
DatabaseAccessor::IteratorContextPtr
context(accessor_->getNSEC3Records(hash, zone_id_));
@@ -999,10 +1003,16 @@ DatabaseClient::Finder::findNSEC3(const Name& name, bool recursive) {
"exists, but no NSEC3 there");
}
+ LOG_DEBUG(logger, DBG_TRACE_BASIC,
+ DATASRC_DATABASE_FINDNSEC3_MATCH).arg(name).arg(labels).
+ arg(*it->second);
return (FindNSEC3Result(true, labels, it->second, covering_proof));
} else {
const string prevHash(accessor_->findPreviousNSEC3Hash(zone_id_,
hash));
+ LOG_DEBUG(logger, DBG_TRACE_BASIC,
+ DATASRC_DATABASE_FINDNSEC3_TRYHASH_PREV).arg(name).
+ arg(labels).arg(prevHash);
context = accessor_->getNSEC3Records(prevHash, zone_id_);
const FoundRRsets prev_nsec3(getRRsets(prevHash + "." + otext,
NSEC3_TYPES(), false, NULL,
@@ -1021,6 +1031,9 @@ DatabaseClient::Finder::findNSEC3(const Name& name, bool recursive) {
covering_proof = prev_it->second;
if (!recursive) {
+ LOG_DEBUG(logger, DBG_TRACE_BASIC,
+ DATASRC_DATABASE_FINDNSEC3_COVER).arg(name).
+ arg(labels).arg(*covering_proof);
return (FindNSEC3Result(false, labels, covering_proof,
ConstRRsetPtr()));
}
diff --git a/src/lib/datasrc/datasrc_messages.mes b/src/lib/datasrc/datasrc_messages.mes
index ef46cb5..88cf185 100644
--- a/src/lib/datasrc/datasrc_messages.mes
+++ b/src/lib/datasrc/datasrc_messages.mes
@@ -75,6 +75,35 @@ The datasource tried to provide an NSEC proof that the named domain does not
exist, but the database backend doesn't support DNSSEC. No proof is included
in the answer as a result.
+% DATASRC_DATABASE_FINDNSEC3 Looking for NSEC3 for %1 in % mode
+Debug information. A search in an database data source for NSEC3 that
+matches or covers the given name is being started.
+
+% DATASRC_DATABASE_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_DATABASE_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_DATABSE_FINDNSEC3_TRYHASH).
+The found NSEC3 RRset is also displayed.
+
+% DATASRC_DATABASE_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_DATABASE_FINDNSEC3_TRYHASH_PREV looking for previous NSEC3 for %1 at label count %2 (hash %3)
+Debug information. An exact match on hash (see
+DATASRC_DATABASE_FINDNSEC3_TRYHASH) was unsuccessful. We get the previous hash
+to that one instead.
+
% DATASRC_DATABASE_FIND_RECORDS looking in datasource %1 for record %2/%3/%4
Debug information. The database data source is looking up records with the given
name and type in the database.
More information about the bind10-changes
mailing list