- replaced all occurences to old_cltt and old_valid_lft in unittests
- renamed syncInternalTimestamp to syncExistingLifetime and changed order
of parameters
- renamed updateInternalTimestamp to updateExistingLifetime
- updated doxygen
- added extra check for all occurences of deleteLease (either call
EXPECT or ASSERT), and only use cast to void if explicitly specified
- updated ChangeLog
- updated old_cltt and old_valid_lft on fromElementCommon and added
unittests
- throw exception with different message on memfile with persitence
disabled for easier debugging
These changes overlook the fact that if a lease has expired, then
it's DNS entries have also expired and may or may not still be
in DNS. In any event, they need to be made anew.
src/bin/dhcp6/dhcp6_srv.cc
Dhcpv6Srv::createNameChangeRequests() - added logic to queue
CHG_REMOVES for changed leases when new lease has no FQDN
src/lib/dhcpsrv/alloc_engine.cc
AllocEngine::allocateUnreservedLeases6() - return the old lease
as a changed lease, when reusing an expired lease
AllocEngine::reclaimExpiredLease() - moved queue CHG_REMOVE to
only occur when the DB is flagged for change.
AllocEngine::reclaimLeaseInDatabase() - removed logic to
clear lease FQDN data
src/lib/dhcpsrv/tests/alloc_engine6_unittest.cc
TEST_F(AllocEngine6Test, requestReuseExpiredLease6) - verifies
changed_leases instead of old_leases
src/lib/dhcpsrv/alloc_engine.cc
AllocEngine::allocateLeases6(ClientContext6& ctx) - add call to
updateLeaseData() to case 3.
src/lib/dhcpsrv/tests/alloc_engine6_unittest.cc
TEST_F(AllocEngine6Test, hostDynamicAddress)
TEST_F(AllocEngine6Test, globalHostDynamicAddress) - revamped to
verify assignment and update for REQUESTs
TEST_F(AllocEngine6Test, globalHostDynamicAddress) - added second
SARR cyle
TEST_F(AllocEngine6Test, hostDynamicAddress) - new test for local
host reservation with dynamic leases
src/lib/dhcpsrv/alloc_engine.cc
New functions:
AllocEngine::ClientContext6::globalHost()
AllocEngine::ClientContext6::hasGlobalReservation()
AllocEngine::findGlobalReservation()
AllocEngine::allocateGlobalReservedLeases6()
Modified functions:
AllocEngine::ClientContext6::currentHost() - modified to take
into account a global host
AllocEngine::findReservation() - modified to use findGlobalReservation()
AllocEngine::allocateLeases6() - modified to use allocateGlobalReservation()
AllocEngine::removeNonmatchingReservedLeases6() - modified to
retain global reservations
AllocEngine::extendLease6() - modified to bypass range and client
mismatch disqualification for global reservations
src/lib/dhcpsrv/tests/alloc_engine6_unittest.cc
TEST_F(AllocEngine6Test, globalHostDynamicAddress)
TEST_F(AllocEngine6Test, globalHostReservedAddress)
TEST_F(AllocEngine6Test, globalHostReservedPrefix)
src/lib/dhcpsrv/tests/alloc_engine_utils.cc
testStatistics() - changed to test against SUBNET_ID_UNSUSED
src/lib/dhcpsrv/tests/alloc_engine_utils.h
testStatistics() - changed subnet_id default