[svn] commit: r4043 - in /branches/trac455/src/bin/auth: query.cc query.h
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Dec 28 13:15:50 UTC 2010
Author: vorner
Date: Tue Dec 28 13:15:50 2010
New Revision: 4043
Log:
Comments and documentation
Modified:
branches/trac455/src/bin/auth/query.cc
branches/trac455/src/bin/auth/query.h
Modified: branches/trac455/src/bin/auth/query.cc
==============================================================================
--- branches/trac455/src/bin/auth/query.cc (original)
+++ branches/trac455/src/bin/auth/query.cc Tue Dec 28 13:15:50 2010
@@ -77,10 +77,12 @@
// TODO : add NS to authority section, fill in additional section.
break;
case Zone::NXDOMAIN:
+ // Just empty answer with SOA in authority section
response_.setRcode(Rcode::NXDOMAIN());
putSOA(*result.zone);
break;
case Zone::NXRRSET:
+ // Just empty answer with SOA in authority section
response_.setRcode(Rcode::NOERROR());
putSOA(*result.zone);
break;
Modified: branches/trac455/src/bin/auth/query.h
==============================================================================
--- branches/trac455/src/bin/auth/query.h (original)
+++ branches/trac455/src/bin/auth/query.h Tue Dec 28 13:15:50 2010
@@ -103,16 +103,25 @@
/// providing compatible behavior may have its own benefit, so this point
/// should be revisited later.
///
- /// Right now this method never throws an exception, but it may in a
- /// future version.
+ /// This might throw BadZone or any of its specific subclasses.
void process() const;
+ /// \short Bad zone data encountered.
+ ///
+ /// This is thrown when process encounteres misconfigured zone in a way
+ /// it can't continue. This throws, not sets the Rcode, because such
+ /// misconfigured zone should not be present in the data source and
+ /// should have been rejected sooner.
struct BadZone : public isc::Exception {
BadZone(const char* file, size_t line, const char* what) :
Exception(file, line, what)
{ }
};
+ /// \short Zone is missing its SOA record.
+ ///
+ /// We tried to add a SOA into the authoritative section, but the zone
+ /// does not contain one.
struct NoSOA : public BadZone {
NoSOA(const char* file, size_t line, const char* what) :
BadZone(file, line, what)
@@ -124,6 +133,12 @@
const isc::dns::Name& qname_;
const isc::dns::RRType& qtype_;
isc::dns::Message& response_;
+ /**
+ * \short Adds a SOA.
+ *
+ * Adds a SOA of the zone into the authority zone of response_.
+ * Can throw NoSOA.
+ */
void putSOA(const isc::datasrc::Zone& zone) const;
};
More information about the bind10-changes
mailing list