2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

the message library now requires that names are allocated using

dns_message_gettempname()
This commit is contained in:
Andreas Gustafsson 1999-10-28 00:02:08 +00:00
parent bdc1edb6ea
commit a21582b70e
2 changed files with 12 additions and 4 deletions

View File

@ -15,7 +15,7 @@
* SOFTWARE. * SOFTWARE.
*/ */
/* $Id: xfrin.c,v 1.17 1999/10/25 22:20:50 gson Exp $ */ /* $Id: xfrin.c,v 1.18 1999/10/28 00:02:08 gson Exp $ */
#include <config.h> #include <config.h>
@ -691,6 +691,7 @@ xfrin_send_request(xfrin_ctx_t *xfr) {
dns_rdatalist_t soardl; dns_rdatalist_t soardl;
dns_rdataset_t soards; dns_rdataset_t soards;
dns_difftuple_t *soatuple = NULL; dns_difftuple_t *soatuple = NULL;
dns_name_t *qname = NULL;
dns_rdataset_init(&qrdataset); dns_rdataset_init(&qrdataset);
dns_rdataset_makequestion(&qrdataset, xfr->rdclass, xfr->reqtype); dns_rdataset_makequestion(&qrdataset, xfr->rdclass, xfr->reqtype);
@ -699,7 +700,10 @@ xfrin_send_request(xfrin_ctx_t *xfr) {
CHECK(dns_message_create(xfr->mctx, DNS_MESSAGE_INTENTRENDER, &msg)); CHECK(dns_message_create(xfr->mctx, DNS_MESSAGE_INTENTRENDER, &msg));
msg->tsigkey = xfr->tsigkey; msg->tsigkey = xfr->tsigkey;
dns_message_addname(msg, &xfr->name, DNS_SECTION_QUESTION); dns_message_gettempname(msg, &qname);
dns_name_init(qname, NULL);
dns_name_clone(&xfr->name, qname);
dns_message_addname(msg, qname, DNS_SECTION_QUESTION);
if (xfr->reqtype == dns_rdatatype_ixfr) { if (xfr->reqtype == dns_rdatatype_ixfr) {
/* Get the SOA. */ /* Get the SOA. */

View File

@ -15,7 +15,7 @@
* SOFTWARE. * SOFTWARE.
*/ */
/* $Id: xfrin.c,v 1.17 1999/10/25 22:20:50 gson Exp $ */ /* $Id: xfrin.c,v 1.18 1999/10/28 00:02:08 gson Exp $ */
#include <config.h> #include <config.h>
@ -691,6 +691,7 @@ xfrin_send_request(xfrin_ctx_t *xfr) {
dns_rdatalist_t soardl; dns_rdatalist_t soardl;
dns_rdataset_t soards; dns_rdataset_t soards;
dns_difftuple_t *soatuple = NULL; dns_difftuple_t *soatuple = NULL;
dns_name_t *qname = NULL;
dns_rdataset_init(&qrdataset); dns_rdataset_init(&qrdataset);
dns_rdataset_makequestion(&qrdataset, xfr->rdclass, xfr->reqtype); dns_rdataset_makequestion(&qrdataset, xfr->rdclass, xfr->reqtype);
@ -699,7 +700,10 @@ xfrin_send_request(xfrin_ctx_t *xfr) {
CHECK(dns_message_create(xfr->mctx, DNS_MESSAGE_INTENTRENDER, &msg)); CHECK(dns_message_create(xfr->mctx, DNS_MESSAGE_INTENTRENDER, &msg));
msg->tsigkey = xfr->tsigkey; msg->tsigkey = xfr->tsigkey;
dns_message_addname(msg, &xfr->name, DNS_SECTION_QUESTION); dns_message_gettempname(msg, &qname);
dns_name_init(qname, NULL);
dns_name_clone(&xfr->name, qname);
dns_message_addname(msg, qname, DNS_SECTION_QUESTION);
if (xfr->reqtype == dns_rdatatype_ixfr) { if (xfr->reqtype == dns_rdatatype_ixfr) {
/* Get the SOA. */ /* Get the SOA. */