]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2108] Check that loading a zone with wildcard DNAME names throws an exception
authorMukund Sivaraman <muks@isc.org>
Mon, 10 Sep 2012 01:32:58 +0000 (07:02 +0530)
committerMukund Sivaraman <muks@isc.org>
Mon, 10 Sep 2012 01:32:58 +0000 (07:02 +0530)
src/lib/datasrc/memory/tests/memory_client_unittest.cc
src/lib/datasrc/memory/tests/testdata/Makefile.am
src/lib/datasrc/memory/tests/testdata/example.org-wildcard-dname.zone [new file with mode: 0644]

index 69bf5baf486e63d94d9c1c92dcfaa94b30976fd9..64214d978d4e97269a3e8b1acc79abb9426b6978 100644 (file)
@@ -299,6 +299,15 @@ TEST_F(MemoryClientTest, loadWildcardNSThrows) {
     // 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
index a674a8b887df2e30197824800370a621fd6b3131..ad810b0e0544ae9674213c8637fa0b4d16ff7a0e 100644 (file)
@@ -19,3 +19,4 @@ 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 (file)
index 0000000..0d03b0d
--- /dev/null
@@ -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.