Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
92f52e2c
Commit
92f52e2c
authored
Sep 30, 2015
by
Marcin Siodelski
Browse files
[3972] Addressed review comments - minor nits.
parent
e50fd180
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/bin/dhcp4/dhcp4_hooks.dox
View file @
92f52e2c
...
...
@@ -231,9 +231,11 @@ packet processing. Hook points that are not specific to packet processing
argument contains the pointer to the lease being reclaimed. The second
argument "remove_lease" indicates if the reclaimed leases should be
removed from the lease database (if true), or their state should be
set to "expired-reclaimed" in the lease database. This
p
ar
ameter
set to "expired-reclaimed" in the lease database. This ar
gument
is only used by the callout if it takes responsibility for the lease
reclamation, i.e. it sets the "skip" flag to "true".
reclamation, i.e. it sets the "skip" flag to "true". The "remove_lease"
argument is set to "true" if the "recycle-timer-wait-time" is set
to 0 in the server configuration file.
- <b>Skip flag action</b>: if the callout sets the skip flag, the server
will assume that the callout has fully reclaimed the lease, i.e.
...
...
src/bin/dhcp6/dhcp6_hooks.dox
View file @
92f52e2c
...
...
@@ -249,9 +249,11 @@ packet processing. Hook points that are not specific to packet processing
argument contains the pointer to the lease being reclaimed. The second
argument "remove_lease" indicates if the reclaimed leases should be
removed from the lease database (if true), or their state should be
set to "expired-reclaimed" in the lease database. This
p
ar
ameter
set to "expired-reclaimed" in the lease database. This ar
gument
is only used by the callout if it takes responsibility for the lease
reclamation, i.e. it sets the "skip" flag to "true".
reclamation, i.e. it sets the "skip" flag to "true". The "remove_lease"
argument is set to "true" if the "recycle-timer-wait-time" is set
to 0 in the server configuration file.
- <b>Skip flag action</b>: if the callout sets the skip flag, the server
will assume that the callout has fully reclaimed the lease, i.e.
...
...
src/lib/dhcpsrv/alloc_engine.cc
View file @
92f52e2c
...
...
@@ -1424,7 +1424,7 @@ AllocEngine::reclaimExpiredLeases4(const size_t max_leases, const uint16_t timeo
lease_mgr
.
getExpiredLeases4
(
leases
,
max_leases
);
// Do not initialize the callout handle until we know if there are any
// lease
6
_expire callouts installed.
// lease
4
_expire callouts installed.
CalloutHandlePtr
callout_handle
;
if
(
!
leases
.
empty
()
&&
HooksManager
::
getHooksManager
().
calloutsPresent
(
Hooks
.
hook_index_lease4_expire_
))
{
...
...
src/lib/dhcpsrv/tests/alloc_engine_expiration_unittest.cc
View file @
92f52e2c
...
...
@@ -1159,8 +1159,7 @@ TEST_F(ExpirationAllocEngine6Test, reclaimExpiredLeasesHooksWithSkip) {
// This test verifies that it is possible to set the timeout for the
// execution of the lease reclamation routine.
TEST_F
(
ExpirationAllocEngine6Test
,
reclaimExpiredLeasesTimeout
)
{
// For this test to make sense we need significantly more than 30
// leases so it is ok if we have 40.
// This test needs at least 40 leases to make sense.
BOOST_STATIC_ASSERT
(
TEST_LEASES_NUM
>=
40
);
// Run with timeout of 60ms.
testReclaimExpiredLeasesTimeout
(
60
);
...
...
@@ -1524,8 +1523,7 @@ TEST_F(ExpirationAllocEngine4Test, reclaimExpiredLeasesHooksWithSkip) {
// This test verifies that it is possible to set the timeout for the
// execution of the lease reclamation routine.
TEST_F
(
ExpirationAllocEngine4Test
,
reclaimExpiredLeasesTimeout
)
{
// For this test to make sense we need significantly more than 30
// leases so it is ok if we have 40.
// This test needs at least 40 leases to make sense.
BOOST_STATIC_ASSERT
(
TEST_LEASES_NUM
>=
40
);
// Run with timeout of 60ms.
testReclaimExpiredLeasesTimeout
(
60
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment