]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorAndreas Gustafsson <source@isc.org>
Thu, 14 Jun 2001 14:36:05 +0000 (14:36 +0000)
committerAndreas Gustafsson <source@isc.org>
Thu, 14 Jun 2001 14:36:05 +0000 (14:36 +0000)
 712.   [bug]           Sending a large signed update message caused an
                        assertion failure. [RT #718]

- Resetting a message should clear the TSIG/SIG(0) sections
- Rerendering a message if the first try returned USETCP should not call
  dns_message_settsigkey() again.

CHANGES
lib/dns/message.c
lib/dns/request.c

diff --git a/CHANGES b/CHANGES
index 277dc250dfd74e2f8af645b6620b7da4c44aaf22..3d07c02374b6e4d1a46942dc8bfd9ccfe0ea8eff 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -71,6 +71,9 @@
                        the server was shutdown during a zone tranfer.
                        [RT #830]
 
+ 712.  [bug]           Sending a large signed update message caused an
+                       assertion failure. [RT #718]
+
  669.  [bug]           dnssec-keygen now makes the public key file
                        non-world-readable for symmetric keys. [RT #403]
 
index 3e5e98475dbb55fa7e9f50a4061dbf4de39b3cb0..a943f0d9dce639c53e8cd1d54f455420ca6fde08 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: message.c,v 1.164.2.5 2001/04/19 18:54:26 gson Exp $ */
+/* $Id: message.c,v 1.164.2.6 2001/06/14 14:36:04 gson Exp $ */
 
 /***
  *** Imports
@@ -1977,6 +1977,16 @@ dns_message_renderreset(dns_message_t *msg) {
                        }
                }
        }
+       if (msg->tsigname != NULL)
+               dns_message_puttempname(msg, &msg->tsigname);
+       if (msg->tsig != NULL) {
+               dns_rdataset_disassociate(msg->tsig);
+               dns_message_puttemprdataset(msg, &msg->tsig);
+       }
+       if (msg->sig0 != NULL) {
+               dns_rdataset_disassociate(msg->sig0);
+               dns_message_puttemprdataset(msg, &msg->sig0);
+       }
 }
 
 isc_result_t
index 0ac7be3bd6872663593bf0d3594f63ec54182d57..ee64e9d7f254b444e2f48a0ba67c142bfcdc99fb 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: request.c,v 1.45.2.3 2001/01/09 22:44:10 bwelling Exp $ */
+/* $Id: request.c,v 1.45.2.4 2001/06/14 14:36:05 gson Exp $ */
 
 #include <config.h>
 
@@ -757,6 +757,7 @@ dns_request_createvia(dns_requestmgr_t *requestmgr, dns_message_t *message,
        isc_time_t expires;
        unsigned int attrs;
        dns_acl_t *blackhole = NULL;
+       isc_boolean_t setkey = ISC_TRUE;
 
        REQUIRE(VALID_REQUESTMGR(requestmgr));
        REQUIRE(message != NULL);
@@ -937,7 +938,8 @@ dns_request_createvia(dns_requestmgr_t *requestmgr, dns_message_t *message,
                goto cleanup;
 
        message->id = id;
-       dns_message_settsigkey(message, request->tsigkey);
+       if (setkey)
+               dns_message_settsigkey(message, request->tsigkey);
        result = req_render(message, &request->query, options, mctx);
        if (result == DNS_R_USETCP &&
            (options & DNS_REQUESTOPT_TCP) == 0) {
@@ -949,6 +951,7 @@ dns_request_createvia(dns_requestmgr_t *requestmgr, dns_message_t *message,
                dns_dispatch_detach(&request->dispatch);
                socket = NULL;
                options |= DNS_REQUESTOPT_TCP;
+               setkey = ISC_FALSE;
                goto use_tcp;
        }
        if (result != ISC_R_SUCCESS)