From: David Hankins Date: Thu, 26 Mar 2009 17:20:23 +0000 (+0000) Subject: - The update-conflict-detection feature would leave an FQDN updated without X-Git-Tag: v4_2_0a1~81 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a3dcc0b1c5d98266882267e8951d629c862c6373;p=thirdparty%2Fdhcp.git - 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. [ISC-Bugs #19500] --- diff --git a/RELNOTES b/RELNOTES index 8eeac4a48..f20a29c30 100644 --- 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 diff --git a/common/dns.c b/common/dns.c index 25cfb598f..9fd0642fa 100644 --- a/common/dns.c +++ b/common/dns.c @@ -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); }