]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3269] Address issues raised in the second review.
authorMarcin Siodelski <marcin@isc.org>
Thu, 24 Jul 2014 16:10:31 +0000 (18:10 +0200)
committerMarcin Siodelski <marcin@isc.org>
Thu, 24 Jul 2014 16:10:31 +0000 (18:10 +0200)
src/bin/dhcp6/dhcp6_srv.cc
src/bin/dhcp6/tests/confirm_unittest.cc

index c0566466cabbada3b36ea2e53686cf8c62142e4c..e57faf21f613ef629ee4da0a302682cb88c7f355 100644 (file)
@@ -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");
                 }
             }
index 64d66cb0a848730839a72df7a4c09fe459ca5bb0..b436144bff154fbb98ded30302c9110d51342e59 100644 (file)
@@ -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