BIND 10 #2497: introduce wrapper version of "from lexer" rdata factory

BIND 10 Development do-not-reply at isc.org
Mon Dec 3 17:14:48 UTC 2012


#2497: introduce wrapper version of "from lexer" rdata factory
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  task          |  jinmei
            Priority:  medium        |                       Status:
           Component:  libdns++      |  reviewing
            Keywords:                |                    Milestone:
           Sensitive:  0             |  Sprint-20121204
         Sub-Project:  DNS           |                   Resolution:
Estimated Difficulty:  0             |                 CVSS Scoring:
         Total Hours:  0             |              Defect Severity:  N/A
                                     |  Feature Depending on Ticket:
                                     |  loadzone-ng
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------

Comment (by jinmei):

 Replying to [comment:20 muks]:

 > > {{{#!python
 > > new_rdatafactory_users = []
 > > }}}
 > >   No one except the original author can figure out what should be
 > >   added to the list when a new type is supported unless they bother to
 > >   read the code to understand how this list is used.
 >
 > * Comments were added
 > * The list takes tuples of (rrtype, rrclass) now.

 I'm afraid this doesn't cover the pairs of generic types for class
 "IN" like this:
 {{{#!cpp
         add("SOA", 6, "IN", 1, RdataFactoryPtr(new
 OldRdataFactory<generic::SOA>()));
 }}}

 It's probably due to poor/no documentation of the script, but we have
 this trick as a heuristics optimization for class "IN":
 {{{#!python
                         if class_txt == 'generic':
                             typeandclass.append((type_txt, int(type_code),
                                                  (class_txt, 'in'), 1))
 }}}

 So, for example, if we have ('xxx', 'generic') in new_rdata_factory_users,
 we need to handle the case of ('xxx', 'in'), too.  One easy way to
 just clarify it in the comment (after all this is temporary
 workaround).  Another is to handle it automatically in generate_rrparam().

 > > - I suspect this is not a good example of bad input:
 > > {{{
 > > +    // Exceptions cause NULL to be returned.
 > > +    EXPECT_FALSE(test::createRdataUsingLexer(RRType::HINFO(),
 RRClass::IN(),
 > > +
 "\"Pentium\"\"Linux\""));
 > > }}}
 > >   With the generic lexer it would become valid (and BIND 9 would
 > >   accept it too)
 >
 > I don't follow this. I can't think of another way to get an invalid
 HINFO without similar syntax.

 See the previous comment.

-- 
Ticket URL: <http://bind10.isc.org/ticket/2497#comment:22>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list