summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>2001-10-26 21:26:41 +0000
committerTed Lemon <source@isc.org>2001-10-26 21:26:41 +0000
commite3849ee200884f2e1be230b9b38b2d83cba52a25 (patch)
tree8e969d76e53d1e1cf39634f489e17b5142e68366
parent740a8735f058dbb78d90a16d7045777431421544 (diff)
downloadisc-dhcp-e3849ee200884f2e1be230b9b38b2d83cba52a25.tar.gz
Treat deletion of a record that returns NXRRSET or NXDOMAIN as success.
-rw-r--r--common/dns.c9
-rw-r--r--server/ddns.c6
2 files changed, 12 insertions, 3 deletions
diff --git a/common/dns.c b/common/dns.c
index e940183a..d5296527 100644
--- a/common/dns.c
+++ b/common/dns.c
@@ -42,7 +42,7 @@
#ifndef lint
static char copyright[] =
-"$Id: dns.c,v 1.35.2.9 2001/10/18 20:10:40 mellon Exp $ Copyright (c) 2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: dns.c,v 1.35.2.10 2001/10/26 21:26:39 mellon Exp $ Copyright (c) 2001 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -863,8 +863,13 @@ isc_result_t ddns_remove_a (struct data_string *ddns_fwd_name,
* -- "Interaction between DHCP and DNS"
*/
- if (result != ISC_R_SUCCESS)
+ if (result != ISC_R_SUCCESS) {
+ /* If the rrset isn't there, we didn't need to do the
+ delete, which is success. */
+ if (result == ISC_R_NXRRSET || result == ISC_R_NXDOMAIN)
+ result = ISC_R_SUCCESS;
goto error;
+ }
while (!ISC_LIST_EMPTY (updqueue)) {
updrec = ISC_LIST_HEAD (updqueue);
diff --git a/server/ddns.c b/server/ddns.c
index b7683846..fbeb8b88 100644
--- a/server/ddns.c
+++ b/server/ddns.c
@@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
-"$Id: ddns.c,v 1.15.2.4 2001/06/28 23:33:20 mellon Exp $ Copyright (c) 2000-2001 The Internet Software Consortium. All rights reserved.\n";
+"$Id: ddns.c,v 1.15.2.5 2001/10/26 21:26:41 mellon Exp $ Copyright (c) 2000-2001 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -176,6 +176,10 @@ static isc_result_t ddns_remove_ptr (struct data_string *ddns_rev_name)
result = minires_nupdate (&resolver_state, ISC_LIST_HEAD (updqueue));
print_dns_status ((int)result, &updqueue);
+ /* Not there is success. */
+ if (result == ISC_R_NXRRSET || result == ISC_R_NXDOMAIN)
+ result = ISC_R_SUCCESS;
+
/* Fall through. */
error: