Browse Source

[2521] add MasterLexer constructor for OPT

Paul Selkirk 12 years ago
parent
commit
5629c01345
2 changed files with 10 additions and 1 deletions
  1. 3 1
      src/lib/dns/gen-rdatacode.py.in
  2. 7 0
      src/lib/dns/rdata/generic/opt_41.cc

+ 3 - 1
src/lib/dns/gen-rdatacode.py.in

@@ -32,7 +32,8 @@ import sys
 #
 # Example:
 #     new_rdata_factory_users = [('a', 'in'), ('a', 'ch'), ('soa', 'generic')]
-new_rdata_factory_users = [('a', 'in'), ('aaaa', 'in'),
+new_rdata_factory_users = [('a', 'in'),
+                           ('aaaa', 'in'),
                            ('afsdb', 'generic'),
                            ('cname', 'generic'),
                            ('dlv', 'generic'),
@@ -43,6 +44,7 @@ new_rdata_factory_users = [('a', 'in'), ('aaaa', 'in'),
                            ('mx', 'generic'),
                            ('ns', 'generic'),
                            ('nsec', 'generic'),
+                           ('opt', 'generic'),
                            ('ptr', 'generic'),
                            ('soa', 'generic'),
                            ('spf', 'generic'),

+ 7 - 0
src/lib/dns/rdata/generic/opt_41.cc

@@ -20,6 +20,7 @@
 #include <dns/messagerenderer.h>
 #include <dns/rdata.h>
 #include <dns/rdataclass.h>
+#include <dns/rdata/generic/detail/lexer_util.h>
 
 using namespace std;
 using namespace isc::util;
@@ -31,6 +32,12 @@ OPT::OPT(const std::string&) {
     isc_throw(InvalidRdataText, "OPT RR cannot be constructed from text");
 }
 
+OPT::OPT(MasterLexer&, const Name*,
+       MasterLoader::Options, MasterLoaderCallbacks&)
+{
+    isc_throw(InvalidRdataText, "OPT RR cannot be constructed from text");
+}
+
 OPT::OPT(InputBuffer& buffer, size_t rdata_len) {
     // setPosition() will throw against a short buffer anyway, but it's safer
     // to check it explicitly here.