]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- The update-conflict-detection feature would leave an FQDN updated without
authorDavid Hankins <dhankins@isc.org>
Thu, 26 Mar 2009 17:20:23 +0000 (17:20 +0000)
committerDavid Hankins <dhankins@isc.org>
Thu, 26 Mar 2009 17:20:23 +0000 (17:20 +0000)
  a DHCID (still currently implemented as a TXT RR).  This would cause later
  expiration or release events to fail to remove the domain name.  The feature
  now also inserts the client's up to date DHCID record, so records may safely
  be removed at expiration or release time.  Thanks to a patch submitted by
  Christof Chen.  [ISC-Bugs #19500]

RELNOTES
common/dns.c

index 8eeac4a48d122d2a5ed2e28c244d2008adce9235..f20a29c30d0d104799a9ff7a5ea043f643d43d6e 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -92,6 +92,13 @@ work on other platforms. Please report any problems and suggested fixes to
   sockets will be handled after the first return from select(), resulting in
   fewer system calls.
 
+- The update-conflict-detection feature would leave an FQDN updated without
+  a DHCID (still currently implemented as a TXT RR).  This would cause later
+  expiration or release events to fail to remove the domain name.  The feature
+  now also inserts the client's up to date DHCID record, so records may safely
+  be removed at expiration or release time.  Thanks to a patch submitted by
+  Christof Chen.
+
                        Changes since 4.1.0b1
 
 - A missing "else" in dhcrelay.c could have caused an interface not to
index 25cfb598f699cc01ef4d71d8fea031f1b3e97937..9fd0642fa68144d0ba80553726b3587d5fd5e819 100644 (file)
@@ -688,6 +688,26 @@ ddns_update_fwd(struct data_string *ddns_fwd_name, struct iaddr ddns_addr,
                updrec->r_opcode = DELETE;
 
                ISC_LIST_APPEND(updqueue, updrec, r_link);
+
+
+               /*
+                * With all other DHCID RR's deleted, add this client's
+                * DHCID unconditionally (as update-conflict-detection is
+                * disabled).
+                */
+               updrec = minires_mkupdrec(S_UPDATE,
+                                         (const char *)ddns_fwd_name->data,
+                                         C_IN, T_DHCID, ttl);
+               if (!updrec) {
+                       result = ISC_R_NOMEMORY;
+                       goto error;
+               }
+               updrec->r_data = ddns_dhcid->data;
+               updrec->r_size = ddns_dhcid->len;
+               updrec->r_opcode = ADD;
+               ISC_LIST_APPEND (updqueue, updrec, r_link);
        }