From: Tomek Mrugalski Date: Wed, 14 Oct 2015 10:22:11 +0000 (+0200) Subject: [3986] Changes in comments after review X-Git-Tag: trac3874_base~21^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=04815b3fc25a6fcd1bbb114d03aaf6d1f5676916;p=thirdparty%2Fkea.git [3986] Changes in comments after review --- diff --git a/src/bin/dhcp4/dhcp4_hooks.dox b/src/bin/dhcp4/dhcp4_hooks.dox index 1219f05aee..88226aa9ad 100644 --- a/src/bin/dhcp4/dhcp4_hooks.dox +++ b/src/bin/dhcp4/dhcp4_hooks.dox @@ -196,7 +196,7 @@ packet processing. Hook points that are not specific to packet processing - Next step status: If any callout installed on the "lease4_release" hook sets the next step action to DROP, the server will not decline the lease. Care should be taken when setting this status. The lease will be kept in - the database as is and the client will incorrectly assume that the server + the database as it is and the client will incorrectly assume that the server marked this lease as unavailable. If the client restarts its configuration, it will get the same (not declined) lease as a result. diff --git a/src/bin/dhcp4/tests/hooks_unittest.cc b/src/bin/dhcp4/tests/hooks_unittest.cc index 7abfc54e4a..1e05287d3a 100644 --- a/src/bin/dhcp4/tests/hooks_unittest.cc +++ b/src/bin/dhcp4/tests/hooks_unittest.cc @@ -1475,7 +1475,7 @@ TEST_F(HooksDhcpv4SrvTest, lease4ReleaseSkip) { EXPECT_EQ(leases.size(), 1); } -// Checks that decline4 hooks are triggered properly. +// Checks that decline4 hooks (lease4_decline) are triggered properly. TEST_F(HooksDhcpv4SrvTest, HooksDecline) { IfaceMgrTestConfig test_config(true); IfaceMgr::instance().openSockets4(); @@ -1506,7 +1506,7 @@ TEST_F(HooksDhcpv4SrvTest, HooksDecline) { ASSERT_TRUE(opt_declined_addr); IOAddress addr(opt_declined_addr->readAddress()); - // And try to get a matching lease from the lease mgr + // And try to get a matching lease from the lease manager. Lease4Ptr from_mgr = LeaseMgrFactory::instance().getLease4(addr); ASSERT_TRUE(from_mgr); EXPECT_EQ(Lease::STATE_DECLINED, from_mgr->state_); @@ -1517,7 +1517,7 @@ TEST_F(HooksDhcpv4SrvTest, HooksDecline) { EXPECT_EQ(addr, callback_lease4_->addr_); } -// Checks that decline4 hooks are triggered properly. +// Checks that decline4 hook is able to drop the packet. TEST_F(HooksDhcpv4SrvTest, HooksDeclineDrop) { IfaceMgrTestConfig test_config(true); IfaceMgr::instance().openSockets4(); @@ -1549,7 +1549,7 @@ TEST_F(HooksDhcpv4SrvTest, HooksDeclineDrop) { ASSERT_TRUE(opt_declined_addr); IOAddress addr(opt_declined_addr->readAddress()); - // And try to get a matching lease from the lease mgr. The lease should + // And try to get a matching lease from the lease manager. The lease should // still be there in default state, not in declined state. Lease4Ptr from_mgr = LeaseMgrFactory::instance().getLease4(addr); ASSERT_TRUE(from_mgr);