BIND 10 #2426: support generic version of rdata::createRdata(text) in generic RDATA

BIND 10 Development do-not-reply at isc.org
Tue Feb 18 13:39:02 UTC 2014


#2426: support generic version of rdata::createRdata(text) in generic RDATA
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  task          |  stephen
            Priority:  medium        |                       Status:
           Component:  libdns++      |  reviewing
            Keywords:                |                    Milestone:
           Sensitive:  0             |  bind10-1.2-release-freeze
         Sub-Project:  DNS           |                   Resolution:
Estimated Difficulty:  3             |                 CVSS Scoring:
         Total Hours:  0             |              Defect Severity:  N/A
                                     |  Feature Depending on Ticket:
                                     |  loadzone-ng
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
Changes (by muks):

 * owner:  muks => stephen


Comment:

 Hi Stephen

 Replying to [comment:6 stephen]:
 > '''src/lib/dns/rdata.cc'''
 > constructFromLexer: some versions of cppcheck are likely to object to
 > declaring rdlen without an initialization value.

 It is now initialized with a value.

 > constructFromLexer: minor point - in the read loop, I'd be inclinded
 > to put the ungetToken() call immediately after the test for end of
 > file/line and before the break, as it's more immediately obvious what
 > is being "ungot".  However I won't push this issue - where it is at
 > the moment is correct.

 The statement was moved.

 > (It would be useful to have a comment as to why the end of file/line
 > are being left in the read buffer.)

 Comment was added.

 > constructFromLexer: If the data size is not equal to RDLENGTH, a
 > better string to go into the exception would be something like "Size
 > of unknown RDATA hex data doesn't match RDLENGTH".

 Updated.

 > '''General'''
 > What Jinmei's comment about "origin" relates to.  The only constructor
 > that takes a "Name" as an argument ignores it.

 Jinmei pasted a similar description into a number of tickets (created
 for each RR type respectively). In some of these tickets, where a name
 can appear in the RDATA, this makes sense. For other RR types, it does
 not.

 This origin argument is to be used as the current origin when parsing
 relative names. As an example, consider the following text in a master
 file:

 {{{
 example.org. 3600 IN NS ns1
 example.org. 3600 IN NS ns2
 }}}

 Here, `ns1` and `ns2` are relative. They need to be concatenated with
 the current origin to form the absolute name. This is where the origin
 argument is used.

 For generic RDATA, it is unused as the RDATA is simply raw octets.

-- 
Ticket URL: <https://bind10.isc.org/ticket/2426#comment:7>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list