BIND 10 #2521: support generic version of rdata::createRdata(text) in RRSIG, DHCID, OPT RDATA

BIND 10 Development do-not-reply at isc.org
Mon May 6 22:17:48 UTC 2013


#2521: support generic version of rdata::createRdata(text) in RRSIG, DHCID, OPT
RDATA
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  task          |  jinmei
            Priority:  medium        |                       Status:
           Component:  libdns++      |  reviewing
            Keywords:                |                    Milestone:
           Sensitive:  0             |  Sprint-20130514
         Sub-Project:  DNS           |                   Resolution:
Estimated Difficulty:  4             |                 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:29 pselkirk]:

 > > Maybe we should do it within this ticket, then?  But we've already
 > > spent quite some time for it, so it may be better to defer it to a
 > > separate ticket.  I'd leave it to you.
 >
 > I'd prefer to do it in a separate ticket, because a) I don't want to
 expand the scope of this ticket, and b) this cuts across every RR type
 that includes base64 data.

 Okay.

 > > '''dhcid_49.cc'''
 > > - What's "key data" in this comment?
 >
 > It was a cut-and-paste from dnskey_48.cc.
 >
 > >   If this means the entire DHCID RDATA, BIND 9 actually rejects empty
 > >   data.  I'm not sure if it's intentional or not, though (but it
 > >   rejects the empty case both for from-text and from-wire, so at least
 > >   it's consistent).
 >
 > I interpreted our previous conversation about removing length checks to
 mean that a length of 0 is acceptable. (I'm actually relieved to be wrong,
 because it didn't feel right.) I will re-add a "!=0" length check.

 In that case I think we need update some other things:
 - documentation (in any case "key data" should be reworded as
   discussed above)
 - "from wire" constructor (it currently accepts empty data, and has a
   bug with std::vector in that case)

 Also, maybe a matter of taste, but I'd use vector::at() to get access
 to the 0'th element so it'll be safer in case we miss something on the
 check, e.g.:

 {{{#!cpp
 void
 DHCID::toWire(AbstractMessageRenderer& renderer) const {
     renderer.writeData(&digest_.at(0), digest_.size()); // size must be >
 0
     //renderer.writeData(&digest_[0], digest_.size());
 }
 }}}

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


More information about the bind10-tickets mailing list