|
@@ -26,7 +26,7 @@
|
|
|
#include <dns/rrttl.h>
|
|
|
#include <dns/nsec3hash.h>
|
|
|
|
|
|
-#include <datasrc/logger.h>
|
|
|
+#include <datasrc/memory/logger.h>
|
|
|
|
|
|
#include <util/buffer.h>
|
|
|
|
|
@@ -168,7 +168,7 @@ bool cutCallback(const ZoneNode& node, FindState* state) {
|
|
|
RRType::DNAME());
|
|
|
|
|
|
if (found_dname != NULL) {
|
|
|
- LOG_DEBUG(logger, DBG_TRACE_DETAILED, DATASRC_MEM_DNAME_ENCOUNTERED);
|
|
|
+ LOG_DEBUG(logger, DBG_TRACE_DETAILED, DATASRC_MEMORY_DNAME_ENCOUNTERED);
|
|
|
state->dname_node_ = &node;
|
|
|
state->rdataset_ = found_dname;
|
|
|
return (true);
|
|
@@ -183,7 +183,7 @@ bool cutCallback(const ZoneNode& node, FindState* state) {
|
|
|
return (false);
|
|
|
}
|
|
|
|
|
|
- LOG_DEBUG(logger, DBG_TRACE_DETAILED, DATASRC_MEM_NS_ENCOUNTERED);
|
|
|
+ LOG_DEBUG(logger, DBG_TRACE_DETAILED, DATASRC_MEMORY_NS_ENCOUNTERED);
|
|
|
|
|
|
// BIND 9 checks if this node is not the origin. That's probably
|
|
|
// because it can support multiple versions for dynamic updates
|
|
@@ -483,13 +483,13 @@ FindNodeResult findNode(const ZoneData& zone_data,
|
|
|
} else if (result == ZoneTree::PARTIALMATCH) {
|
|
|
assert(node != NULL);
|
|
|
if (state.dname_node_ != NULL) { // DNAME
|
|
|
- LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEM_DNAME_FOUND).
|
|
|
+ LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEMORY_DNAME_FOUND).
|
|
|
arg(state.dname_node_->getName());
|
|
|
return (FindNodeResult(ZoneFinder::DNAME, state.dname_node_,
|
|
|
state.rdataset_));
|
|
|
}
|
|
|
if (state.zonecut_node_ != NULL) { // DELEGATION due to NS
|
|
|
- LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEM_DELEG_FOUND).
|
|
|
+ LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEMORY_DELEG_FOUND).
|
|
|
arg(state.zonecut_node_->getName());
|
|
|
return (FindNodeResult(ZoneFinder::DELEGATION,
|
|
|
state.zonecut_node_,
|
|
@@ -498,7 +498,7 @@ FindNodeResult findNode(const ZoneData& zone_data,
|
|
|
if (node_path.getLastComparisonResult().getRelation() ==
|
|
|
NameComparisonResult::SUPERDOMAIN) { // empty node, so NXRRSET
|
|
|
LOG_DEBUG(logger, DBG_TRACE_DATA,
|
|
|
- DATASRC_MEM_SUPER_STOP).arg(name_labels);
|
|
|
+ DATASRC_MEMORY_SUPER_STOP).arg(name_labels);
|
|
|
ConstNodeRRset nsec_rrset = getClosestNSEC(zone_data, node_path,
|
|
|
options);
|
|
|
return (FindNodeResult(ZoneFinder::NXRRSET, nsec_rrset.first,
|
|
@@ -516,7 +516,7 @@ FindNodeResult findNode(const ZoneData& zone_data,
|
|
|
// baz.foo.wild.example. The common ancestor, foo.wild.example,
|
|
|
// should cancel wildcard. Treat it as NXDOMAIN.
|
|
|
LOG_DEBUG(logger, DBG_TRACE_DATA,
|
|
|
- DATASRC_MEM_WILDCARD_CANCEL).arg(name_labels);
|
|
|
+ DATASRC_MEMORY_WILDCARD_CANCEL).arg(name_labels);
|
|
|
ConstNodeRRset nsec_rrset = getClosestNSEC(zone_data,
|
|
|
node_path,
|
|
|
options);
|
|
@@ -546,7 +546,7 @@ FindNodeResult findNode(const ZoneData& zone_data,
|
|
|
FindNodeResult::FIND_WILDCARD | zonecut_flag));
|
|
|
}
|
|
|
|
|
|
- LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEM_NOT_FOUND).
|
|
|
+ LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEMORY_NOT_FOUND).
|
|
|
arg(name_labels);
|
|
|
ConstNodeRRset nsec_rrset = getClosestNSEC(zone_data, node_path,
|
|
|
options);
|
|
@@ -784,7 +784,7 @@ InMemoryZoneFinder::findAtOrigin(const isc::dns::RRType& type,
|
|
|
const RdataSet* const found = RdataSet::find(node->getData(), type);
|
|
|
|
|
|
if (found != NULL) {
|
|
|
- LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEM_FIND_TYPE_AT_ORIGIN).
|
|
|
+ LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEMORY_FIND_TYPE_AT_ORIGIN).
|
|
|
arg(type).arg(getOrigin()).arg(rrclass_);
|
|
|
return (ZoneFinderContextPtr(
|
|
|
new Context(*this, options, rrclass_,
|
|
@@ -830,7 +830,7 @@ InMemoryZoneFinder::findInternal(const isc::dns::Name& name,
|
|
|
// If there is an exact match but the node is empty, it's equivalent
|
|
|
// to NXRRSET.
|
|
|
if (node->isEmpty()) {
|
|
|
- LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEM_DOMAIN_EMPTY).
|
|
|
+ LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEMORY_DOMAIN_EMPTY).
|
|
|
arg(name);
|
|
|
ConstNodeRRset nsec_rrset = getClosestNSEC(zone_data_, node_path,
|
|
|
options);
|
|
@@ -853,7 +853,7 @@ InMemoryZoneFinder::findInternal(const isc::dns::Name& name,
|
|
|
found = RdataSet::find(node->getData(), RRType::NS());
|
|
|
if (found != NULL) {
|
|
|
LOG_DEBUG(logger, DBG_TRACE_DATA,
|
|
|
- DATASRC_MEM_EXACT_DELEGATION).arg(name);
|
|
|
+ DATASRC_MEMORY_EXACT_DELEGATION).arg(name);
|
|
|
return (createFindResult(rrclass_, zone_data_, DELEGATION,
|
|
|
node, found, options, wild, &name));
|
|
|
}
|
|
@@ -868,7 +868,7 @@ InMemoryZoneFinder::findInternal(const isc::dns::Name& name,
|
|
|
options, &name));
|
|
|
cur_rds = cur_rds->getNext();
|
|
|
}
|
|
|
- LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEM_ANY_SUCCESS).
|
|
|
+ LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEMORY_ANY_SUCCESS).
|
|
|
arg(name);
|
|
|
return (createFindResult(rrclass_, zone_data_, SUCCESS, node, NULL,
|
|
|
options, wild, &name));
|
|
@@ -877,7 +877,7 @@ InMemoryZoneFinder::findInternal(const isc::dns::Name& name,
|
|
|
found = RdataSet::find(node->getData(), type);
|
|
|
if (found != NULL) {
|
|
|
// Good, it is here
|
|
|
- LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEM_SUCCESS).arg(name).
|
|
|
+ LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEMORY_SUCCESS).arg(name).
|
|
|
arg(type);
|
|
|
return (createFindResult(rrclass_, zone_data_, SUCCESS, node, found,
|
|
|
options, wild, &name));
|
|
@@ -886,7 +886,7 @@ InMemoryZoneFinder::findInternal(const isc::dns::Name& name,
|
|
|
found = RdataSet::find(node->getData(), RRType::CNAME());
|
|
|
if (found != NULL) {
|
|
|
|
|
|
- LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEM_CNAME).arg(name);
|
|
|
+ LOG_DEBUG(logger, DBG_TRACE_DATA, DATASRC_MEMORY_CNAME).arg(name);
|
|
|
return (createFindResult(rrclass_, zone_data_, CNAME, node, found,
|
|
|
options, wild, &name));
|
|
|
}
|
|
@@ -899,7 +899,7 @@ InMemoryZoneFinder::findInternal(const isc::dns::Name& name,
|
|
|
|
|
|
isc::datasrc::ZoneFinder::FindNSEC3Result
|
|
|
InMemoryZoneFinder::findNSEC3(const isc::dns::Name& name, bool recursive) {
|
|
|
- LOG_DEBUG(logger, DBG_TRACE_BASIC, DATASRC_MEM_FINDNSEC3).arg(name).
|
|
|
+ LOG_DEBUG(logger, DBG_TRACE_BASIC, DATASRC_MEMORY_FINDNSEC3).arg(name).
|
|
|
arg(recursive ? "recursive" : "non-recursive");
|
|
|
|
|
|
uint8_t labels_buf[LabelSequence::MAX_SERIALIZED_LENGTH];
|
|
@@ -966,7 +966,7 @@ InMemoryZoneFinder::findNSEC3(const isc::dns::Name& name, bool recursive) {
|
|
|
name : name.split(qlabels - labels, labels));
|
|
|
const std::string hlabel = hash->calculate(hname);
|
|
|
|
|
|
- LOG_DEBUG(logger, DBG_TRACE_BASIC, DATASRC_MEM_FINDNSEC3_TRYHASH).
|
|
|
+ LOG_DEBUG(logger, DBG_TRACE_BASIC, DATASRC_MEMORY_FINDNSEC3_TRYHASH).
|
|
|
arg(name).arg(labels).arg(hlabel);
|
|
|
|
|
|
node = NULL;
|
|
@@ -989,7 +989,7 @@ InMemoryZoneFinder::findNSEC3(const isc::dns::Name& name, bool recursive) {
|
|
|
}
|
|
|
|
|
|
LOG_DEBUG(logger, DBG_TRACE_BASIC,
|
|
|
- DATASRC_MEM_FINDNSEC3_MATCH).arg(name).arg(labels).
|
|
|
+ DATASRC_MEMORY_FINDNSEC3_MATCH).arg(name).arg(labels).
|
|
|
arg(*closest);
|
|
|
|
|
|
return (FindNSEC3Result(true, labels, closest, next));
|
|
@@ -1008,7 +1008,7 @@ InMemoryZoneFinder::findNSEC3(const isc::dns::Name& name, bool recursive) {
|
|
|
closest = createNSEC3RRset(covering_node, getClass());
|
|
|
|
|
|
LOG_DEBUG(logger, DBG_TRACE_BASIC,
|
|
|
- DATASRC_MEM_FINDNSEC3_COVER).
|
|
|
+ DATASRC_MEMORY_FINDNSEC3_COVER).
|
|
|
arg(name).arg(*closest);
|
|
|
}
|
|
|
|