BIND 10 #1551: in-memory datasource allow RRSIG, NSEC, and CNAME at same time

BIND 10 Development do-not-reply at isc.org
Wed Feb 1 10:30:38 UTC 2012


#1551: in-memory datasource allow RRSIG, NSEC, and CNAME at same time
-------------------------------------+-------------------------------------
                   Reporter:  jreed  |                 Owner:  jinmei
                       Type:         |                Status:  reviewing
  defect                             |             Milestone:
                   Priority:  major  |  Sprint-20120207
                  Component:  data   |            Resolution:
  source                             |             Sensitive:  0
                   Keywords:         |           Sub-Project:  DNS
            Defect Severity:  N/A    |  Estimated Difficulty:  4
Feature Depending on Ticket:         |           Total Hours:  0
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
Changes (by vorner):

 * owner:  vorner => jinmei


Comment:

 Hello

 The code seems to do what it should. But I think the condition looks
 really awkward and complicated:

 {{{#!c++
         // owner name except with NSEC, which is the only RR that can
 coexist
         // with CNAME (and also RRSIG, which is handled separately)
         if (rrset.getType() == RRType::CNAME()) {
             if (!domain.empty() &&
                 (domain.size() > 1 ||
                  (domain.begin()->second->getType() != RRType::NSEC()))) {
 }}}

 Could I propose using a for loop, iterating through all the RRsets there
 and stopping on the first one that is not NSEC? This loop would, in fact,
 do 1 iteration at most, but it would be more obvious what is the intent ‒
 that there's nothing except the NSEC record. It would also be easily
 extendable for more exceptions (we already allow DNAME and CNAME to
 coexist, don't we?).

 Thank you

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


More information about the bind10-tickets mailing list