Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#5373 closed defect (duplicate)

kea-dhcp4 removes DNS entries upon renewal when using replace-client-name always/when-not-present

Reported by: tmark Owned by:
Priority: medium Milestone: Kea1.3-final
Component: ddns Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 6
Total Hours: 0 Internal?: no


As reported by David Marcos and discussed in following thread:

We have the following issue:

  1. If you use replace-client-name = "always":

Upon renewal, we are incorrectly deciding the FQDN has changed and is blank, and are doing a remove only. It does not matter whether the client sends the
generated name in the renewals or not.

  1. If you use replace-client-name = "when-not-present":

We commit this same basic mistake if the client omits the hostname on
renewals. If, however, they send the generated hostname on renewals we
correctly assert they are equal and do not alter DNS.

In AllocEngine::renewLease4() we attempt to check if the FQDN has changed between the old and new lease. The difficulty here is that server has not generated the name for the "new" lease and compares a blank name to the old lease's generated name and as they are different we queue a remove. Later on
, in Dhcpv4Srv::createNameChangeRequests() we again compare old to new lease but this occurs after the name has been generated. The names between old and new lease now match and we decide not to queue an ADD.

If we simply move the remove queuing logic from AllocEngine::renewLease4() to Dhcpv4Srv::createNameChangeRequests(), the problem goes away. I've attached a rough draft patch that works.


Attachments (1)

ddns_fix.diff (2.5 KB) - added by tmark 2 years ago.
rough draft patch

Download all attachments as: .zip

Change History (4)

Changed 2 years ago by tmark

rough draft patch

comment:1 Changed 2 years ago by tmark

  • Add Hours to Ticket changed from 0 to 6
  • Component changed from Unclassified to ddns

comment:2 Changed 2 years ago by tmark

  • Resolution set to duplicate
  • Status changed from new to closed

This is the same as 5369.

comment:3 Changed 2 years ago by tomek

  • Milestone changed from Kea-proposed to Kea1.3-final
Note: See TracTickets for help on using tickets.