BIND 10 #2760: Error in code

BIND 10 Development do-not-reply at isc.org
Fri Feb 15 19:14:21 UTC 2013


#2760: Error in code
----------------------------------+--------------------------------------
            Reporter:  max1976    |                         Type:  defect
              Status:  new        |                     Priority:  medium
           Milestone:  New Tasks  |                    Component:  dhcp4
            Keywords:             |                 CVSS Scoring:
           Sensitive:  0          |              Defect Severity:  N/A
         Sub-Project:  DNS        |  Feature Depending on Ticket:
Estimated Difficulty:  0          |          Add Hours to Ticket:  0
         Total Hours:  0          |                    Internal?:  0
----------------------------------+--------------------------------------
 I think that there is a bug in the code:
 Subnet4Ptr
 Dhcpv4Srv::selectSubnet(const Pkt4Ptr& question) {

     // Is this relayed message?
     IOAddress relay = question->getGiaddr();
     if (relay.toText() == "0.0.0.0") {

         // Yes: Use relay address to select subnet
         return (CfgMgr::instance().getSubnet4(relay));
     } else {

         // No: Use client's address to select subnet
         return (CfgMgr::instance().getSubnet4(question->getRemoteAddr()));
     }
 }

 In check 'relay.toText() == "0.0.0.0"' should be 'relay.toText() !=
 "0.0.0.0"' .

-- 
Ticket URL: <http://bind10.isc.org/ticket/2760>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list