BIND 10 trac1535, updated. 952cb2ceeb8e23145a18839d42b12641e520ecdb [1535] use OutOfZone instead of InvalidParameter in findNSEC3()
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Apr 2 09:45:03 UTC 2012
The branch, trac1535 has been updated
via 952cb2ceeb8e23145a18839d42b12641e520ecdb (commit)
from 65b293e59954c95c245f44691f5c82fdcd6579c9 (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 952cb2ceeb8e23145a18839d42b12641e520ecdb
Author: Jelte Jansen <jelte at isc.org>
Date: Mon Apr 2 11:44:42 2012 +0200
[1535] use OutOfZone instead of InvalidParameter in findNSEC3()
-----------------------------------------------------------------------
Summary of changes:
src/lib/datasrc/memory_datasrc.cc | 2 +-
src/lib/datasrc/tests/memory_datasrc_unittest.cc | 6 ++----
src/lib/datasrc/zone.h | 2 +-
3 files changed, 4 insertions(+), 6 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory_datasrc.cc b/src/lib/datasrc/memory_datasrc.cc
index 09d694d..4cfadfc 100644
--- a/src/lib/datasrc/memory_datasrc.cc
+++ b/src/lib/datasrc/memory_datasrc.cc
@@ -1350,7 +1350,7 @@ InMemoryZoneFinder::findNSEC3(const Name& name, bool recursive) {
const NameComparisonResult cmp_result = name.compare(impl_->origin_);
if (cmp_result.getRelation() != NameComparisonResult::EQUAL &&
cmp_result.getRelation() != NameComparisonResult::SUBDOMAIN) {
- isc_throw(InvalidParameter, "findNSEC3 attempt for out-of-zone name: "
+ isc_throw(OutOfZone, "findNSEC3 attempt for out-of-zone name: "
<< name << ", zone: " << impl_->origin_ << "/"
<< impl_->zone_class_);
}
diff --git a/src/lib/datasrc/tests/memory_datasrc_unittest.cc b/src/lib/datasrc/tests/memory_datasrc_unittest.cc
index 925f01f..a19808f 100644
--- a/src/lib/datasrc/tests/memory_datasrc_unittest.cc
+++ b/src/lib/datasrc/tests/memory_datasrc_unittest.cc
@@ -1969,10 +1969,8 @@ TEST_F(InMemoryZoneFinderTest, findNSEC3) {
EXPECT_EQ(result::SUCCESS, zone_finder_.add(textToRRset(zzz_nsec3_text)));
// Parameter validation: the query name must be in or below the zone
- EXPECT_THROW(zone_finder_.findNSEC3(Name("example.com"), false),
- isc::InvalidParameter);
- EXPECT_THROW(zone_finder_.findNSEC3(Name("org"), true),
- isc::InvalidParameter);
+ EXPECT_THROW(zone_finder_.findNSEC3(Name("example.com"), false), OutOfZone);
+ EXPECT_THROW(zone_finder_.findNSEC3(Name("org"), true), OutOfZone);
// Apex name. It should have a matching NSEC3.
{
diff --git a/src/lib/datasrc/zone.h b/src/lib/datasrc/zone.h
index 2b8a2a0..c68a01c 100644
--- a/src/lib/datasrc/zone.h
+++ b/src/lib/datasrc/zone.h
@@ -601,7 +601,7 @@ public:
/// algorithm, and salt) from the zone as noted above. If these
/// assumptions aren't met, \c DataSourceError exception will be thrown.
///
- /// \exception InvalidParameter name is not a subdomain of the zone origin
+ /// \exception OutOfZone name is not a subdomain of the zone origin
/// \exception DataSourceError Low-level or internal datasource errors
/// happened, or the zone isn't properly signed with NSEC3
/// (NSEC3 parameters cannot be found, no NSEC3s are available, etc).
More information about the bind10-changes
mailing list