BIND 10 trac1483, updated. 86b08bc45b6e3c8934971625b8b189012ef51357 [1483] Logging for any queries
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Dec 15 13:35:39 UTC 2011
The branch, trac1483 has been updated
via 86b08bc45b6e3c8934971625b8b189012ef51357 (commit)
via 702631dc5f42c288ebb701eb5a8b67074f675de5 (commit)
via 0d0b9b0ebea1a12b35cdd646700f332c9f5a7cb5 (commit)
from d254b329691d43307184e78b33c2704eafa39f77 (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 86b08bc45b6e3c8934971625b8b189012ef51357
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Thu Dec 15 14:35:25 2011 +0100
[1483] Logging for any queries
commit 702631dc5f42c288ebb701eb5a8b67074f675de5
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Thu Dec 15 14:24:44 2011 +0100
[1483] Documentation
commit 0d0b9b0ebea1a12b35cdd646700f332c9f5a7cb5
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Thu Dec 15 14:16:53 2011 +0100
[1483] Enable any mode on getRRsets
-----------------------------------------------------------------------
Summary of changes:
src/lib/datasrc/database.cc | 15 ++++++++++-----
src/lib/datasrc/database.h | 6 ++++++
src/lib/datasrc/datasrc_messages.mes | 9 +++++++++
3 files changed, 25 insertions(+), 5 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/database.cc b/src/lib/datasrc/database.cc
index bc55cdf..9214de9 100644
--- a/src/lib/datasrc/database.cc
+++ b/src/lib/datasrc/database.cc
@@ -597,7 +597,7 @@ DatabaseClient::Finder::findWildcardMatch(
// RFC 4592 section 4.4).
// Search for a match. The types are the same as with original query.
FoundRRsets found = getRRsets(wildcard, final_types, true,
- &construct_name);
+ &construct_name, type == RRType::ANY());
if (found.first) {
// Found something - but what?
@@ -728,7 +728,10 @@ DatabaseClient::Finder::findOnNameResult(const Name& name,
DATASRC_DATABASE_FOUND_CNAME));
} else if (wti != found.second.end()) {
- if (type == RRType::ANY()) {
+ bool any(type == RRType::ANY());
+ isc::log::MessageID lid(wild ? DATASRC_DATABASE_WILDCARD_MATCH :
+ DATASRC_DATABASE_FOUND_RRSET);
+ if (any) {
// An ANY query, copy everything to the target instead of returning
// directly.
for (FoundIterator it(found.second.begin());
@@ -738,6 +741,8 @@ DatabaseClient::Finder::findOnNameResult(const Name& name,
target->push_back(it->second);
}
}
+ lid = wild ? DATASRC_DATABASE_WILDCARD_ANY :
+ DATASRC_DATABASE_FOUND_ANY;
}
// Found an RR matching the query, so return it. (Note that this
// includes the case where we were explicitly querying for a CNAME and
@@ -745,8 +750,7 @@ DatabaseClient::Finder::findOnNameResult(const Name& name,
// NS RRset and found it at the apex of the zone.)
return (logAndCreateResult(name, wildname, type,
wild ? WILDCARD : SUCCESS, wti->second,
- wild ? DATASRC_DATABASE_WILDCARD_MATCH :
- DATASRC_DATABASE_FOUND_RRSET));
+ lid));
}
// If we get here, we have found something at the requested name but not
@@ -863,7 +867,8 @@ DatabaseClient::Finder::findInternal(const isc::dns::Name& name,
WantedTypes final_types(FINAL_TYPES());
final_types.insert(type);
const FoundRRsets found = getRRsets(name.toText(), final_types,
- !is_origin);
+ !is_origin, NULL,
+ type == RRType::ANY());
if (found.first) {
// Something found at the domain name. Look into it further to get
diff --git a/src/lib/datasrc/database.h b/src/lib/datasrc/database.h
index 31ab432..fdbaa0a 100644
--- a/src/lib/datasrc/database.h
+++ b/src/lib/datasrc/database.h
@@ -925,6 +925,9 @@ public:
/// for ZoneFinder::FindOptions.
/// \param dresult Result of the search through the zone for a
/// delegation.
+ /// \param target If the type happens to be ANY, it will insert all
+ /// the RRsets of the found name (if any is found) here instead
+ /// of being returned by the result.
///
/// \return Tuple holding the result of the search - the RRset of the
/// wildcard records matching the name, together with a status
@@ -1005,6 +1008,9 @@ public:
/// for ZoneFinder::FindOptions.
/// \param dresult Result of the search through the zone for a
/// delegation.
+ /// \param target If the query is for type ANY, the successfull result,
+ /// if there happens to be one, will be returned through the
+ /// parameter, as it doesn't fit into the result.
///
/// \return Tuple holding the result of the search - the RRset of the
/// wildcard records matching the name, together with a status
diff --git a/src/lib/datasrc/datasrc_messages.mes b/src/lib/datasrc/datasrc_messages.mes
index 01fb082..fd46896 100644
--- a/src/lib/datasrc/datasrc_messages.mes
+++ b/src/lib/datasrc/datasrc_messages.mes
@@ -78,6 +78,10 @@ different TTL values. This isn't allowed on the wire and is considered
an error, so we set it to the lowest value we found (but we don't modify the
database). The data in database should be checked and fixed.
+% DATASRC_DATABASE_FOUND_ANY search in datasource %1 resulted in returning all records of %2
+The data returned by the database backend contained data for the given domain
+name, so all the RRsets of the domain are returned.
+
% DATASRC_DATABASE_FOUND_CNAME search in datasource %1 for %2/%3/%4 found CNAME, resulting in %5
When searching the domain for a name a CNAME was found at that name.
Even though it was not the RR type being sought, it is returned. (The
@@ -178,6 +182,11 @@ whether the data is still valid. The zone name, its class, and the
underlying database name as well as the error message thrown from the
database module are shown in the log message.
+% DATASRC_DATABASE_WILDCARD_ANY search in datasource %1 resulted in wildcard match type ANY on %2
+The database doesn't contain directly matching name. When searching
+for a wildcard match, a wildcard record matching the name of the query
+containing some RRsets was found. All the RRsets of the node are returned.
+
% DATASRC_DATABASE_WILDCARD_CANCEL_NS canceled wildcard match on %3 because %2 contains NS (data source %1)
The database was queried to provide glue data and it didn't find direct match.
It could create it from given wildcard, but matching wildcards is forbidden
More information about the bind10-changes
mailing list