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
This function was added to the ClientContext4 for the DHCPv4 server to be
able to quickly check if there are any global host reservations present
and if the reservations contain client classes which could be possibly
used for leases allocation.
src/lib/dhcpsrv/alloc_engine.cc
AllocEngine::allocateUnreservedLease4() - rather than first testing for a
host reservation and then looking for an existing lease, we reverse the
order, thus worrying about HRs only if there is no existing lease.
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
src/lib/dhcpsrv/alloc_engine.*
AllocEngine::ClientContext6::getDdnsParams()
AllocEngine::ClientContext4::getDdnsParams() - new
methods which return a DdnsParams instance scoped by
currently selected subnet
Replaced direct references to context::ddns_params_ with
new getter methods.
src/lib/dhcpsrv/parsers/simple_parser4.cc
src/lib/dhcpsrv/parsers/simple_parser6.cc
Removed global defaults for hostname-char-set/replacement
D2ClientMgr functions now get behavior parameters from a passed in
structure instead of D2ClientMgr::d2_client_config_.
src/lib/dhcpsrv/d2_client_cfg.h
struct DdnsParams - new structure to convey request specific
(i.e.scopable) Ddns params
src/lib/dhcpsrv/alloc_engine.cc
src/lib/dhcpsrv/alloc_engine.h
Added ddns_params_ to ClientContext4/6
src/lib/dhcpsrv/d2_client_mgr.*
D2ClientMgr::adjustFqdnFlags()
D2ClientMgr::adjustDomainName()
D2ClientMgr::analyzeFqdn()
D2ClientMgr::generateFqdn()
D2ClientMgr::qualifyName() - now accept DdnsParams instance as
parameter
src/lib/dhcpsrv/tests/d2_client_unittest.cc
Reworked tests to use DdnsParams
src/lib/dhcpsrv/alloc_engine.cc
AllocEngine::removeNonreservedLeases6() -
exits with no action if the existing list of leases contains
one or less
added ChangeLog entry
Moved logic for detecting FQDN changes from the alloc engine to the
kea-dhcp6 server proper. This allows the change detection to be done after
FQDN generation.
src/bin/dhcp6/dhcp6_srv.*
Dhcpv6Srv::createNameChangeRequests() - modified to detect when changes
to a valid lease require a DNS remove
Dhcpv6Srv::generateFqdn() - updated to store the generated name in
the current context
src/lib/dhcpsrv/alloc_engine.cc
AllocEngine::extendLease6()
AllocEngine::updateLeaseData() - removed logic that checks for FQDN changes
src/bin/dhcp6/dhcp6_messages.*
Revamped a message