From: Tomek Mrugalski Date: Fri, 14 Dec 2012 16:46:57 +0000 (+0100) Subject: [2326] Fix in RENEW code (status NoAddrsAvail => NoBinding) X-Git-Tag: bind10-1.0.0-rc-release~95^2~22^2~12^2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=32b6b02bc06bbf0303639964f3544e9cba4b138d;p=thirdparty%2Fkea.git [2326] Fix in RENEW code (status NoAddrsAvail => NoBinding) --- diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc index 2e1ab9c565..ccee08f597 100644 --- a/src/bin/dhcp6/dhcp6_srv.cc +++ b/src/bin/dhcp6/dhcp6_srv.cc @@ -606,7 +606,7 @@ OptionPtr Dhcpv6Srv::renewIA_NA(const Subnet6Ptr& subnet, const DuidPtr& duid, boost::shared_ptr ia_rsp(new Option6IA(D6O_IA_NA, ia->getIAID())); // Insert status code NoAddrsAvail. - ia_rsp->addOption(createStatusCode(STATUS_NoAddrsAvail, + ia_rsp->addOption(createStatusCode(STATUS_NoBinding, "Sorry, no known leases for this duid/iaid.")); LOG_DEBUG(dhcp6_logger, DBG_DHCP6_DETAIL, DHCP6_UNKNOWN_RENEW) diff --git a/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc b/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc index de0dc28d2a..068b37a6fb 100644 --- a/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc +++ b/src/bin/dhcp6/tests/dhcp6_srv_unittest.cc @@ -936,7 +936,7 @@ TEST_F(Dhcpv6SrvTest, RenewReject) { // Check that IA_NA was returned and that there's an address included ia = boost::dynamic_pointer_cast(tmp); ASSERT_TRUE(ia); - checkRejectedIA_NA(ia, STATUS_NoAddrsAvail); + checkIA_NAStatusCode(ia, STATUS_NoBinding); // Check that there is no lease added l = LeaseMgrFactory::instance().getLease6(addr); @@ -960,7 +960,7 @@ TEST_F(Dhcpv6SrvTest, RenewReject) { // Check that IA_NA was returned and that there's an address included ia = boost::dynamic_pointer_cast(tmp); ASSERT_TRUE(ia); - checkRejectedIA_NA(ia, STATUS_NoAddrsAvail); + checkIA_NAStatusCode(ia, STATUS_NoBinding); // There is a iaid mis-match, so server should respond that there is // no such address to renew. @@ -979,7 +979,7 @@ TEST_F(Dhcpv6SrvTest, RenewReject) { // Check that IA_NA was returned and that there's an address included ia = boost::dynamic_pointer_cast(tmp); ASSERT_TRUE(ia); - checkRejectedIA_NA(ia, STATUS_NoAddrsAvail); + checkIA_NAStatusCode(ia, STATUS_NoBinding); lease = LeaseMgrFactory::instance().getLease6(addr); ASSERT_TRUE(lease);