Commit a2101037 authored by Mark Andrews's avatar Mark Andrews
Browse files

4410. [bug] Address use after free and memory leak with dnstap.

                        [RT #42746]
parent b7b2e644
4410. [bug] Address use after free and memory leak with dnstap.
[RT #42746]
4409. [bug] DNS64 should exclude mapped addresses by default when
an exclude acl is not defined. [RT #42810]
......
......@@ -1178,10 +1178,6 @@ client_send(ns_client_t *client) {
isc_buffer_putuint16(&tcpbuffer, (isc_uint16_t) r.length);
isc_buffer_add(&tcpbuffer, r.length);
/* don't count the 2-octet length header */
respsize = isc_buffer_usedlength(&tcpbuffer) - 2;
result = client_sendpkg(client, &tcpbuffer);
#ifdef HAVE_DNSTAP
if (client->view != NULL) {
dns_dt_send(client->view, dtmsgtype,
......@@ -1190,6 +1186,9 @@ client_send(ns_client_t *client) {
}
#endif /* HAVE_DNSTAP */
/* don't count the 2-octet length header */
respsize = isc_buffer_usedlength(&tcpbuffer) - 2;
result = client_sendpkg(client, &tcpbuffer);
switch (isc_sockaddr_pf(&client->peeraddr)) {
case AF_INET:
......
......@@ -242,6 +242,9 @@ dns_dt_create(isc_mem_t *mctx, dns_dtmode_t mode, const char *path,
if (fopt != NULL)
fstrm_iothr_options_destroy(&fopt);
if (ffwopt != NULL)
fstrm_file_options_destroy(&ffwopt);
if (fuwopt != NULL)
fstrm_unix_writer_options_destroy(&fuwopt);
......@@ -280,8 +283,6 @@ dns_dt_reopen(dns_dtenv_t *env) {
return (ISC_R_SUCCESS);
}
return (result);
}
......@@ -641,8 +642,6 @@ dns_dt_send(dns_view_t *view, dns_dtmsgtype_t msgtype,
if (pack_dt(&dm.d, &dm.buf, &dm.len) == ISC_R_SUCCESS)
send_dt(view->dtenv, dm.buf, dm.len);
return;
}
void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment