BIND 10 trac2108_3, updated. 15bdb89898addbb7149479a083af674c545755d7 [2108] Check that loading a zone with wildcard DNAME names throws an exception

BIND 10 source code commits bind10-changes at lists.isc.org
Mon Sep 10 01:33:12 UTC 2012


The branch, trac2108_3 has been updated
       via  15bdb89898addbb7149479a083af674c545755d7 (commit)
       via  86d8c6421097faeb05a2abc1638c61c44913bd27 (commit)
      from  5a70502ad2679d135e26db9f3eb0a523eefd83e6 (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 15bdb89898addbb7149479a083af674c545755d7
Author: Mukund Sivaraman <muks at isc.org>
Date:   Mon Sep 10 07:02:58 2012 +0530

    [2108] Check that loading a zone with wildcard DNAME names throws an exception

commit 86d8c6421097faeb05a2abc1638c61c44913bd27
Author: Mukund Sivaraman <muks at isc.org>
Date:   Mon Sep 10 07:00:20 2012 +0530

    [2108] Check that loading a zone with wildcard NS names throws an exception

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

Summary of changes:
 .../datasrc/memory/tests/memory_client_unittest.cc |   18 ++++++++++++++++++
 src/lib/datasrc/memory/tests/testdata/Makefile.am  |    2 ++
 .../tests/testdata/example.org-wildcard-dname.zone |    4 ++++
 .../tests/testdata/example.org-wildcard-ns.zone    |    4 ++++
 4 files changed, 28 insertions(+)
 create mode 100644 src/lib/datasrc/memory/tests/testdata/example.org-wildcard-dname.zone
 create mode 100644 src/lib/datasrc/memory/tests/testdata/example.org-wildcard-ns.zone

-----------------------------------------------------------------------
diff --git a/src/lib/datasrc/memory/tests/memory_client_unittest.cc b/src/lib/datasrc/memory/tests/memory_client_unittest.cc
index 18dacab..64214d9 100644
--- a/src/lib/datasrc/memory/tests/memory_client_unittest.cc
+++ b/src/lib/datasrc/memory/tests/memory_client_unittest.cc
@@ -290,6 +290,24 @@ TEST_F(MemoryClientTest, loadOutOfZoneThrows) {
     // Teardown checks for memory segment leaks
 }
 
+TEST_F(MemoryClientTest, loadWildcardNSThrows) {
+    // Wildcard NS names should throw
+    EXPECT_THROW(client_->load(Name("example.org"),
+                               TEST_DATA_DIR
+                               "/example.org-wildcard-ns.zone"),
+                 InMemoryClient::AddError);
+    // Teardown checks for memory segment leaks
+}
+
+TEST_F(MemoryClientTest, loadWildcardDNAMEThrows) {
+    // Wildcard NS names should throw
+    EXPECT_THROW(client_->load(Name("example.org"),
+                               TEST_DATA_DIR
+                               "/example.org-wildcard-dname.zone"),
+                 InMemoryClient::AddError);
+    // Teardown checks for memory segment leaks
+}
+
 TEST_F(MemoryClientTest, loadRRSIGFollowsNothing) {
     EXPECT_THROW(client_->load(Name("example.org"),
                                TEST_DATA_DIR
diff --git a/src/lib/datasrc/memory/tests/testdata/Makefile.am b/src/lib/datasrc/memory/tests/testdata/Makefile.am
index 50d68b3..ad810b0 100644
--- a/src/lib/datasrc/memory/tests/testdata/Makefile.am
+++ b/src/lib/datasrc/memory/tests/testdata/Makefile.am
@@ -18,3 +18,5 @@ EXTRA_DIST += example.org-multiple-nsec3param.zone
 EXTRA_DIST += example.org-nsec3-signed.zone
 EXTRA_DIST += example.org-nsec3-signed-no-param.zone
 EXTRA_DIST += example.org-out-of-zone.zone
+EXTRA_DIST += example.org-wildcard-ns.zone
+EXTRA_DIST += example.org-wildcard-dname.zone
diff --git a/src/lib/datasrc/memory/tests/testdata/example.org-wildcard-dname.zone b/src/lib/datasrc/memory/tests/testdata/example.org-wildcard-dname.zone
new file mode 100644
index 0000000..0d03b0d
--- /dev/null
+++ b/src/lib/datasrc/memory/tests/testdata/example.org-wildcard-dname.zone
@@ -0,0 +1,4 @@
+;; test zone file with wildcard DNAME names
+
+example.org. 3600 IN SOA	ns1.example.org. bugs.x.w.example.org. 79 3600 300 3600000 3600
+*.example.org. 3600 IN DNAME dname.example.com.
diff --git a/src/lib/datasrc/memory/tests/testdata/example.org-wildcard-ns.zone b/src/lib/datasrc/memory/tests/testdata/example.org-wildcard-ns.zone
new file mode 100644
index 0000000..2933515
--- /dev/null
+++ b/src/lib/datasrc/memory/tests/testdata/example.org-wildcard-ns.zone
@@ -0,0 +1,4 @@
+;; test zone file with wildcard NS names
+
+example.org. 3600 IN SOA	ns1.example.org. bugs.x.w.example.org. 78 3600 300 3600000 3600
+*.example.org.			      3600 IN NS	ns1.example.org.



More information about the bind10-changes mailing list