summaryrefslogtreecommitdiffstats
path: root/src/bin/dhcp6/dhcp6_srv.h
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2019-04-30 16:48:39 +0200
committerThomas Markwalder <tmark@isc.org>2019-05-15 17:21:56 +0200
commit66fc02e105ac8200c39914a18dc6ef1ecf7a0bbd (patch)
treebd0bb5d057152cc1471ede5c208145cf407dbccb /src/bin/dhcp6/dhcp6_srv.h
parent[#603,!322] Added ChangeLog entry for #603. (diff)
downloadkea-66fc02e105ac8200c39914a18dc6ef1ecf7a0bbd.tar.xz
kea-66fc02e105ac8200c39914a18dc6ef1ecf7a0bbd.zip
[#557,!310] Fixed kea-dhcp6 DNS updates on renewals with generated FQDNs
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
Diffstat (limited to 'src/bin/dhcp6/dhcp6_srv.h')
-rw-r--r--src/bin/dhcp6/dhcp6_srv.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/bin/dhcp6/dhcp6_srv.h b/src/bin/dhcp6/dhcp6_srv.h
index 63e9b4369d..e421832d03 100644
--- a/src/bin/dhcp6/dhcp6_srv.h
+++ b/src/bin/dhcp6/dhcp6_srv.h
@@ -653,9 +653,11 @@ protected:
/// The FQDN option carries response to the client about DNS updates that
/// server intends to perform for the DNS client. Based on this, the
/// function will create zero or more @c isc::dhcp_ddns::NameChangeRequest
- /// objects and store them in the internal queue. Requests created by this
- /// function are only for adding or updating DNS records. If DNS updates are
- /// disabled, this method returns immediately.
+ /// objects and store them in the internal queue. To catch lease renewals
+ /// that alter the FQDN, the function first looks at the context's changed
+ /// list of leases (if any) to determine if DNS entries need to be removed.
+ /// It then looks at the valid leases to determine if any DNS entries need
+ /// to be added. If DNS updates are disabled, this method returns immediately.
///
/// @todo Add support for multiple IAADDR options in the IA_NA.
///
@@ -969,10 +971,12 @@ private:
///
/// @param answer Message being sent to a client, which may hold IA_NA
/// and Client FQDN options to be used to generate name for a client.
+ /// @param ctx Client context.
///
/// @throw isc::Unexpected if specified message is NULL. This is treated
/// as a programmatic error.
- void generateFqdn(const Pkt6Ptr& answer);
+ void generateFqdn(const Pkt6Ptr& answer,
+ AllocEngine::ClientContext6& ctx);
/// @brief Updates statistics for received packets
/// @param query packet received