Commit 29d52c00 authored by Mark Andrews's avatar Mark Andrews

4081. [cleanup] Use dns_rdatalist_init consistently. [RT #38759]

parent 7ae96d88
4081. [cleanup] Use dns_rdatalist_init consistently. [RT #38759]
4080. [func] Completed change #4022, adding a "lock-file" option
to named.conf to override the default lock file,
in addition to the "named -X <filename>" command
......@@ -5,7 +7,7 @@
using either method disables the check completely.
[RT #37908]
4079. [func] Preserve the case of the ownername of records to
4079. [func] Preserve the case of the ownername of records to
the RRset level. [RT #37442]
4078. [bug] Handle the case where CMSG_SPACE(sizeof(int)) !=
......
......@@ -2152,9 +2152,6 @@ insert_soa(dig_lookup_t *lookup) {
dns_rdatalist_init(rdatalist);
rdatalist->type = dns_rdatatype_soa;
rdatalist->rdclass = lookup->rdclass;
rdatalist->covers = 0;
rdatalist->ttl = 0;
ISC_LIST_INIT(rdatalist->rdata);
ISC_LIST_APPEND(rdatalist->rdata, rdata, link);
dns_rdataset_init(rdataset);
......
......@@ -1867,11 +1867,9 @@ addnsec3param(const unsigned char *salt, size_t salt_len,
dns_rdatatype_nsec3param,
&nsec3param, &b);
check_result(result, "dns_rdata_fromstruct()");
dns_rdatalist_init(&rdatalist);
rdatalist.rdclass = rdata.rdclass;
rdatalist.type = rdata.type;
rdatalist.covers = 0;
rdatalist.ttl = 0;
ISC_LIST_INIT(rdatalist.rdata);
ISC_LIST_APPEND(rdatalist.rdata, &rdata, link);
result = dns_rdatalist_tordataset(&rdatalist, &rdataset);
check_result(result, "dns_rdatalist_tordataset()");
......@@ -1933,11 +1931,10 @@ addnsec3(dns_name_t *name, dns_dbnode_t *node,
nexthash, ISC_SHA1_DIGESTLENGTH,
nsec3buffer, &rdata);
check_result(result, "addnsec3: dns_nsec3_buildrdata()");
dns_rdatalist_init(&rdatalist);
rdatalist.rdclass = rdata.rdclass;
rdatalist.type = rdata.type;
rdatalist.covers = 0;
rdatalist.ttl = ttl;
ISC_LIST_INIT(rdatalist.rdata);
ISC_LIST_APPEND(rdatalist.rdata, &rdata, link);
result = dns_rdatalist_tordataset(&rdatalist, &rdataset);
check_result(result, "dns_rdatalist_tordataset()");
......@@ -2028,12 +2025,11 @@ nsec3clean(dns_name_t *name, dns_dbnode_t *node,
nsec3.salt_length == salt_len &&
!memcmp(nsec3.salt, salt, salt_len))
continue;
dns_rdatalist_init(&rdatalist);
rdatalist.rdclass = rdata.rdclass;
rdatalist.type = rdata.type;
rdatalist.covers = 0;
if (set_maxttl)
rdatalist.ttl = ISC_MIN(rdataset.ttl, maxttl);
ISC_LIST_INIT(rdatalist.rdata);
dns_rdata_init(&delrdata);
dns_rdata_clone(&rdata, &delrdata);
ISC_LIST_APPEND(rdatalist.rdata, &delrdata, link);
......
......@@ -2912,7 +2912,6 @@ query_add_cname(ns_client_t *client, dns_name_t *qname, dns_name_t *tname,
}
dns_rdataset_init(rdataset);
rdatalist->type = dns_rdatatype_cname;
rdatalist->covers = 0;
rdatalist->rdclass = client->message->rdclass;
rdatalist->ttl = ttl;
......
......@@ -2111,18 +2111,20 @@ add_soa(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
isc_result_t result;
unsigned char buf[DNS_SOA_BUFFERSIZE];
dns_rdataset_init(&rdataset);
dns_rdatalist_init(&rdatalist);
CHECK(dns_soa_buildrdata(origin, contact, dns_db_class(db),
0, 28800, 7200, 604800, 86400, buf, &rdata));
dns_rdatalist_init(&rdatalist);
rdatalist.type = rdata.type;
rdatalist.covers = 0;
rdatalist.rdclass = rdata.rdclass;
rdatalist.ttl = 86400;
ISC_LIST_APPEND(rdatalist.rdata, &rdata, link);
dns_rdataset_init(&rdataset);
CHECK(dns_rdatalist_tordataset(&rdatalist, &rdataset));
CHECK(dns_db_findnode(db, name, ISC_TRUE, &node));
CHECK(dns_db_addrdataset(db, node, version, 0, &rdataset, 0, NULL));
cleanup:
if (node != NULL)
dns_db_detachnode(db, &node);
......@@ -2144,8 +2146,6 @@ add_ns(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
isc_buffer_init(&b, buf, sizeof(buf));
dns_rdataset_init(&rdataset);
dns_rdatalist_init(&rdatalist);
ns.common.rdtype = dns_rdatatype_ns;
ns.common.rdclass = dns_db_class(db);
ns.mctx = NULL;
......@@ -2153,14 +2153,18 @@ add_ns(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
dns_name_clone(nsname, &ns.name);
CHECK(dns_rdata_fromstruct(&rdata, dns_db_class(db), dns_rdatatype_ns,
&ns, &b));
dns_rdatalist_init(&rdatalist);
rdatalist.type = rdata.type;
rdatalist.covers = 0;
rdatalist.rdclass = rdata.rdclass;
rdatalist.ttl = 86400;
ISC_LIST_APPEND(rdatalist.rdata, &rdata, link);
dns_rdataset_init(&rdataset);
CHECK(dns_rdatalist_tordataset(&rdatalist, &rdataset));
CHECK(dns_db_findnode(db, name, ISC_TRUE, &node));
CHECK(dns_db_addrdataset(db, node, version, 0, &rdataset, 0, NULL));
cleanup:
if (node != NULL)
dns_db_detachnode(db, &node);
......
......@@ -135,6 +135,7 @@ log_rr(dns_name_t *name, dns_rdata_t *rdata, isc_uint32_t ttl) {
dns_rdataset_t rds;
dns_rdata_t rd = DNS_RDATA_INIT;
dns_rdatalist_init(&rdl);
rdl.type = rdata->type;
rdl.rdclass = rdata->rdclass;
rdl.ttl = ttl;
......@@ -143,8 +144,6 @@ log_rr(dns_name_t *name, dns_rdata_t *rdata, isc_uint32_t ttl) {
rdl.covers = dns_rdata_covers(rdata);
else
rdl.covers = dns_rdatatype_none;
ISC_LIST_INIT(rdl.rdata);
ISC_LINK_INIT(&rdl, link);
dns_rdataset_init(&rds);
dns_rdata_init(&rd);
dns_rdata_clone(rdata, &rd);
......@@ -1462,8 +1461,6 @@ sendstream(xfrout_ctx_t *xfr) {
msgrdl->covers = dns_rdata_covers(rdata);
else
msgrdl->covers = dns_rdatatype_none;
ISC_LINK_INIT(msgrdl, link);
ISC_LIST_INIT(msgrdl->rdata);
ISC_LIST_APPEND(msgrdl->rdata, msgrdata, link);
result = dns_message_gettemprdataset(msg, &msgrds);
......
......@@ -1361,7 +1361,6 @@ make_prereq(char *cmdline, isc_boolean_t ispositive, isc_boolean_t isrrset) {
check_result(result, "dns_message_gettemprdatalist");
result = dns_message_gettemprdataset(updatemsg, &rdataset);
check_result(result, "dns_message_gettemprdataset");
dns_rdatalist_init(rdatalist);
rdatalist->type = rdatatype;
if (ispositive) {
if (isrrset && rdata->data != NULL)
......@@ -1370,11 +1369,8 @@ make_prereq(char *cmdline, isc_boolean_t ispositive, isc_boolean_t isrrset) {
rdatalist->rdclass = dns_rdataclass_any;
} else
rdatalist->rdclass = dns_rdataclass_none;
rdatalist->covers = 0;
rdatalist->ttl = 0;
rdata->rdclass = rdatalist->rdclass;
rdata->type = rdatatype;
ISC_LIST_INIT(rdatalist->rdata);
ISC_LIST_APPEND(rdatalist->rdata, rdata, link);
dns_rdataset_init(rdataset);
dns_rdatalist_tordataset(rdatalist, rdataset);
......@@ -1894,12 +1890,10 @@ update_addordelete(char *cmdline, isc_boolean_t isdelete) {
check_result(result, "dns_message_gettemprdatalist");
result = dns_message_gettemprdataset(updatemsg, &rdataset);
check_result(result, "dns_message_gettemprdataset");
dns_rdatalist_init(rdatalist);
rdatalist->type = rdatatype;
rdatalist->rdclass = rdataclass;
rdatalist->covers = rdatatype;
rdatalist->ttl = (dns_ttl_t)ttl;
ISC_LIST_INIT(rdatalist->rdata);
ISC_LIST_APPEND(rdatalist->rdata, rdata, link);
dns_rdataset_init(rdataset);
dns_rdatalist_tordataset(rdatalist, rdataset);
......
......@@ -1181,14 +1181,12 @@ t_dns_db_newversion(char **av) {
added_rdata.rdclass = rdataclass;
added_rdata.type = rdatatype;
dns_rdataset_init(&added_rdataset);
dns_rdatalist_init(&rdatalist);
rdatalist.type = rdatatype;
rdatalist.covers = 0;
rdatalist.rdclass = rdataclass;
rdatalist.ttl = 0;
ISC_LIST_INIT(rdatalist.rdata);
ISC_LIST_APPEND(rdatalist.rdata, &added_rdata, link);
dns_rdataset_init(&added_rdataset);
dns_result = dns_rdatalist_tordataset(&rdatalist, &added_rdataset);
if (dns_result != ISC_R_SUCCESS) {
t_info("dns_rdatalist_tordataset failed %s\n",
......@@ -1585,14 +1583,12 @@ t_dns_db_closeversion_1(char **av) {
added_rdata.rdclass = rdataclass;
added_rdata.type = new_rdatatype;
dns_rdataset_init(&added_rdataset);
dns_rdatalist_init(&rdatalist);
rdatalist.type = new_rdatatype;
rdatalist.covers = 0;
rdatalist.rdclass = rdataclass;
rdatalist.ttl = 0;
ISC_LIST_INIT(rdatalist.rdata);
ISC_LIST_APPEND(rdatalist.rdata, &added_rdata, link);
dns_rdataset_init(&added_rdataset);
dns_result = dns_rdatalist_tordataset(&rdatalist, &added_rdataset);
if (dns_result != ISC_R_SUCCESS) {
t_info("dns_rdatalist_tordataset failed %s\n",
......@@ -1993,14 +1989,12 @@ t_dns_db_closeversion_2(char **av) {
added_rdata.rdclass = rdataclass;
added_rdata.type = new_rdatatype;
dns_rdataset_init(&added_rdataset);
dns_rdatalist_init(&rdatalist);
rdatalist.type = new_rdatatype;
rdatalist.covers = 0;
rdatalist.rdclass = rdataclass;
rdatalist.ttl = 0;
ISC_LIST_INIT(rdatalist.rdata);
ISC_LIST_APPEND(rdatalist.rdata, &added_rdata, link);
dns_rdataset_init(&added_rdataset);
dns_result = dns_rdatalist_tordataset(&rdatalist, &added_rdataset);
if (dns_result != ISC_R_SUCCESS) {
t_info("dns_rdatalist_tordataset failed %s\n",
......
......@@ -301,12 +301,11 @@ diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver,
* of the diff itself is not affected.
*/
dns_rdatalist_init(&rdl);
rdl.type = type;
rdl.covers = covers;
rdl.rdclass = t->rdata.rdclass;
rdl.ttl = t->ttl;
ISC_LIST_INIT(rdl.rdata);
ISC_LINK_INIT(&rdl, link);
node = NULL;
if (type != dns_rdatatype_nsec3 &&
......@@ -487,12 +486,11 @@ dns_diff_load(dns_diff_t *diff, dns_addrdatasetfunc_t addfunc,
type = t->rdata.type;
covers = rdata_covers(&t->rdata);
dns_rdatalist_init(&rdl);
rdl.type = type;
rdl.covers = covers;
rdl.rdclass = t->rdata.rdclass;
rdl.ttl = t->ttl;
ISC_LIST_INIT(rdl.rdata);
ISC_LINK_INIT(&rdl, link);
while (t != NULL && dns_name_equal(&t->name, name) &&
t->op == op && t->rdata.type == type &&
......@@ -581,11 +579,10 @@ diff_tuple_tordataset(dns_difftuple_t *t, dns_rdata_t *rdata,
REQUIRE(rdl != NULL);
REQUIRE(rds != NULL);
dns_rdatalist_init(rdl);
rdl->type = t->rdata.type;
rdl->rdclass = t->rdata.rdclass;
rdl->ttl = t->ttl;
ISC_LIST_INIT(rdl->rdata);
ISC_LINK_INIT(rdl, link);
dns_rdataset_init(rds);
ISC_LINK_INIT(rdata, link);
dns_rdata_clone(&t->rdata, rdata);
......
......@@ -952,9 +952,6 @@ dns_dnssec_signmessage(dns_message_t *msg, dst_key_t *key) {
RETERR(dns_message_gettemprdatalist(msg, &datalist));
datalist->rdclass = dns_rdataclass_any;
datalist->type = dns_rdatatype_sig; /* SIG(0) */
datalist->covers = 0;
datalist->ttl = 0;
ISC_LIST_INIT(datalist->rdata);
ISC_LIST_APPEND(datalist->rdata, rdata, link);
dataset = NULL;
RETERR(dns_message_gettemprdataset(msg, &dataset));
......
......@@ -862,8 +862,6 @@ generate(dns_loadctx_t *lctx, char *range, char *lhs, char *gtype, char *rhs,
goto insist_cleanup;
}
ISC_LIST_INIT(rdatalist.rdata);
ISC_LINK_INIT(&rdatalist, link);
for (i = start; i <= stop; i += step) {
result = genname(lhs, i, lhsbuf, DNS_MASTER_LHS);
if (result != ISC_R_SUCCESS)
......@@ -913,8 +911,8 @@ generate(dns_loadctx_t *lctx, char *range, char *lhs, char *gtype, char *rhs,
if (result != ISC_R_SUCCESS)
goto error_cleanup;
dns_rdatalist_init(&rdatalist);
rdatalist.type = type;
rdatalist.covers = 0;
rdatalist.rdclass = lctx->zclass;
rdatalist.ttl = lctx->ttl;
ISC_LIST_PREPEND(head, &rdatalist, link);
......@@ -1957,11 +1955,11 @@ load_text(dns_loadctx_t *lctx) {
rdatalist_size += RDLSZ;
}
this = &rdatalist[rdlcount++];
dns_rdatalist_init(this);
this->type = type;
this->covers = covers;
this->rdclass = lctx->zclass;
this->ttl = lctx->ttl;
ISC_LIST_INIT(this->rdata);
if (ictx->glue != NULL)
ISC_LIST_INITANDPREPEND(glue_list, this, link);
else
......@@ -2295,7 +2293,6 @@ load_raw(dns_loadctx_t *lctx) {
ISC_LIST_INIT(head);
ISC_LIST_INIT(dummy);
dns_rdatalist_init(&rdatalist);
/*
* Allocate target_size of buffer space. This is greater than twice
......@@ -2386,6 +2383,7 @@ load_raw(dns_loadctx_t *lctx) {
isc_buffer_add(&target, (unsigned int)readlen);
/* Construct RRset headers */
dns_rdatalist_init(&rdatalist);
rdatalist.rdclass = isc_buffer_getuint16(&target);
rdatalist.type = isc_buffer_getuint16(&target);
rdatalist.covers = isc_buffer_getuint16(&target);
......
......@@ -336,8 +336,7 @@ newrdatalist(dns_message_t *msg) {
rdatalist = ISC_LIST_HEAD(msg->freerdatalist);
if (rdatalist != NULL) {
ISC_LIST_UNLINK(msg->freerdatalist, rdatalist, link);
dns_rdatalist_init(rdatalist);
return (rdatalist);
goto out;
}
msgblock = ISC_LIST_TAIL(msg->rdatalists);
......@@ -353,6 +352,7 @@ newrdatalist(dns_message_t *msg) {
rdatalist = msgblock_get(msgblock, dns_rdatalist_t);
}
out:
if (rdatalist != NULL)
dns_rdatalist_init(rdatalist);
......@@ -2763,7 +2763,6 @@ dns_message_setquerytsig(dns_message_t *msg, isc_buffer_t *querytsig) {
dns_rdata_init(rdata);
dns_rdata_fromregion(rdata, dns_rdataclass_any, dns_rdatatype_tsig, &r);
dns_message_takebuffer(msg, &buf);
ISC_LIST_INIT(list->rdata);
ISC_LIST_APPEND(list->rdata, rdata, link);
result = dns_rdatalist_tordataset(list, set);
if (result != ISC_R_SUCCESS)
......@@ -3680,7 +3679,6 @@ dns_message_buildopt(dns_message_t *message, dns_rdataset_t **rdatasetp,
dns_rdataset_init(rdataset);
rdatalist->type = dns_rdatatype_opt;
rdatalist->covers = 0;
/*
* Set Maximum UDP buffer size.
......@@ -3728,7 +3726,6 @@ dns_message_buildopt(dns_message_t *message, dns_rdataset_t **rdatasetp,
rdata->type = rdatalist->type;
rdata->flags = 0;
ISC_LIST_INIT(rdatalist->rdata);
ISC_LIST_APPEND(rdatalist->rdata, rdata, link);
result = dns_rdatalist_tordataset(rdatalist, rdataset);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
......
......@@ -151,12 +151,10 @@ addoptout(dns_message_t *message, dns_db_t *cache, dns_dbnode_t *node,
/*
* Initialize the list.
*/
dns_rdatalist_init(&ncrdatalist);
ncrdatalist.rdclass = dns_db_class(cache);
ncrdatalist.type = 0;
ncrdatalist.covers = covers;
ncrdatalist.ttl = maxttl;
ISC_LIST_INIT(ncrdatalist.rdata);
ISC_LINK_INIT(&ncrdatalist, link);
/*
* Build an ncache rdatas into buffer.
......
......@@ -189,11 +189,10 @@ dns_nsec_build(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node,
RETERR(dns_nsec_buildrdata(db, version, node, target, data, &rdata));
dns_rdatalist_init(&rdatalist);
rdatalist.rdclass = dns_db_class(db);
rdatalist.type = dns_rdatatype_nsec;
rdatalist.covers = 0;
rdatalist.ttl = ttl;
ISC_LIST_INIT(rdatalist.rdata);
ISC_LIST_APPEND(rdatalist.rdata, &rdata, link);
RETERR(dns_rdatalist_tordataset(&rdatalist, &rdataset));
result = dns_db_addrdataset(db, node, version, 0, &rdataset,
......
......@@ -89,6 +89,9 @@ dns_rdatalist_tordataset(dns_rdatalist_t *rdatalist,
REQUIRE(DNS_RDATASET_VALID(rdataset));
REQUIRE(! dns_rdataset_isassociated(rdataset));
/* Check if dns_rdatalist_init has was called. */
REQUIRE(rdatalist->upper[0] == 0xea);
rdataset->methods = &methods;
rdataset->rdclass = rdatalist->rdclass;
rdataset->type = rdatalist->type;
......
......@@ -305,12 +305,10 @@ dns_sdb_putrdata(dns_sdblookup_t *lookup, dns_rdatatype_t typeval,
rdatalist = isc_mem_get(mctx, sizeof(dns_rdatalist_t));
if (rdatalist == NULL)
return (ISC_R_NOMEMORY);
dns_rdatalist_init(rdatalist);
rdatalist->rdclass = lookup->sdb->common.rdclass;
rdatalist->type = typeval;
rdatalist->covers = 0;
rdatalist->ttl = ttl;
ISC_LIST_INIT(rdatalist->rdata);
ISC_LINK_INIT(rdatalist, link);
ISC_LIST_APPEND(lookup->lists, rdatalist, link);
} else
if (rdatalist->ttl != ttl)
......
......@@ -1881,12 +1881,10 @@ dns_sdlz_putrr(dns_sdlzlookup_t *lookup, const char *type, dns_ttl_t ttl,
rdatalist = isc_mem_get(mctx, sizeof(dns_rdatalist_t));
if (rdatalist == NULL)
return (ISC_R_NOMEMORY);
dns_rdatalist_init(rdatalist);
rdatalist->rdclass = lookup->sdlz->common.rdclass;
rdatalist->type = typeval;
rdatalist->covers = 0;
rdatalist->ttl = ttl;
ISC_LIST_INIT(rdatalist->rdata);
ISC_LINK_INIT(rdatalist, link);
ISC_LIST_APPEND(lookup->lists, rdatalist, link);
} else
if (rdatalist->ttl > ttl) {
......
......@@ -481,12 +481,10 @@ ATF_TC_BODY(totext, tc) {
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
/* First, test with an empty rdataset */
dns_rdatalist_init(&rdatalist);
rdatalist.rdclass = dns_rdataclass_in;
rdatalist.type = dns_rdatatype_none;
rdatalist.covers = dns_rdatatype_none;
rdatalist.ttl = 0;
ISC_LIST_INIT(rdatalist.rdata);
ISC_LINK_INIT(&rdatalist, link);
dns_rdataset_init(&rdataset);
result = dns_rdatalist_tordataset(&rdatalist, &rdataset);
......
......@@ -169,9 +169,7 @@ add_rdata_to_list(dns_message_t *msg, dns_name_t *name, dns_rdata_t *rdata,
RETERR(dns_message_gettemprdatalist(msg, &newlist));
newlist->rdclass = newrdata->rdclass;
newlist->type = newrdata->type;
newlist->covers = 0;
newlist->ttl = ttl;
ISC_LIST_INIT(newlist->rdata);
ISC_LIST_APPEND(newlist->rdata, newrdata, link);
RETERR(dns_message_gettemprdataset(msg, &newset));
......@@ -892,9 +890,6 @@ buildquery(dns_message_t *msg, dns_name_t *name,
RETERR(dns_message_gettemprdatalist(msg, &tkeylist));
tkeylist->rdclass = dns_rdataclass_any;
tkeylist->type = dns_rdatatype_tkey;
tkeylist->covers = 0;
tkeylist->ttl = 0;
ISC_LIST_INIT(tkeylist->rdata);
ISC_LIST_APPEND(tkeylist->rdata, rdata, link);
RETERR(dns_message_gettemprdataset(msg, &tkeyset));
......
......@@ -1134,9 +1134,6 @@ dns_tsig_sign(dns_message_t *msg) {
goto cleanup_rdatalist;
datalist->rdclass = dns_rdataclass_any;
datalist->type = dns_rdatatype_tsig;
datalist->covers = 0;
datalist->ttl = 0;
ISC_LIST_INIT(datalist->rdata);
ISC_LIST_APPEND(datalist->rdata, rdata, link);
dns_rdataset_init(dataset);
RUNTIME_CHECK(dns_rdatalist_tordataset(datalist, dataset)
......
......@@ -12520,9 +12520,7 @@ notify_createmessage(dns_zone_t *zone, unsigned int flags,
goto soa_cleanup;
temprdatalist->rdclass = rdata.rdclass;
temprdatalist->type = rdata.type;
temprdatalist->covers = 0;
temprdatalist->ttl = rdataset.ttl;
ISC_LIST_INIT(temprdatalist->rdata);
ISC_LIST_APPEND(temprdatalist->rdata, temprdata, link);
dns_rdataset_init(temprdataset);
......@@ -13791,11 +13789,10 @@ checkandaddsoa(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
result = dns_rdata_fromstruct(&rdata, rdataset->rdclass,
dns_rdatatype_soa, &soa, &b);
RUNTIME_CHECK(result == ISC_R_SUCCESS);
dns_rdatalist_init(&temprdatalist);
temprdatalist.rdclass = rdata.rdclass;
temprdatalist.type = rdata.type;
temprdatalist.covers = 0;
temprdatalist.ttl = rdataset->ttl;
ISC_LIST_INIT(temprdatalist.rdata);
ISC_LIST_APPEND(temprdatalist.rdata, &rdata, link);
dns_rdataset_init(&temprdataset);
......
......@@ -685,11 +685,8 @@ make_prereq(isc_mem_t *mctx, char *cmdline, isc_boolean_t ispositive,
rdatalist->rdclass = dns_rdataclass_any;
} else
rdatalist->rdclass = dns_rdataclass_none;
rdatalist->covers = 0;
rdatalist->ttl = 0;
rdata->rdclass = rdatalist->rdclass;
rdata->type = rdatatype;
ISC_LIST_INIT(rdatalist->rdata);
ISC_LIST_APPEND(rdatalist->rdata, rdata, link);
ISC_LIST_APPEND(usedrdatalists, rdatalist, link);
......
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