Browse Source

[2094] (unrelated fix) NSEC's next name shouldn't be compressed per RFC3597.

JINMEI Tatuya 12 years ago
parent
commit
f2b0b4fd96
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/lib/dns/rdata/generic/nsec_47.cc

+ 3 - 1
src/lib/dns/rdata/generic/nsec_47.cc

@@ -124,7 +124,9 @@ NSEC::toWire(OutputBuffer& buffer) const {
 
 void
 NSEC::toWire(AbstractMessageRenderer& renderer) const {
-    impl_->nextname_.toWire(renderer);
+    // Type NSEC is not "well-known", and name compression must be disabled
+    // per RFC3597.
+    renderer.writeName(impl_->nextname_, false);
     renderer.writeData(&impl_->typebits_[0], impl_->typebits_.size());
 }