BIND 10 #2165: update Message::addRRset() to be unaware of signedness

BIND 10 Development do-not-reply at isc.org
Fri Aug 24 23:22:31 UTC 2012


#2165: update Message::addRRset() to be unaware of signedness
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:  muks
  jinmei                             |                Status:  reviewing
                       Type:  task   |             Milestone:
                   Priority:         |  Sprint-20120904
  medium                             |            Resolution:
                  Component:         |             Sensitive:  0
  libdns++                           |           Sub-Project:  DNS
                   Keywords:         |  Estimated Difficulty:  5
            Defect Severity:  N/A    |           Total Hours:  0
Feature Depending on Ticket:         |
  scalable inmemory                  |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------

Comment (by jinmei):

 I happen to notice one other thing.

 In `DatabaseClient::Finder::getRRsets` I believe you can simply
 ignore any RRSIGs if sigs is false.  Also, if we have a simple test
 method to tell if appendSignatures is empty, this part:

 {{{#!cpp
     if (sigs) {
         // Add signatures to all found RRsets
         for (std::map<RRType, RRsetPtr>::iterator i(result.begin());
              i != result.end(); ++ i) {
             sig_store.appendSignatures(i->second);
         }
     }
 }}}

 can be like this:

 {{{#!cpp
     if (!sig_store.empty()) {
         // Add signatures to all found RRsets
         for (std::map<RRType, RRsetPtr>::iterator i(result.begin());
              i != result.end(); ++ i) {
             sig_store.appendSignatures(i->second);
         }
     }
 }}}

 This works whether or not `sigs` is true, and in case the zone isn't
 signed we can avoid iterating over the other types of RRsets for
 nothing.

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


More information about the bind10-tickets mailing list