BIND 10 master, updated. 6070acd1c5b2f7a61574eda4035b93b40aab3e2b Merge branch 'master' of ssh://bind10.isc.org/var/bind10/git/bind10

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Mar 15 17:01:00 UTC 2011


The branch, master has been updated
       via  6070acd1c5b2f7a61574eda4035b93b40aab3e2b (commit)
       via  8da646ef1ffc59ac14234dc87882a8cf87b0e8dc (commit)
       via  061e18bd967f3a456ec53b531590cffd12d0698e (commit)
      from  fe7a9d0719b8ed30956d78f5564d8bd69ae3f9e3 (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 6070acd1c5b2f7a61574eda4035b93b40aab3e2b
Merge: 8da646e fe7a9d0
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Tue Mar 15 09:57:59 2011 -0700

    Merge branch 'master' of ssh://bind10.isc.org/var/bind10/git/bind10

commit 8da646ef1ffc59ac14234dc87882a8cf87b0e8dc
Merge: 8190099 061e18b
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Tue Mar 15 09:53:57 2011 -0700

    Merge branch 'trac646'

-----------------------------------------------------------------------

Summary of changes:
 src/lib/datasrc/data_source.cc            |    7 +++++++
 src/lib/datasrc/tests/datasrc_unittest.cc |   19 +++++++++++++++++++
 src/lib/datasrc/tests/test_datasrc.cc     |   17 ++++++++++++++++-
 3 files changed, 42 insertions(+), 1 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/data_source.cc b/src/lib/datasrc/data_source.cc
index c0da59b..c9819bb 100644
--- a/src/lib/datasrc/data_source.cc
+++ b/src/lib/datasrc/data_source.cc
@@ -1034,6 +1034,13 @@ DataSrc::doQuery(Query& q) {
             continue;
         } else if ((task->flags & (NAME_NOT_FOUND|TYPE_NOT_FOUND)) != 0) {
             // No data found at this qname/qtype.
+
+            // If we were looking for additional data, we should simply
+            // ignore this result.
+            if (task->state == QueryTask::GETADDITIONAL) {
+                continue;
+            }
+
             // If we were looking for answer data, not additional,
             // and the name was not found, we need to find out whether
             // there are any relevant wildcards.
diff --git a/src/lib/datasrc/tests/datasrc_unittest.cc b/src/lib/datasrc/tests/datasrc_unittest.cc
index 1771a41..810aef9 100644
--- a/src/lib/datasrc/tests/datasrc_unittest.cc
+++ b/src/lib/datasrc/tests/datasrc_unittest.cc
@@ -1059,6 +1059,25 @@ TEST_F(DataSrcTest, apexCNAMEZone) {
                  DataSourceError);
 }
 
+TEST_F(DataSrcTest, incompleteGlue) {
+    // One of the NS names belong to a different zone (which is still
+    // authoritative), and the glue is missing in that zone.  We should
+    // still return the existent glue.
+    // (nons.example is also broken in that it doesn't have apex NS, but
+    // that doesn't matter for this test)
+    createAndProcessQuery(Name("www.incompletechild.nons.example"),
+                          RRClass::IN(), RRType::A());
+    headerCheck(msg, qid, Rcode::NOERROR(), opcodeval,
+                QR_FLAG | RD_FLAG, 1, 0, 2, 1);
+    rrsetsCheck("incompletechild.nons.example. 3600 IN NS ns.incompletechild.nons.example.\n"
+                "incompletechild.nons.example. 3600 IN NS nx.nosoa.example.",
+                msg.beginSection(Message::SECTION_AUTHORITY),
+                msg.endSection(Message::SECTION_AUTHORITY));
+    rrsetsCheck("ns.incompletechild.nons.example. 3600 IN A 192.0.2.1",
+                msg.beginSection(Message::SECTION_ADDITIONAL),
+                msg.endSection(Message::SECTION_ADDITIONAL));
+}
+
 // currently fails
 TEST_F(DataSrcTest, DISABLED_synthesizedCnameTooLong) {
     // qname has the possible max length (255 octets).  it matches a DNAME,
diff --git a/src/lib/datasrc/tests/test_datasrc.cc b/src/lib/datasrc/tests/test_datasrc.cc
index 91d4068..c18f0bd 100644
--- a/src/lib/datasrc/tests/test_datasrc.cc
+++ b/src/lib/datasrc/tests/test_datasrc.cc
@@ -199,6 +199,7 @@ const struct RRData example_com_records[] = {
 
     {NULL, NULL, NULL}
 };
+
 const struct RRData example_com_glue_records[] = {
     {"ns1.subzone.example.com", "A", "192.0.2.1"},
     {"ns2.subzone.example.com", "A", "192.0.2.2"},
@@ -247,6 +248,20 @@ const struct RRData nons_example_records[] = {
      "1234 3600 1800 2419200 7200"},
     {"www.nons.example", "A", "192.0.2.1"},
     {"ns.nons.example", "A", "192.0.2.2"},
+
+    // One of the NS names is intentionally non existent in the zone it belongs
+    // to.  This delegation is used to see if we still return the NS and the
+    // existent glue.
+    // (These are not relevant to test the case for the "no NS" case.  We use
+    // this zone to minimize the number of test zones)
+    {"incompletechild.nons.example", "NS", "ns.incompletechild.nons.example"},
+    {"incompletechild.nons.example", "NS", "nx.nosoa.example"},
+
+    {NULL, NULL, NULL}
+};
+
+const struct RRData nons_example_glue_records[] = {
+    {"ns.incompletechild.nons.example", "A", "192.0.2.1"},
     {NULL, NULL, NULL}
 };
 
@@ -298,7 +313,7 @@ const struct ZoneData zone_data[] = {
     { "example.com", "IN", example_com_records, example_com_glue_records },
     { "sql1.example.com", "IN", sql1_example_com_records, empty_records },
     { "loop.example", "IN", loop_example_records, empty_records },
-    { "nons.example", "IN", nons_example_records, empty_records },
+    { "nons.example", "IN", nons_example_records, nons_example_glue_records },
     { "nons-dname.example", "IN", nonsdname_example_records, empty_records },
     { "nosoa.example", "IN", nosoa_example_records, empty_records },
     { "apexcname.example", "IN", nosoa_example_records, empty_records }




More information about the bind10-changes mailing list