]> 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:48:23 +0000 (04:48 +0000)
committerMark Andrews <marka@isc.org>
Wed, 12 May 2004 04:48:23 +0000 (04:48 +0000)
                        messages. [RT #11288]

CHANGES
bin/nsupdate/nsupdate.c

diff --git a/CHANGES b/CHANGES
index 674f7097c47a67d1b7a6b091e84e831ac970906c..0b2eeff51ce17a5e8cace1fc9a16910148c765d0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,7 @@
 1633.   [placeholder]  rt11331
 
-1632.  [placeholder]   rt11288
+1632.  [bug]           nsupdate failed to send prerequisite only UPDATE
+                       messages. [RT #11288]
 
 1631.  [bug]           dns_journal_compact() could sometimes corrupt the
                        journal. [RT #11124]
index 46d36097a51ec2e7f9397c125a8ee68ebfe3b283..53777b8dfb5b338509906ed13cda6dba70578c68 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: nsupdate.c,v 1.131 2004/04/10 04:03:16 marka Exp $ */
+/* $Id: nsupdate.c,v 1.132 2004/05/12 04:48:23 marka Exp $ */
 
 #include <config.h>
 
@@ -1847,12 +1847,17 @@ 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()");
 
        if (answer != NULL)
                dns_message_destroy(&answer);
-       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;
@@ -1879,7 +1884,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);