BIND 10 master, updated. f77fcfce01df67ba90dd9a2708d6926e3065bfd4 [master] Merge remote-tracking branch 'origin/trac2151'

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Sep 13 12:40:11 UTC 2012


The branch, master has been updated
       via  f77fcfce01df67ba90dd9a2708d6926e3065bfd4 (commit)
       via  73291cf04175391585c0222f302150d9bc66a61c (commit)
       via  ed1a5d91d8ca0826a6c6370abfa511c052b60c24 (commit)
      from  aea6e2d1a3e08c8239323dc076cdd9cc2620b09c (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 f77fcfce01df67ba90dd9a2708d6926e3065bfd4
Merge: aea6e2d 73291cf
Author: Jelte Jansen <jelte at isc.org>
Date:   Thu Sep 13 14:39:52 2012 +0200

    [master] Merge remote-tracking branch 'origin/trac2151'

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

Summary of changes:
 src/lib/dns/labelsequence.h                 |   15 +++++++++++++++
 src/lib/dns/tests/labelsequence_unittest.cc |    6 ++++++
 2 files changed, 21 insertions(+)

-----------------------------------------------------------------------
diff --git a/src/lib/dns/labelsequence.h b/src/lib/dns/labelsequence.h
index 545ce12..3f6a03a 100644
--- a/src/lib/dns/labelsequence.h
+++ b/src/lib/dns/labelsequence.h
@@ -53,6 +53,14 @@ public:
     static const size_t MAX_SERIALIZED_LENGTH =
         Name::MAX_WIRE + Name::MAX_LABELS + 1;
 
+    ///
+    /// \name Well-known LabelSequence constants
+    ///
+    //@{
+    /// Wildcard label ("*")
+    static const LabelSequence& WILDCARD();
+    //@}
+
     /// \brief Constructs a LabelSequence for the given name
     ///
     /// \note The associated Name MUST remain in scope during the lifetime
@@ -410,6 +418,13 @@ private:
 std::ostream&
 operator<<(std::ostream& os, const LabelSequence& label_sequence);
 
+inline const LabelSequence&
+LabelSequence::WILDCARD() {
+    static const uint8_t wildcard_buf[4] = { 0x01, 0x00, 0x01, '*' };
+    static const LabelSequence wild_ls(wildcard_buf);
+    return (wild_ls);
+}
+
 } // end namespace dns
 } // end namespace isc
 
diff --git a/src/lib/dns/tests/labelsequence_unittest.cc b/src/lib/dns/tests/labelsequence_unittest.cc
index 28f624a..b7463b2 100644
--- a/src/lib/dns/tests/labelsequence_unittest.cc
+++ b/src/lib/dns/tests/labelsequence_unittest.cc
@@ -1174,4 +1174,10 @@ TEST_F(ExtendableLabelSequenceTest, extendBadData) {
     check_equal(full_ls2, els);
 }
 
+// Check the static fixed 'wildcard' LabelSequence
+TEST(WildCardLabelSequence, wildcard) {
+    ASSERT_FALSE(LabelSequence::WILDCARD().isAbsolute());
+    ASSERT_EQ("*", LabelSequence::WILDCARD().toText());
+}
+
 }



More information about the bind10-changes mailing list