BIND 10 #1485: IOAddress::getAddress() breaks the concept of the asiolink

BIND 10 Development do-not-reply at isc.org
Tue Feb 4 19:19:29 UTC 2014


#1485: IOAddress::getAddress() breaks the concept of the asiolink
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:  tomek
                Type:  defect        |                       Status:
            Priority:  medium        |  reviewing
           Component:  dhcp          |                    Milestone:  DHCP-
            Keywords:                |  Kea0.9-alpha
           Sensitive:  0             |                   Resolution:
         Sub-Project:  DHCP          |                 CVSS Scoring:
Estimated Difficulty:  0             |              Defect Severity:  N/A
         Total Hours:  4             |  Feature Depending on Ticket:
                                     |          Add Hours to Ticket:  1
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
Changes (by tmark):

 * hours:  3 => 1
 * owner:  tmark => tomek
 * totalhours:  3 => 4


Comment:

 src/lib/asiolink/tests/io_address_unittest.cc

 {{{
 +// test v6-specific operations
 +TEST(IOAddressTest, v6specific) {
 }}}


 It's a bit of misnomer to label the new test v6specific.  It verifies
 that isV4() gives the correct results as well.  Really it verifies
 "address classification methods"


 ----------------------------------------------------------------------------

 perfdhcp/test_control.cc -

 line 1642 you changed the test test that the address is v6 rather is
 NOT v4:

 {{{
 -    if (!yiaddr.getAddress().is_v4()) {
 +    if (yiaddr.isV6()) {
          isc_throw(BadValue, "the YIADDR returned in OFFER packet is not "
                    " IPv4 address");
 }}}

 yet a similar check on line 1753, you left as a NOT v4:

 {{{
 -    if (!yiaddr.getAddress().is_v4()) {
 +    if (!yiaddr.isV4()) {
          isc_throw(BadValue, "the YIADDR returned in OFFER packet is not "
                    " IPv4 address");
 }}}

 I would recommend you change the test at line 1642 to is NOT v4.  First,
 they should be the same, and secondly, when v16 comes out it won't right
 anymore ;).

 ------------------------------------------------------------------------------

 I do not need to see this ticket again.

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


More information about the bind10-tickets mailing list