Parcourir la source

added another failure case in wildcard matching
(currently disabled, so directly committing to trunk)


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@2513 e5f2f494-b856-4b98-b285-d166d9295462

JINMEI Tatuya il y a 15 ans
Parent
commit
4ff6f8e0f3
1 fichiers modifiés avec 8 ajouts et 0 suppressions
  1. 8 0
      src/lib/datasrc/tests/datasrc_unittest.cc

+ 8 - 0
src/lib/datasrc/tests/datasrc_unittest.cc

@@ -381,6 +381,14 @@ TEST_F(DataSrcTest, WildcardNodata) {
     headerCheck(msg, Rcode::NOERROR(), true, true, true, 0, 2, 0);
     headerCheck(msg, Rcode::NOERROR(), true, true, true, 0, 2, 0);
 }
 }
 
 
+TEST_F(DataSrcTest, DISABLED_WildcardAgainstMultiLabel) {
+    // this qname shouldn't match *.wild.com.com (because * can only match
+    // a single label), and it should result in NXDOMAIN.
+    createAndProcessQuery(Name("www.xxx.wild.example.com"), RRClass::IN(),
+                          RRType::A());
+    headerCheck(msg, Rcode::NXDOMAIN(), true, true, true, 0, 1, 0);
+}
+
 TEST_F(DataSrcTest, WildcardCname) {
 TEST_F(DataSrcTest, WildcardCname) {
     // Check that wildcard answers containing CNAMES are followed
     // Check that wildcard answers containing CNAMES are followed
     // correctly
     // correctly