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 12:38:21 UTC 2013


#2786: DHCPv4: domain-name option must be encoded as text and NOT as FQDN
-------------------------------------+-------------------------------------
            Reporter:  marcin        |                        Owner:
                Type:  defect        |  stephen
            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 marcin):

 * owner:  marcin => stephen


Comment:

 Replying to [comment:8 stephen]:
 > 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.

 I now use getData() to get the reference to the data_.

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

 It does now.

 >
 > 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)

 It is now unified and all methods use setData() instead.

 >
 > 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().

 I also slightly modified OptionCustom class to access or modified the data
 using parent class procedures.

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


More information about the bind10-tickets mailing list