Browse Source

[3269] Address issues raised in the second review.

Marcin Siodelski 10 years ago
parent
commit
080ee7eec8
2 changed files with 3 additions and 3 deletions
  1. 2 2
      src/bin/dhcp6/dhcp6_srv.cc
  2. 1 1
      src/bin/dhcp6/tests/confirm_unittest.cc

+ 2 - 2
src/bin/dhcp6/dhcp6_srv.cc

@@ -2351,7 +2351,6 @@ Dhcpv6Srv::processConfirm(const Pkt6Ptr& confirm) {
                 // in IA_NA, mark it verified and verify that it belongs to the
                 // subnet.
                 if (iaaddr) {
-                    verified = true;
                     // If at least one address is not in range, then return
                     // the NotOnLink status code.
                     if (subnet && !subnet->inRange(iaaddr->getAddress())) {
@@ -2362,9 +2361,10 @@ Dhcpv6Srv::processConfirm(const Pkt6Ptr& confirm) {
                                                           status_msg.str()));
                         return (reply);
                     }
+                    verified = true;
                 } else {
                     isc_throw(Unexpected, "failed to cast the IA Address option"
-                              " to the Option6IAAddrPtr. This is programmatic"
+                              " to the Option6IAAddrPtr. This is programming"
                               " error and should be reported");
                 }
             }

+ 1 - 1
src/bin/dhcp6/tests/confirm_unittest.cc

@@ -297,7 +297,7 @@ TEST_F(ConfirmTest, relayedUnicast) {
     ASSERT_GT(client.getLeaseNum(), 0);
     client.setDestAddress(IOAddress("2001:db8:1::1"));
     // Send Confirm message to the server.
-    ASSERT_NO_THROW (client.doConfirm());
+    ASSERT_NO_THROW(client.doConfirm());
     // Client should have received a response.
     ASSERT_TRUE(client.getContext().response_);
     // Client should have received a status code option and this option should