BIND 10 trac1128, updated. d42d232acb16847ea8ec775854469e3226cdfe17 [trac1128] update comments and minor fix

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Jul 28 05:14:57 UTC 2011


The branch, trac1128 has been updated
       via  d42d232acb16847ea8ec775854469e3226cdfe17 (commit)
      from  34634d2ba1efba222403e8a210379d1573759939 (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 d42d232acb16847ea8ec775854469e3226cdfe17
Author: chenzhengzhang <jerry.zzpku at gmail.com>
Date:   Thu Jul 28 13:10:35 2011 +0800

    [trac1128] update comments and minor fix

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

Summary of changes:
 src/lib/dns/rdata/generic/srv_33.cc           |    2 ++
 src/lib/dns/tests/rdata_srv_unittest.cc       |    4 ++++
 src/lib/dns/tests/testdata/rdata_srv_fromWire |   13 +++++++++++--
 3 files changed, 17 insertions(+), 2 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/dns/rdata/generic/srv_33.cc b/src/lib/dns/rdata/generic/srv_33.cc
index 119a276..fd6b694 100644
--- a/src/lib/dns/rdata/generic/srv_33.cc
+++ b/src/lib/dns/rdata/generic/srv_33.cc
@@ -126,6 +126,8 @@ SRV::toWire(AbstractMessageRenderer& renderer) const {
     renderer.writeUint16(impl_->priority_);
     renderer.writeUint16(impl_->weight_);
     renderer.writeUint16(impl_->port_);
+    // According to RFC 2782, name compression is not
+    // to be used for this field.
     renderer.writeName(impl_->target_, false);
 }
 
diff --git a/src/lib/dns/tests/rdata_srv_unittest.cc b/src/lib/dns/tests/rdata_srv_unittest.cc
index f4a6e06..0cb7f27 100644
--- a/src/lib/dns/tests/rdata_srv_unittest.cc
+++ b/src/lib/dns/tests/rdata_srv_unittest.cc
@@ -111,6 +111,10 @@ TEST_F(Rdata_SRV_Test, createFromWire) {
     EXPECT_THROW(rdataFactoryFromFile(RRType("SRV"), RRClass("IN"),
                                       "rdata_cname_fromWire", 69),
                  DNSMessageFORMERR);
+    // parse compressed target name
+    EXPECT_EQ(0, rdata_srv.compare(
+                  *rdataFactoryFromFile(RRType("SRV"), RRClass("IN"),
+                                      "rdata_srv_fromWire", 89)));
 }
 
 TEST_F(Rdata_SRV_Test, toWireBuffer) {
diff --git a/src/lib/dns/tests/testdata/rdata_srv_fromWire b/src/lib/dns/tests/testdata/rdata_srv_fromWire
index 659757a..dac87e9 100644
--- a/src/lib/dns/tests/testdata/rdata_srv_fromWire
+++ b/src/lib/dns/tests/testdata/rdata_srv_fromWire
@@ -20,8 +20,17 @@
 # 8  9 50  1  2  3  4  5  6  7  8  9 60  1  2  3  4  5  6  7  8
  00 01 00 05 05 dc 01 61 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00
 #
+#
 # incomplete target name
 # 9 70
- 00 06
-# 1  2  3  4  5  6  7  8  9 70  1  2  3  4  5  6  7  8
+ 00 12
+# 1  2  3  4  5  6  7  8  9 80  1  2  3  4  5  6  7  8
  00 01 00 05 05 dc 01 61 07 65 78 61 6d 70 6c 65 03 63
+#
+#
+# Valid compressed target name: 'a' + pointer
+# 9 90
+ 00 0a
+#
+# 1  2  3  4  5  6  7  8  9 100
+ 00 01 00 05 05 dc 01 61 c0 0a




More information about the bind10-changes mailing list