BIND 10 trac1570, updated. 82caa5734136ca29981a5107c9b0e4f644a573cf [1570] wording fix in a doxygen comment as noted in review
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Feb 6 18:43:06 UTC 2012
The branch, trac1570 has been updated
via 82caa5734136ca29981a5107c9b0e4f644a573cf (commit)
via 6b45467a71b534657a435dbb455f0ec3da99d16a (commit)
via 170556d806125d1556fa570070b9f876c97df30c (commit)
via 42b7d6a5c8f04659a4463d932b95e5305d6de3f7 (commit)
via b82c78512d63424b805e1ab15e6b781e4d923dbd (commit)
from 53cde03994472c09094721f94307f46599c0d1d5 (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 82caa5734136ca29981a5107c9b0e4f644a573cf
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Mon Feb 6 10:42:46 2012 -0800
[1570] wording fix in a doxygen comment as noted in review
commit 6b45467a71b534657a435dbb455f0ec3da99d16a
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Mon Feb 6 10:38:41 2012 -0800
[1570] trivial wording fixes in comments
commit 170556d806125d1556fa570070b9f876c97df30c
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Mon Feb 6 10:27:50 2012 -0800
[1570] added a new test, dsAboveDelegationNoData, to check "no data" at parent
case.
commit 42b7d6a5c8f04659a4463d932b95e5305d6de3f7
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Mon Feb 6 10:09:27 2012 -0800
[1570] updated the description comment for dsBelowDelegation so it describes
the point of the test more accurately.
commit b82c78512d63424b805e1ab15e6b781e4d923dbd
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Mon Feb 6 09:57:08 2012 -0800
[1570] cosmetic changes as requested in review: placed RR strings in separate
lines.
-----------------------------------------------------------------------
Summary of changes:
src/bin/auth/query.h | 2 +-
src/bin/auth/tests/query_unittest.cc | 66 ++++++++++++++++++++++++++-------
2 files changed, 53 insertions(+), 15 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/auth/query.h b/src/bin/auth/query.h
index a2dd21e..bf1e23e 100644
--- a/src/bin/auth/query.h
+++ b/src/bin/auth/query.h
@@ -180,7 +180,7 @@ private:
/// \brief Process a DS query possible at the child side of zone cut.
///
- /// This private method is a subroutine of process(), and is called
+ /// This private method is a subroutine of process(), and is called if
/// there's a possibility that this server has authority for the child
/// side of the DS's owner name (and it's detected that the server at
/// least doesn't have authority at the parent side). This method
diff --git a/src/bin/auth/tests/query_unittest.cc b/src/bin/auth/tests/query_unittest.cc
index 4832ccd..8701767 100644
--- a/src/bin/auth/tests/query_unittest.cc
+++ b/src/bin/auth/tests/query_unittest.cc
@@ -52,7 +52,16 @@ namespace {
// dns::masterLoad(). Some of the RRs are also used as the expected
// data in specific tests, in which case they are referenced via specific
// local variables (such as soa_txt).
-const char* const soa_txt = "example.com. 3600 IN SOA . . 0 0 0 0 0\n";
+//
+// For readability consistency, all strings are placed in a separate line,
+// even if they are very short and can reasonably fit in a single line with
+// the corresponding variable. For example, we write
+// const char* const foo_txt =
+// "foo.example.com. 3600 IN AAAA 2001:db8::1\n";
+// instead of
+// const char* const foo_txt = "foo.example.com. 3600 IN AAAA 2001:db8::1\n";
+const char* const soa_txt =
+ "example.com. 3600 IN SOA . . 0 0 0 0 0\n";
const char* const zone_ns_txt =
"example.com. 3600 IN NS glue.delegation.example.com.\n"
"example.com. 3600 IN NS noglue.example.com.\n"
@@ -77,7 +86,8 @@ const char* const mx_txt =
"mx.example.com. 3600 IN MX 10 www.example.com.\n"
"mx.example.com. 3600 IN MX 20 mailer.example.org.\n"
"mx.example.com. 3600 IN MX 30 mx.delegation.example.com.\n";
-const char* const www_a_txt = "www.example.com. 3600 IN A 192.0.2.80\n";
+const char* const www_a_txt =
+ "www.example.com. 3600 IN A 192.0.2.80\n";
const char* const cname_txt =
"cname.example.com. 3600 IN CNAME www.example.com.\n";
const char* const cname_nxdom_txt =
@@ -102,13 +112,15 @@ const char* const other_zone_rrs =
"cnamemx.example.com. 3600 IN MX 10 cnamemailer.example.com.\n"
"mx.delegation.example.com. 3600 IN A 192.0.2.100\n";
// Wildcards
-const char* const wild_txt = "*.wild.example.com. 3600 IN A 192.0.2.7\n";
+const char* const wild_txt =
+ "*.wild.example.com. 3600 IN A 192.0.2.7\n";
const char* const nsec_wild_txt =
"*.wild.example.com. 3600 IN NSEC www.example.com. A NSEC RRSIG\n";
const char* const cnamewild_txt =
"*.cnamewild.example.com. 3600 IN CNAME www.example.org.\n";
-const char* const nsec_cnamewild_txt = "*.cnamewild.example.com. "
- "3600 IN NSEC delegation.example.com. CNAME NSEC RRSIG\n";
+const char* const nsec_cnamewild_txt =
+ "*.cnamewild.example.com. 3600 IN NSEC "
+ "delegation.example.com. CNAME NSEC RRSIG\n";
// Wildcard_nxrrset
const char* const wild_txt_nxrrset =
"*.uwild.example.com. 3600 IN A 192.0.2.9\n";
@@ -119,10 +131,12 @@ const char* const wild_txt_next =
const char* const nsec_wild_txt_next =
"www.uwild.example.com. 3600 IN NSEC *.wild.example.com. A NSEC RRSIG\n";
// Wildcard empty
-const char* const empty_txt = "b.*.t.example.com. 3600 IN A 192.0.2.13\n";
+const char* const empty_txt =
+ "b.*.t.example.com. 3600 IN A 192.0.2.13\n";
const char* const nsec_empty_txt =
"b.*.t.example.com. 3600 IN NSEC *.uwild.example.com. A NSEC RRSIG\n";
-const char* const empty_prev_txt = "t.example.com. 3600 IN A 192.0.2.15\n";
+const char* const empty_prev_txt =
+ "t.example.com. 3600 IN A 192.0.2.15\n";
const char* const nsec_empty_prev_txt =
"t.example.com. 3600 IN NSEC b.*.t.example.com. A NSEC RRSIG\n";
// Used in NXDOMAIN proof test. We are going to test some unusual case where
@@ -160,7 +174,8 @@ const char* const nsec_www_txt =
"www.example.com. 3600 IN NSEC example.com. A NSEC RRSIG\n";
// Authoritative data without NSEC
-const char* const nonsec_a_txt = "nonsec.example.com. 3600 IN A 192.0.2.0\n";
+const char* const nonsec_a_txt =
+ "nonsec.example.com. 3600 IN A 192.0.2.0\n";
// NSEC3 RRs. You may also need to add mapping to MockZoneFinder::hash_map_.
const char* const nsec3_apex_txt =
@@ -1714,10 +1729,33 @@ TEST_F(QueryTest, dsAboveDelegation) {
ns_addrs_and_sig_txt.c_str());
}
-// This one checks a DS record at the apex is not returned, as it is
-// authoritative above the delegation and does not exist below it,
-// as described in RFC 4035, section 3.1.4.1. The example is inspired by the
-// B.8. example from the RFC.
+TEST_F(QueryTest, dsAboveDelegationNoData) {
+ // Similar to the previous case, but the query is for an unsigned zone
+ // (which doesn't have a DS at the parent). The response should be a
+ // "no data" error. The query should still be handled at the parent.
+ memory_client.addZone(ZoneFinderPtr(
+ new AlternateZoneFinder(
+ Name("unsigned-delegation.example.com"))));
+
+ // The following will succeed only if the search goes to the parent
+ // zone, not the child one we added above.
+ EXPECT_NO_THROW(Query(memory_client,
+ Name("unsigned-delegation.example.com"),
+ RRType::DS(), response, true).process());
+
+ responseCheck(response, Rcode::NOERROR(), AA_FLAG, 0, 4, 0, NULL,
+ (string(soa_txt) +
+ string("example.com. 3600 IN RRSIG ") +
+ getCommonRRSIGText("SOA") + "\n" +
+ string(unsigned_delegation_nsec_txt) +
+ "unsigned-delegation.example.com. 3600 IN RRSIG " +
+ getCommonRRSIGText("NSEC")).c_str(),
+ NULL, mock_finder->getOrigin());
+}
+
+// This one checks that type-DS query results in a "no data" response
+// when it happens to be sent to the child zone, as described in RFC 4035,
+// section 3.1.4.1. The example is inspired by the B.8. example from the RFC.
TEST_F(QueryTest, dsBelowDelegation) {
EXPECT_NO_THROW(Query(memory_client, Name("example.com"),
RRType::DS(), response, true).process());
@@ -1754,8 +1792,8 @@ TEST_F(QueryTest, dsNoZone) {
responseCheck(response, Rcode::REFUSED(), 0, 0, 0, 0, NULL, NULL, NULL);
}
-// DS query for a "grandchild" zone. This should be result in normal
-// delegation (unless this server also has authority of grandchild zone).
+// DS query for a "grandchild" zone. This should result in normal
+// delegation (unless this server also has authority of the grandchild zone).
TEST_F(QueryTest, dsAtGrandParent) {
Query(memory_client, Name("grand.delegation.example.com"), RRType::DS(),
response, true).process();
More information about the bind10-changes
mailing list