]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1632. [bug] nsupdate failed to send prerequisite only UPDATE
authorMark Andrews <marka@isc.org>
Wed, 12 May 2004 04:46:17 +0000 (04:46 +0000)
committerMark Andrews <marka@isc.org>
Wed, 12 May 2004 04:46:17 +0000 (04:46 +0000)
                        messages. [RT #11288]

CHANGES
bin/nsupdate/nsupdate.c

diff --git a/CHANGES b/CHANGES
index ed887fd0dba6fde9f8dcc7b52f9a837eb8a8ee1e..60497957ec9cefb26fda46138a020ff83d247e26 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+1632.  [bug]           nsupdate failed to send prerequisite only UPDATE
+                       messages. [RT #11288]
 
 1627.  [bug]           win32: sockets were not being closed when the
                        last external reference was removed. [RT# 11179]
index 8d64f6716bbe02044e5a6c39094172aa47f25544..710418d0eba10caad72357a41acf462814587f2d 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: nsupdate.c,v 1.103.2.22 2004/04/10 04:07:09 marka Exp $ */
+/* $Id: nsupdate.c,v 1.103.2.23 2004/05/12 04:46:17 marka Exp $ */
 
 #include <config.h>
 
@@ -1843,10 +1843,15 @@ start_update(void) {
        dns_request_t *request = NULL;
        dns_message_t *soaquery = NULL;
        dns_name_t *firstname;
+       dns_section_t section = DNS_SECTION_UPDATE;
 
        ddebug("start_update()");
 
-       result = dns_message_firstname(updatemsg, DNS_SECTION_UPDATE);
+       result = dns_message_firstname(updatemsg, section);
+       if (result == ISC_R_NOMORE) {
+               section = DNS_SECTION_PREREQUISITE;
+               result = dns_message_firstname(updatemsg, section);
+       }
        if (result != ISC_R_SUCCESS) {
                done_update();
                return;
@@ -1873,7 +1878,7 @@ start_update(void) {
        dns_rdataset_makequestion(rdataset, getzoneclass(), dns_rdatatype_soa);
 
        firstname = NULL;
-       dns_message_currentname(updatemsg, DNS_SECTION_UPDATE, &firstname);
+       dns_message_currentname(updatemsg, section, &firstname);
        dns_name_init(name, NULL);
        dns_name_clone(firstname, name);