2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Change dns_message_create() function to accept memory pools

Instead of creating new memory pools for each new dns_message, change
dns_message_create() method to optionally accept externally created
dns_fixedname_t and dns_rdataset_t memory pools.  This allows us to
preallocate the memory pools in ns_client and dns_resolver units for the
lifetime of dns_resolver_t and ns_clientmgr_t.
This commit is contained in:
Ondřej Surý
2023-09-22 15:00:40 +02:00
parent 759a977a67
commit f5af981831
21 changed files with 194 additions and 168 deletions

View File

@@ -262,7 +262,8 @@ attach_query_msg_to_client(ns_client_t *client, const char *qnamestr,
/*
* Create a new DNS message holding a query.
*/
dns_message_create(mctx, DNS_MESSAGE_INTENTRENDER, &message);
dns_message_create(mctx, NULL, NULL, DNS_MESSAGE_INTENTRENDER,
&message);
/*
* Set query ID to a random value.