- Note that IP reservations are unique with a subnet in several places
- Put back const in createManagers function
- Aligned log arguments.
- Added missing commentary in v6 config fetch routine.
Initial commit. Need to add unit tests.
src/bin/dhcp4/dhcp4_srv.cc
Dhcpv4Srv::processClientName - added logic to populate the
context with hostname and dns flags. Formerly this was in assignLeases.
Dhcpv4Srv::assignLease - now calls processClientName() before allocating
the lease, and after IF the selected subnet changes. Removed logic to
update name from reservation.
Dhcpv4Srv::processDiscover
Dhcpv4Srv::processRequest - no longer calls processClientName
Dhcpv4Srv::processHostnameOption - now it always uses hostname supplied
by a reservation. Eliminates need for post-allocation update.
Dhcpv4Srv::postAllocateNameUpdate - contains logic extracted from assignLeases
src/lib/dhcpsrv/alloc_engine.cc
AllocEngine::ClientContext6::getDdnsParams
AllocEngine::ClientContext4::getDdnsParams -
recreates DdnsParameter instance if it is stale.
Clearing DNS fields after we do the remove ensures that we'll
do an add if the client is needs new DNS entries , while avoiding
duplicate DNS removes.
src/bin/dhcp4/tests/dhcp4_client.cc
Dhcp4Client::includeHostname() - reset hostname if given an empty parameter
src/bin/dhcp4/tests/fqdn_unittest.cc
TEST_F(NameDhcpv4SrvTest, processReuseExpired) - new test
src/lib/dhcpsrv/alloc_engine.cc
AllocEngine::reclaimExpiredLease(Lease4Ptr...) - always clear the DNS fields after
the call to queue and CHG_REMOVE
AllocEngine::allocateOrReuseLease4() - clear DNS fields in the old lease
so we don't trigger redundant removes