/src/bin/dhcp4/tests/dora_unittest.cc
DORATest::reservationsWithConflicts() - added parameter
for offer-lifetime
TEST_F(DORATest, reservationsWithConflictsOfferLft)
TEST_F(DORATest, reservationsWithConflictsOfferLftMultiThreading)
- new tests
/src/lib/dhcpsrv/alloc_engine.*
deleteAssignedLease() - new convenience function
AllocEngine::requestLease4() - added logic to handle conflicting
lease when offer-lifetime > 0
AllocEngine::getOfferLft() - added flag to disable DISCOVER
only check
/src/lib/dhcpsrv/tests/alloc_engine4_unittest.cc
TEST_F(AllocEngine4Test, existingLeasePlusTemporary) - new test
/src/hooks/dhcp/lease_cmds/binding_variables.*
BindingVariableMgr::evaluateVariables() - initial implementation
/src/lib/dhcpsrv/alloc_engine.cc
AllocEngine::updateLease4ExtendedInfo()
AllocEngine::updateLease6ExtendedInfo()
- use Lease::updateUserContextISC()
/src/lib/dhcpsrv/lease.*
bool Lease::updateUserContextISC() - new function that
adds/updates an element in the "ISC" map in the lease's
user-context.
/src/bin/dhcp4/dhcp4_srv.cc
Dhcpv4Srv::createNameChangeRequests() - modified to check for
reused lease
/src/bin/dhcp4/tests/dora_unittest.cc
DORATest::leaseCaching() - modified to verify suppression of NCRs
/src/bin/dhcp6/dhcp6_srv.cc
Dhcpv6Srv::createNameChangeRequests() - modified to iteralte over
IA contexts rather than IA options in response and to check for
reused leases
/src/bin/dhcp6/tests/fqdn_unittest.cc
Updated tests to populate IAContexts
/src/bin/dhcp6/tests/sarr_unittest.cc
SARRTest::leaseCaching()- modified to verify suppression of NCRs
/src/lib/dhcpsrv/alloc_engine.*
AllocEngine::ClientContext6::IAContext - added reused_leases_ container
AllocEngine::ClientContext6::getIAContexts() - new function
Rewrote encoding/decoding.
src/lib/util/Makefile.am
Removed old files, added encode.cc, encode.h
src/lib/util/encode/encode.*
New implemenentation encoding and decoding not based
on boost.
Returned options from db are not encapsulated and have to be encapsulated
before the server returns them to a client. Parsers, depending on the use
case, may or may not encapsulate options. When they are used for parsing
a config file, the options are encapsulated. When they are used by the
host_cmds or cb_cmds, they are not.
Pool capacities have been promoted in code from uint64_t to uint128_t.
Bigint is modelled as an int128_t in statistics, following the precedent of
signed integer of int64_t from statistics.
- "total-nas" is extended to 128 bits as requested in the issue.
- "total-pds" has the same risk of overflowing so it has been extended
as well.
- "total-addresses" always fits in 64 bits, but certain code forces a
128 bit value on it. See Pool::getCapacity(), Subnet::getPoolCapacity(),
Subnet::sumPoolCapacity(). It could have been truncated to a 64 bit value,
but that seems like an unnecessary complication.
Because of the disparity in signedness there is some truncation that can
happen when pool capacity values are passed on to statistics. That only happens
for the last half of the value range, so for prefix ranges larger than /1.
Fixed a bug in the allocation engine which could result in a failure to
allocate available addresses from a subnet that used an FLQ allocator, or
returning a zero lease.
kea-dhcp4 supports offer-lft for global, shared-network,
and subnets. Not yet supported in classes.
src/bin/dhcp4/dhcp4_srv.cc
Dhcpv4Srv::assignLease() - adjust outbound lease time option
Dhcpv4Srv::postAllocateNameUpdate() - allow reuse check on allocated
discover
src/lib/dhcpsrv/alloc_engine.*
AllocEngine::ClientContext4 - add offer_lft_ member
AllocEngine::discoverLease4() -set contexts offer_lft_
AllocEngine::getOfferLft() - new, get context appropriate value for offer_lft
AllocEngine::createLease4() - use offer_lft on DISCOVER, pass offer_lft
into hook, set lease fqdn flags to false
AllocEngine::reuseExpiredLease4() - reclaim on discover allocation
AllocEngine::updateLease4Information() - use offer_lft if appropriate
src/lib/dhcpsrv/tests/alloc_engine4_unittest.cc
TEST_F(AllocEngine4Test, discoverOfferLft) - enabled
TEST_F(AllocEngine4Test, discoverOfferLftReuseExpiredLease4) - new test