src/bin/dhcp6/dhcp6_srv.cc
Dhcpv6Srv::createNameChangeRequests() - modified logic DNS-updated needed
logic to include changes to the FQDN flags.
src/bin/dhcp6/tests/fqdn_unittest.cc
TEST_F(FqdnDhcpv6SrvTest, processRequestRenewFqdnFlags) - new test to
verify the permutations of DNS direction flags on NCR generation
This is solution #2:
src/lib/dhcpsrv/alloc_engine.h
src/lib/dhcpsrv/alloc_engine.cc
AllocEngine::extendLease6() - replaced logic to set the context flags with
simply adding the original lease to the changed_leases_ list.
AllocEngine::updateLeaseData() - removed logic to set the context flags.
src/bin/dhcp6/dhcp6_srv.cc
Dhcpv6Srv::createNameChangeRequests() - replaced the context flag check
with logic which looks for candidate IA addresses in the ctx.changed_leases_
list. If found and the FDQN doman name has not changed, we move on to the
next candidate.
src/bin/dhcp6/tests/fqdn_unittest.cc
TEST_F(FqdnDhcpv6SrvTest, createNameChangeRequestsNoAddr) - removed
testing of context flag permutations
src/lib/dhcpsrv/alloc_engine.h
src/lib/dhcpsrv/alloc_engine.cc
- AllocEngine::extendLease6()
- AllocEngine::updateLeaseData() - logic was added to clear the context
DNS update flags when the renewal does not alter the lease's FQDN.
src/bin/dhcp6/dhcp6_srv.h
src/bin/dhcp6/dhcp6_srv.cc
- Dhcpv6Srv::createNameChangeRequests() - added context as second parameter,
and modified function to return without creating NCR(s) if both update flags
in the context are false.
src/bin/dhcp6/tests/fqdn_unittest.cc
- TEST_F(FqdnDhcpv6SrvTest, createNameChangeRequests) - modified to verify
combinations of context update flags
- TEST_F(FqdnDhcpv6SrvTest, DISABLED_processTwoRequests) - renamed
to TEST_F(FqdnDhcpv6SrvTest, processTwoRequestsDiffFqdn) and enabled.
It had been disabled pending 3677 which has been completed.
- TEST_F(FqdnDhcpv6SrvTest, processTwoRequestsSameFqdn) - new test
which verifies that client "renewing" a lease by sending a second
request with the different FQDN generates the correct NCRs
- TEST_F(FqdnDhcpv6SrvTest, DISABLED_processRequestRenew) - renamed
to TEST_F(FqdnDhcpv6SrvTest, processRequestRenewDiffFqdn) and enabled.
It had been disabled pending 3677 which has been completed.
- TEST_F(FqdnDhcpv6SrvTest, processRequestRenewSameFqdn) - new test
which verifies that client renewing a lease by sending a renew
with the same FQDN does NOT generate any NCRs
The static analyzer indicated that the dereferenced object could
be NULL but in fact it is not. However, it is still safer to use
smart pointer, rather than raw pointer, so I updated the test.