]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3208] Restore CH A RR
authorFrancis Dupont <fdupont@isc.org>
Sun, 10 Mar 2024 00:45:01 +0000 (01:45 +0100)
committerFrancis Dupont <fdupont@isc.org>
Sun, 10 Mar 2024 00:45:01 +0000 (01:45 +0100)
src/lib/dns/master_lexer.cc
src/lib/dns/rdataclass.cc
src/lib/dns/rdataclass.h

index 610ebb787e6050a3596194fba432c4d47c8d7ec7..d4acac0a96d72ba02cb8f75e1684943202ff264e 100644 (file)
@@ -215,7 +215,7 @@ MasterLexer::getPosition() const {
 
 const MasterToken&
 MasterLexer::getNextToken(Options options) {
-    if (impl_->source_ == 0) {
+    if (!impl_->source_) {
         isc_throw(isc::InvalidOperation, "No source to read tokens from");
     }
     // Store the current state so we can restore it in ungetToken
index 627bb025c5a7f5b99ab8125f55f6109a2f905d4e..b7c7bdb658c03db4fea50ac5833dc9f3092cf91c 100644 (file)
@@ -571,6 +571,49 @@ TSIG::getOtherData() const {
 
 } // end of namespace "any"
 
+namespace ch {
+
+A::A(const std::string&) {
+    // TBD
+}
+
+A::A(MasterLexer&, const Name*,
+     MasterLoader::Options, MasterLoaderCallbacks&)
+{
+    // TBD
+}
+
+A::A(InputBuffer&, size_t) {
+    // TBD
+}
+
+A::A(const A&) : Rdata() {
+    // TBD
+}
+
+void
+A::toWire(OutputBuffer&) const {
+    // TBD
+}
+
+void
+A::toWire(AbstractMessageRenderer&) const {
+    // TBD
+}
+
+string
+A::toText() const {
+    // TBD
+    isc_throw(InvalidRdataText, "Not implemented yet");
+}
+
+int
+A::compare(const Rdata&) const {
+    return (0);                 // dummy.  TBD
+}
+
+} // end of namespace "ch"
+
 namespace generic {
 
 /// \brief Constructor from string.
@@ -1016,9 +1059,15 @@ RRSIG::constructFromLexer(MasterLexer& lexer, const Name* origin) {
         decodeBase64(signature_txt, signature);
     }
 
-    return (std::unique_ptr<RRSIGImpl>(new RRSIGImpl(covered, algorithm, labels,
-                                                     originalttl, timeexpire, timeinception,
-                                                     static_cast<uint16_t>(tag), signer, signature)));
+    return (std::unique_ptr<RRSIGImpl>(new RRSIGImpl(covered,
+                                                     algorithm,
+                                                     labels,
+                                                     originalttl,
+                                                     timeexpire,
+                                                     timeinception,
+                                                     static_cast<uint16_t>(tag),
+                                                     signer,
+                                                     signature)));
 }
 
 /// \brief Constructor from string.
index 9e3dd423a8f04ea7a2248f59fe26218b78203ff6..4af7e7548954c3a32ee627ff3424004b194bae5f 100644 (file)
@@ -162,6 +162,24 @@ private:
 
 } // end of namespace "any"
 
+namespace ch {
+
+class A : public Rdata {
+public:
+    explicit A(const std::string& type_str);
+    A(isc::util::InputBuffer& buffer, size_t rdata_len);
+    A(const A& other);
+    A(
+        MasterLexer& lexer, const Name* name,
+        MasterLoader::Options options, MasterLoaderCallbacks& callbacks);
+    virtual std::string toText() const;
+    virtual void toWire(isc::util::OutputBuffer& buffer) const;
+    virtual void toWire(AbstractMessageRenderer& renderer) const;
+    virtual int compare(const Rdata& other) const;
+};
+
+} // end of namespace "ch"
+
 namespace generic {
 namespace detail {