mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
2403. [bug] TSIG context leak. [RT #18341]
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -1,3 +1,5 @@
|
||||
2403. [bug] TSIG context leak. [RT #18341]
|
||||
|
||||
2402. [port] Support Solaris 2.11 and over. [RT #18362]
|
||||
|
||||
2401. [bug] Expect to get E[MN]FILE errno internal_accept()
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: message.c,v 1.243 2008/04/03 10:45:35 marka Exp $ */
|
||||
/* $Id: message.c,v 1.244 2008/07/28 08:39:52 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@@ -622,6 +622,9 @@ msgreset(dns_message_t *msg, isc_boolean_t everything) {
|
||||
msg->tsigkey = NULL;
|
||||
}
|
||||
|
||||
if (msg->tsigctx != NULL)
|
||||
dst_context_destroy(&msg->tsigctx);
|
||||
|
||||
if (msg->query.base != NULL) {
|
||||
if (msg->free_query != 0)
|
||||
isc_mem_put(msg->mctx, msg->query.base,
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: xfrin.c,v 1.160 2008/07/23 23:27:54 marka Exp $ */
|
||||
/* $Id: xfrin.c,v 1.161 2008/07/28 08:39:52 marka Exp $ */
|
||||
|
||||
/*! \file */
|
||||
|
||||
@@ -1075,6 +1075,8 @@ xfrin_send_request(dns_xfrin_ctx_t *xfr) {
|
||||
xfr->nbytes = 0;
|
||||
isc_time_now(&xfr->start);
|
||||
msg->id = xfr->id;
|
||||
if (xfr->tsigctx != NULL)
|
||||
dst_context_destroy(&xfr->tsigctx);
|
||||
|
||||
CHECK(render(msg, xfr->mctx, &xfr->qbuffer));
|
||||
|
||||
@@ -1210,7 +1212,10 @@ xfrin_recv_done(isc_task_t *task, isc_event_t *ev) {
|
||||
|
||||
CHECK(dns_message_settsigkey(msg, xfr->tsigkey));
|
||||
CHECK(dns_message_setquerytsig(msg, xfr->lasttsig));
|
||||
|
||||
msg->tsigctx = xfr->tsigctx;
|
||||
xfr->tsigctx = NULL;
|
||||
|
||||
if (xfr->nmsg > 0)
|
||||
msg->tcp_continuation = 1;
|
||||
|
||||
@@ -1328,9 +1333,11 @@ xfrin_recv_done(isc_task_t *task, isc_event_t *ev) {
|
||||
xfr->nbytes += tcpmsg->buffer.used;
|
||||
|
||||
/*
|
||||
* Copy the context back.
|
||||
* Take the context back.
|
||||
*/
|
||||
INSIST(xfr->tsigctx == NULL);
|
||||
xfr->tsigctx = msg->tsigctx;
|
||||
msg->tsigctx = NULL;
|
||||
|
||||
dns_message_destroy(&msg);
|
||||
|
||||
@@ -1444,6 +1451,9 @@ maybe_free(dns_xfrin_ctx_t *xfr) {
|
||||
if (xfr->tcpmsg_valid)
|
||||
dns_tcpmsg_invalidate(&xfr->tcpmsg);
|
||||
|
||||
if (xfr->tsigctx != NULL)
|
||||
dst_context_destroy(&xfr->tsigctx);
|
||||
|
||||
if ((xfr->name.attributes & DNS_NAMEATTR_DYNAMIC) != 0)
|
||||
dns_name_free(&xfr->name, xfr->mctx);
|
||||
|
||||
|
Reference in New Issue
Block a user