BIND 10 #2786: DHCPv4: domain-name option must be encoded as text and NOT as FQDN

BIND 10 Development do-not-reply at isc.org
Fri May 17 10:49:10 UTC 2013


#2786: DHCPv4: domain-name option must be encoded as text and NOT as FQDN
-------------------------------------+-------------------------------------
            Reporter:  marcin        |                        Owner:
                Type:  defect        |  marcin
            Priority:  high          |                       Status:
           Component:  dhcp4         |  reviewing
            Keywords:                |                    Milestone:
           Sensitive:  0             |  Sprint-DHCP-20130523
         Sub-Project:  DHCP          |                   Resolution:
Estimated Difficulty:  0             |                 CVSS Scoring:
         Total Hours:  0             |              Defect Severity:
                                     |  Medium
                                     |  Feature Depending on Ticket:
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
Changes (by stephen):

 * owner:  stephen => marcin


Comment:

 Reviewed commit ee886b45eb503cf048abf8416ce7b37430f6fb25

 '''src/lib/dhcp/option_string.{cc,h}'''[[BR]]
 Should try to avoid using the base class member data_.  The base class
 includes the getData() method which returns a reference to data_: that
 should be used instead.

 OptionString::setValue - could call the parent setData() instead of
 referring to the parent data_ element.

 As an aside, when setting the data_ element (which is an OptionBuffer,
 which in turn is a typedef for std::vector), three methods are used:

 a) data_.resize() followed by std::copy (in Option::setData)
 b) Creating a temporary vector and copying it into data_ (Option::unpack)
 c) Calling data_.assign() Assigning the data in an iterator range to data_
 (OptionString::setValue/OptionString::unpack)

 The latter is probably the best one to use in all three cases.
 Option::setData() should use that method, and everything else call
 Option::setData().

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


More information about the bind10-tickets mailing list