transaction identification information. The second argument is a leased
address. The third argument includes the reason for the failure.
-% DHCP6_DDNS_LEASE_ASSIGN_FQDN_CHANGE FQDN %1: FQDN for the allocated lease: %2 has changed. New values: hostname = %3, reverse mapping = %4, forward mapping = %5
-This debug message is logged when FQDN mapping for a particular lease has
-been changed by the recent Request message. This mapping will be changed in DNS.
-The first argument includes the client and the transaction identification
-information. The second argument holds the details about the lease for which
-the FQDN information and/or mappings have changed. The remaining arguments
-hold the new FQDN information and flags for mappings.
-
% DHCP6_DDNS_LEASE_RENEW_FQDN_CHANGE FQDN %1: FQDN for the renewed lease: %2 has changed. New values: hostname = %3, reverse mapping = %4, forward mapping = %5
This debug message is logged when FQDN mapping for a particular lease has been
changed by the recent Renew message. This mapping will be changed in DNS.
// but this is considered waste of bandwidth as absence of status
// code is considered a success.
- if (!fake_allocation) {
- Lease6Ptr old_lease;
- if (!ctx.changed_leases_.empty()) {
- old_lease = *ctx.changed_leases_.begin();
-
- // Allocation engine has returned an existing lease. If so, we
- // have to check that the FQDN settings we provided are the same
- // that were set. If they aren't, we will have to remove existing
- // DNS records and update the lease with the new settings.
-// conditionalNCRRemoval(query, old_lease, lease, ctx.hostname_,
- // do_fwd, do_rev);
- }
-
- // We need to repeat that check for leases that used to be used, but
- // are no longer valid.
-/* if (!ctx.old_leases_.empty()) {
- old_lease = *ctx.old_leases_.begin();
- conditionalNCRRemoval(query, old_lease, lease, ctx.hostname_,
- do_fwd, do_rev);
- } */
- }
} else {
// Allocation engine did not allocate a lease. The engine logged
// cause of that failure. The only thing left is to insert
return (ia_rsp);
}
-void
-Dhcpv6Srv::conditionalNCRRemoval(const Pkt6Ptr& query, Lease6Ptr& old_lease,
- Lease6Ptr& new_lease, const std::string& hostname,
- bool do_fwd, bool do_rev) {
- if (old_lease && !new_lease->hasIdenticalFqdn(*old_lease)) {
- LOG_DEBUG(ddns6_logger, DBG_DHCP6_DETAIL, DHCP6_DDNS_LEASE_ASSIGN_FQDN_CHANGE)
- .arg(query->getLabel())
- .arg(old_lease->toText())
- .arg(hostname)
- .arg(do_rev ? "true" : "false")
- .arg(do_fwd ? "true" : "false");
-
- // Schedule removal of the existing lease.
- queueNCR(CHG_REMOVE, old_lease);
- }
-}
-
OptionPtr
Dhcpv6Srv::assignIA_PD(const Pkt6Ptr& query, const Pkt6Ptr& answer,
AllocEngine::ClientContext6& orig_ctx,
/// as a programmatic error.
void generateFqdn(const Pkt6Ptr& answer);
-
- /// @brief Triggers removal Name Change Request if FQDN data changes in leases
- ///
- /// If there are any differences (different fwd or rev flags, or different
- /// hostname) a DNS update for removing entry will be generated.
- ///
- /// @param query a pointer to the client's message
- /// @param old_lease old version of the lease
- /// @param new_lease new version of the lease (may be NULL)
- /// @param hostname specifies hostname (for printing purposes)
- /// @param do_fwd specifies if reverse updates are enabled (for printing purposes)
- /// @param do_rev specifies if reverse updates are enabled (for printing purposes)
- void conditionalNCRRemoval(const Pkt6Ptr& query, Lease6Ptr& old_lease,
- Lease6Ptr& new_lease, const std::string& hostname,
- bool do_fwd, bool do_rev);
-
/// @brief Updates statistics for received packets
/// @param query packet received
static void processStatsReceived(const Pkt6Ptr& query);