mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf()
Use the semantic patch from the previous commit to replace all the calls to dns_name_copy() with NULL as third argument with dns_name_copynf().
This commit is contained in:
parent
ac26ecf540
commit
c2dad0dcb2
34 changed files with 114 additions and 122 deletions
|
|
@ -836,7 +836,8 @@ clone_lookup(dig_lookup_t *lookold, bool servers) {
|
|||
memmove(looknew->ecs_addr, lookold->ecs_addr, len);
|
||||
}
|
||||
|
||||
RUNTIME_CHECK(dns_name_copy(dns_fixedname_name(&lookold->fdomain), dns_fixedname_name(&looknew->fdomain), NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(dns_fixedname_name(&lookold->fdomain),
|
||||
dns_fixedname_name(&looknew->fdomain));
|
||||
|
||||
if (servers)
|
||||
clone_server_list(lookold->my_server_list,
|
||||
|
|
@ -1841,7 +1842,7 @@ followup_lookup(dns_message_t *msg, dig_query_t *query, dns_section_t section)
|
|||
if (lookup->ns_search_only)
|
||||
lookup->recurse = false;
|
||||
domain = dns_fixedname_name(&lookup->fdomain);
|
||||
RUNTIME_CHECK(dns_name_copy(name, domain, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, domain);
|
||||
}
|
||||
debug("adding server %s", namestr);
|
||||
num = getaddresses(lookup, namestr, &lresult);
|
||||
|
|
|
|||
|
|
@ -394,7 +394,7 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
|
|||
dns_rdataset_current(rdataset, &rdata);
|
||||
result = dns_rdata_tostruct(&rdata, &cname, NULL);
|
||||
check_result(result, "dns_rdata_tostruct");
|
||||
RUNTIME_CHECK(dns_name_copy(&cname.cname, qname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(&cname.cname, qname);
|
||||
dns_rdata_freestruct(&cname);
|
||||
}
|
||||
}
|
||||
|
|
@ -456,7 +456,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
|
|||
|
||||
/* Add AAAA and MX lookups. */
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
RUNTIME_CHECK(dns_name_copy(query->lookup->name, name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(query->lookup->name, name);
|
||||
chase_cnamechain(msg, name);
|
||||
dns_name_format(name, namestr, sizeof(namestr));
|
||||
lookup = clone_lookup(query->lookup, false);
|
||||
|
|
|
|||
|
|
@ -423,7 +423,7 @@ chase_cnamechain(dns_message_t *msg, dns_name_t *qname) {
|
|||
dns_rdataset_current(rdataset, &rdata);
|
||||
result = dns_rdata_tostruct(&rdata, &cname, NULL);
|
||||
check_result(result, "dns_rdata_tostruct");
|
||||
RUNTIME_CHECK(dns_name_copy(&cname.cname, qname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(&cname.cname, qname);
|
||||
dns_rdata_freestruct(&cname);
|
||||
}
|
||||
}
|
||||
|
|
@ -481,7 +481,7 @@ printmessage(dig_query_t *query, const isc_buffer_t *msgbuf,
|
|||
|
||||
/* Add AAAA lookup. */
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
RUNTIME_CHECK(dns_name_copy(query->lookup->name, name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(query->lookup->name, name);
|
||||
chase_cnamechain(msg, name);
|
||||
dns_name_format(name, namestr, sizeof(namestr));
|
||||
lookup = clone_lookup(query->lookup, false);
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ loadkey(char *filename, unsigned char *key_buf, unsigned int key_buf_size,
|
|||
rdclass = dst_key_class(key);
|
||||
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
RUNTIME_CHECK(dns_name_copy(dst_key_name(key), name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(dst_key_name(key), name);
|
||||
|
||||
dst_key_free(&key);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ loadkey(char *filename, unsigned char *key_buf, unsigned int key_buf_size,
|
|||
rdclass = dst_key_class(key);
|
||||
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
RUNTIME_CHECK(dns_name_copy(dst_key_name(key), name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(dst_key_name(key), name);
|
||||
|
||||
dst_key_free(&key);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ savezonecut(dns_fixedname_t *fzonecut, dns_name_t *name) {
|
|||
dns_name_t *result;
|
||||
|
||||
result = dns_fixedname_initname(fzonecut);
|
||||
RUNTIME_CHECK(dns_name_copy(name, result, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, result);
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
|
@ -2325,7 +2325,7 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations,
|
|||
break;
|
||||
}
|
||||
if (result == ISC_R_NOMORE) {
|
||||
RUNTIME_CHECK(dns_name_copy(gorigin, nextname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(gorigin, nextname);
|
||||
done = true;
|
||||
} else if (result != ISC_R_SUCCESS)
|
||||
fatal("iterating through the database failed: %s",
|
||||
|
|
@ -2459,7 +2459,7 @@ nsec3ify(unsigned int hashalg, dns_iterations_t iterations,
|
|||
break;
|
||||
}
|
||||
if (result == ISC_R_NOMORE) {
|
||||
RUNTIME_CHECK(dns_name_copy(gorigin, nextname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(gorigin, nextname);
|
||||
done = true;
|
||||
} else if (result != ISC_R_SUCCESS)
|
||||
fatal("iterating through the database failed: %s",
|
||||
|
|
|
|||
|
|
@ -258,7 +258,8 @@ configure_zone_ssutable(const cfg_obj_t *zconfig, dns_zone_t *zone,
|
|||
|
||||
dns_fixedname_init(&fname);
|
||||
if (usezone) {
|
||||
RUNTIME_CHECK(dns_name_copy(dns_zone_getorigin(zone), dns_fixedname_name(&fname), NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(dns_zone_getorigin(zone),
|
||||
dns_fixedname_name(&fname));
|
||||
} else {
|
||||
str = cfg_obj_asstring(dname);
|
||||
isc_buffer_constinit(&b, str, strlen(str));
|
||||
|
|
|
|||
|
|
@ -2618,7 +2618,7 @@ recvsoa(isc_task_t *task, isc_event_t *event) {
|
|||
* address.
|
||||
*/
|
||||
zname = dns_fixedname_initname(&fzname);
|
||||
RUNTIME_CHECK(dns_name_copy(name, zname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, zname);
|
||||
}
|
||||
|
||||
if (debugging) {
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ syncptr(sample_instance_t *inst, dns_name_t *name,
|
|||
/* Reverse zone is managed by this driver, prepare PTR record */
|
||||
pevent->zone = NULL;
|
||||
dns_zone_attach(ptr_zone, &pevent->zone);
|
||||
RUNTIME_CHECK(dns_name_copy(name, dns_fixedname_name(&pevent->ptr_target_name), NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, dns_fixedname_name(&pevent->ptr_target_name));
|
||||
dns_name_clone(dns_fixedname_name(&pevent->ptr_target_name),
|
||||
&ptr_struct.ptr);
|
||||
dns_diff_init(inst->mctx, &pevent->diff);
|
||||
|
|
|
|||
|
|
@ -3203,7 +3203,7 @@ dns_adb_createfind(dns_adb_t *adb, isc_task_t *task, isc_taskaction_t action,
|
|||
find->partial_result |= (adbname->partial_result & wanted_addresses);
|
||||
if (alias) {
|
||||
if (target != NULL) {
|
||||
RUNTIME_CHECK(dns_name_copy(&adbname->target, target, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(&adbname->target, target);
|
||||
}
|
||||
result = DNS_R_ALIAS;
|
||||
} else
|
||||
|
|
|
|||
|
|
@ -936,8 +936,7 @@ client_resfind(resctx_t *rctx, dns_fetchevent_t *event) {
|
|||
dns_rdata_reset(&rdata);
|
||||
if (tresult != ISC_R_SUCCESS)
|
||||
goto done;
|
||||
RUNTIME_CHECK(dns_name_copy(&cname.cname, name, NULL)
|
||||
== ISC_R_SUCCESS);
|
||||
dns_name_copynf(&cname.cname, name);
|
||||
dns_rdata_freestruct(&cname);
|
||||
want_restart = true;
|
||||
goto done;
|
||||
|
|
@ -1363,7 +1362,7 @@ dns_client_startresolve(dns_client_t *client, const dns_name_t *name,
|
|||
rctx->sigrdataset = sigrdataset;
|
||||
|
||||
dns_fixedname_init(&rctx->name);
|
||||
RUNTIME_CHECK(dns_name_copy(name, dns_fixedname_name(&rctx->name), NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, dns_fixedname_name(&rctx->name));
|
||||
|
||||
rctx->client = client;
|
||||
ISC_LINK_INIT(rctx, link);
|
||||
|
|
@ -2163,7 +2162,7 @@ process_soa(updatectx_t *uctx, dns_rdataset_t *soaset,
|
|||
|
||||
if (uctx->zonename == NULL) {
|
||||
uctx->zonename = dns_fixedname_name(&uctx->zonefname);
|
||||
RUNTIME_CHECK(dns_name_copy(soaname, uctx->zonename, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(soaname, uctx->zonename);
|
||||
}
|
||||
|
||||
if (uctx->currentserver != NULL)
|
||||
|
|
@ -2539,7 +2538,7 @@ copy_name(isc_mem_t *mctx, dns_message_t *msg, const dns_name_t *name,
|
|||
dns_name_init(newname, NULL);
|
||||
dns_name_setbuffer(newname, namebuf);
|
||||
dns_message_takebuffer(msg, &namebuf);
|
||||
RUNTIME_CHECK(dns_name_copy(name, newname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, newname);
|
||||
|
||||
for (rdataset = ISC_LIST_HEAD(name->list); rdataset != NULL;
|
||||
rdataset = ISC_LIST_NEXT(rdataset, link)) {
|
||||
|
|
@ -2830,8 +2829,7 @@ dns_client_startupdate(dns_client_t *client, dns_rdataclass_t rdclass,
|
|||
action, arg, sizeof(*uctx->event));
|
||||
if (zonename != NULL) {
|
||||
uctx->zonename = dns_fixedname_name(&uctx->zonefname);
|
||||
RUNTIME_CHECK(dns_name_copy(zonename, uctx->zonename, NULL)
|
||||
== ISC_R_SUCCESS);
|
||||
dns_name_copynf(zonename, uctx->zonename);
|
||||
}
|
||||
if (servers != NULL) {
|
||||
for (server = ISC_LIST_HEAD(*servers);
|
||||
|
|
|
|||
|
|
@ -603,7 +603,7 @@ rpsdb_finddb(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version,
|
|||
nodep = &node;
|
||||
}
|
||||
rpsdb_findnode(db, name, false, nodep);
|
||||
RUNTIME_CHECK(dns_name_copy(name, foundname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, foundname);
|
||||
return (rpsdb_findrdataset(db, *nodep, NULL, type, 0, 0,
|
||||
rdataset, sigrdataset));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1244,7 +1244,7 @@ void
|
|||
dns_name_copynf(const dns_name_t *source, dns_name_t *dest);
|
||||
/*%<
|
||||
* Makes 'dest' refer to a copy of the name in 'source'. The data are either
|
||||
* copied to 'target' or in case of dns_name_copyfixed the dedicated buffer in
|
||||
* copied to 'target' or in case of dns_name_copynf the dedicated buffer in
|
||||
* 'dest'.
|
||||
*
|
||||
* Requires:
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ dns_db_createsoatuple(dns_db_t *db, dns_dbversion_t *ver, isc_mem_t *mctx,
|
|||
dns_name_t *zonename;
|
||||
|
||||
zonename = dns_fixedname_initname(&fixed);
|
||||
RUNTIME_CHECK(dns_name_copy(dns_db_origin(db), zonename, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(dns_db_origin(db), zonename);
|
||||
|
||||
node = NULL;
|
||||
result = dns_db_findnode(db, zonename, false, &node);
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ lookup_find(dns_lookup_t *lookup, dns_fetchevent_t *event) {
|
|||
dns_rdata_reset(&rdata);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
break;
|
||||
RUNTIME_CHECK(dns_name_copy(&cname.cname, name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(&cname.cname, name);
|
||||
dns_rdata_freestruct(&cname);
|
||||
want_restart = true;
|
||||
send_event = false;
|
||||
|
|
@ -391,7 +391,7 @@ dns_lookup_create(isc_mem_t *mctx, const dns_name_t *name, dns_rdatatype_t type,
|
|||
|
||||
dns_fixedname_init(&lookup->name);
|
||||
|
||||
RUNTIME_CHECK(dns_name_copy(name, dns_fixedname_name(&lookup->name), NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, dns_fixedname_name(&lookup->name));
|
||||
|
||||
lookup->type = type;
|
||||
lookup->view = NULL;
|
||||
|
|
|
|||
|
|
@ -521,7 +521,7 @@ rdataset_totext(dns_rdataset_t *rdataset,
|
|||
|
||||
if (owner_name != NULL) {
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
RUNTIME_CHECK(dns_name_copy(owner_name, name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(owner_name, name);
|
||||
dns_rdataset_getownercase(rdataset, name);
|
||||
}
|
||||
|
||||
|
|
@ -1215,7 +1215,7 @@ dump_rdatasets_raw(isc_mem_t *mctx, const dns_name_t *owner_name,
|
|||
dns_name_t *name;
|
||||
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
RUNTIME_CHECK(dns_name_copy(owner_name, name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(owner_name, name);
|
||||
for (result = dns_rdatasetiter_first(rdsiter);
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_rdatasetiter_next(rdsiter)) {
|
||||
|
|
|
|||
|
|
@ -1926,7 +1926,7 @@ dns_nsec3_noexistnodata(dns_rdatatype_t type, const dns_name_t *name,
|
|||
*/
|
||||
if (dns_name_countlabels(zonename) == 0 ||
|
||||
dns_name_issubdomain(zone, zonename))
|
||||
RUNTIME_CHECK(dns_name_copy(zone, zonename, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(zone, zonename);
|
||||
|
||||
if (!dns_name_equal(zone, zonename))
|
||||
return (ISC_R_IGNORE);
|
||||
|
|
@ -2069,7 +2069,7 @@ dns_nsec3_noexistnodata(dns_rdatatype_t type, const dns_name_t *name,
|
|||
(*logit)(arg, ISC_LOG_DEBUG(3),
|
||||
"NSEC3 indicates potential closest "
|
||||
"encloser: '%s'", namebuf);
|
||||
RUNTIME_CHECK(dns_name_copy(qname, closest, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(qname, closest);
|
||||
*setclosest = true;
|
||||
}
|
||||
dns_name_format(qname, namebuf, sizeof(namebuf));
|
||||
|
|
@ -2100,7 +2100,7 @@ dns_nsec3_noexistnodata(dns_rdatatype_t type, const dns_name_t *name,
|
|||
if (nearest != NULL &&
|
||||
(dns_name_countlabels(nearest) == 0 ||
|
||||
dns_name_issubdomain(nearest, qname))) {
|
||||
RUNTIME_CHECK(dns_name_copy(qname, nearest, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(qname, nearest);
|
||||
*setnearest = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ nta_create(dns_ntatable_t *ntatable, const dns_name_t *name,
|
|||
isc_refcount_init(&nta->refcount, 1);
|
||||
|
||||
nta->name = dns_fixedname_initname(&nta->fn);
|
||||
RUNTIME_CHECK(dns_name_copy(name, nta->name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, nta->name);
|
||||
|
||||
nta->magic = NTA_MAGIC;
|
||||
|
||||
|
|
|
|||
|
|
@ -79,8 +79,7 @@ dns_order_add(dns_order_t *order, const dns_name_t *name,
|
|||
ent = isc_mem_get(order->mctx, sizeof(*ent));
|
||||
|
||||
dns_fixedname_init(&ent->name);
|
||||
RUNTIME_CHECK(dns_name_copy(name, dns_fixedname_name(&ent->name), NULL)
|
||||
== ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, dns_fixedname_name(&ent->name));
|
||||
ent->rdtype = rdtype;
|
||||
ent->rdclass = rdclass;
|
||||
ent->mode = mode;
|
||||
|
|
|
|||
|
|
@ -1043,7 +1043,7 @@ chain_name(dns_rbtnodechain_t *chain, dns_name_t *name,
|
|||
|
||||
if (include_chain_end && chain->end != NULL) {
|
||||
NODENAME(chain->end, &nodename);
|
||||
RUNTIME_CHECK(dns_name_copy(&nodename, name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(&nodename, name);
|
||||
} else
|
||||
dns_name_reset(name);
|
||||
|
||||
|
|
@ -3191,8 +3191,7 @@ dns_rbtnodechain_current(dns_rbtnodechain_t *chain, dns_name_t *name,
|
|||
if (chain->level_count > 0) {
|
||||
result = chain_name(chain, origin, false);
|
||||
} else {
|
||||
RUNTIME_CHECK(dns_name_copy(dns_rootname, origin, NULL)
|
||||
== ISC_R_SUCCESS);
|
||||
dns_name_copynf(dns_rootname, origin);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2915,8 +2915,7 @@ zone_zonecut_callback(dns_rbtnode_t *node, dns_name_t *name, void *arg) {
|
|||
* is, we need to remember the node name.
|
||||
*/
|
||||
zcname = dns_fixedname_name(&search->zonecut_name);
|
||||
RUNTIME_CHECK(dns_name_copy(name, zcname, NULL) ==
|
||||
ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, zcname);
|
||||
search->copy_name = true;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -3040,7 +3039,7 @@ setup_delegation(rbtdb_search_t *search, dns_dbnode_t **nodep,
|
|||
*/
|
||||
if (foundname != NULL && search->copy_name) {
|
||||
zcname = dns_fixedname_name(&search->zonecut_name);
|
||||
RUNTIME_CHECK(dns_name_copy(zcname, foundname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(zcname, foundname);
|
||||
}
|
||||
if (nodep != NULL) {
|
||||
/*
|
||||
|
|
@ -3868,7 +3867,7 @@ zone_find(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version,
|
|||
*/
|
||||
result = find_wildcard(&search, &node, name);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
RUNTIME_CHECK(dns_name_copy(name, foundname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, foundname);
|
||||
wild = true;
|
||||
goto found;
|
||||
}
|
||||
|
|
@ -4517,9 +4516,7 @@ find_deepest_zonecut(rbtdb_search_t *search, dns_rbtnode_t *node,
|
|||
if (foundname != NULL) {
|
||||
dns_name_init(&name, NULL);
|
||||
dns_rbt_namefromnode(node, &name);
|
||||
RUNTIME_CHECK(dns_name_copy(&name, foundname,
|
||||
NULL)
|
||||
== ISC_R_SUCCESS);
|
||||
dns_name_copynf(&name, foundname);
|
||||
while (i > 0) {
|
||||
i--;
|
||||
level_node = search->chain.levels[i];
|
||||
|
|
@ -5076,7 +5073,7 @@ cache_findzonecut(dns_db_t *db, const dns_name_t *name, unsigned int options,
|
|||
} else if (result != ISC_R_SUCCESS) {
|
||||
goto tree_exit;
|
||||
} else if (!dcnull) {
|
||||
RUNTIME_CHECK(dns_name_copy(dcname, foundname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(dcname, foundname);
|
||||
}
|
||||
/*
|
||||
* We now go looking for an NS rdataset at the node.
|
||||
|
|
@ -9316,7 +9313,7 @@ dbiterator_origin(dns_dbiterator_t *iterator, dns_name_t *name) {
|
|||
if (rbtdbiter->result != ISC_R_SUCCESS)
|
||||
return (rbtdbiter->result);
|
||||
|
||||
RUNTIME_CHECK(dns_name_copy(origin, name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(origin, name);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
|
|
@ -9686,7 +9683,7 @@ glue_nsdname_cb(void *arg, const dns_name_t *name, dns_rdatatype_t qtype) {
|
|||
glue = isc_mem_get(ctx->rbtdb->common.mctx, sizeof(*glue));
|
||||
|
||||
gluename = dns_fixedname_initname(&glue->fixedname);
|
||||
RUNTIME_CHECK(dns_name_copy(name_a, gluename, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name_a, gluename);
|
||||
|
||||
dns_rdataset_init(&glue->rdataset_a);
|
||||
dns_rdataset_init(&glue->sigrdataset_a);
|
||||
|
|
@ -9710,7 +9707,7 @@ glue_nsdname_cb(void *arg, const dns_name_t *name, dns_rdatatype_t qtype) {
|
|||
sizeof(*glue));
|
||||
|
||||
gluename = dns_fixedname_initname(&glue->fixedname);
|
||||
RUNTIME_CHECK(dns_name_copy(name_aaaa, gluename, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name_aaaa, gluename);
|
||||
|
||||
dns_rdataset_init(&glue->rdataset_a);
|
||||
dns_rdataset_init(&glue->sigrdataset_a);
|
||||
|
|
|
|||
|
|
@ -454,7 +454,7 @@ towiresorted(dns_rdataset_t *rdataset, const dns_name_t *owner_name,
|
|||
added = 0;
|
||||
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
RUNTIME_CHECK(dns_name_copy(owner_name, name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(owner_name, name);
|
||||
dns_rdataset_getownercase(rdataset, name);
|
||||
offset = 0xffff;
|
||||
|
||||
|
|
|
|||
|
|
@ -1519,7 +1519,7 @@ fcount_incr(fetchctx_t *fctx, bool force) {
|
|||
counter->allowed = 1;
|
||||
counter->dropped = 0;
|
||||
counter->domain = dns_fixedname_initname(&counter->fdname);
|
||||
RUNTIME_CHECK(dns_name_copy(&fctx->domain, counter->domain, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(&fctx->domain, counter->domain);
|
||||
ISC_LIST_APPEND(dbucket->list, counter, link);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -5212,8 +5212,7 @@ clone_results(fetchctx_t *fctx) {
|
|||
event != NULL;
|
||||
event = ISC_LIST_NEXT(event, ev_link)) {
|
||||
name = dns_fixedname_name(&event->foundname);
|
||||
RUNTIME_CHECK(dns_name_copy(hname, name, NULL)
|
||||
== ISC_R_SUCCESS);
|
||||
dns_name_copynf(hname, name);
|
||||
event->result = hevent->result;
|
||||
dns_db_attach(hevent->db, &event->db);
|
||||
dns_db_attachnode(hevent->db, hevent->node, &event->node);
|
||||
|
|
@ -5342,7 +5341,8 @@ validated(isc_task_t *task, isc_event_t *event) {
|
|||
*/
|
||||
if (vevent->proofs[DNS_VALIDATOR_NOQNAMEPROOF] != NULL) {
|
||||
wild = dns_fixedname_initname(&fwild);
|
||||
RUNTIME_CHECK(dns_name_copy(dns_fixedname_name(&vevent->validator->wild), wild, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(dns_fixedname_name(&vevent->validator->wild),
|
||||
wild);
|
||||
}
|
||||
dns_validator_destroy(&vevent->validator);
|
||||
isc_mem_put(fctx->mctx, valarg, sizeof(*valarg));
|
||||
|
|
@ -5711,9 +5711,8 @@ validated(isc_task_t *task, isc_event_t *event) {
|
|||
eresult == DNS_R_NCACHENXRRSET);
|
||||
}
|
||||
hevent->result = eresult;
|
||||
RUNTIME_CHECK(dns_name_copy(vevent->name,
|
||||
dns_fixedname_name(&hevent->foundname), NULL)
|
||||
== ISC_R_SUCCESS);
|
||||
dns_name_copynf(vevent->name,
|
||||
dns_fixedname_name(&hevent->foundname));
|
||||
dns_db_attach(fctx->cache, &hevent->db);
|
||||
dns_db_transfernode(fctx->cache, &node, &hevent->node);
|
||||
clone_results(fctx);
|
||||
|
|
@ -5935,7 +5934,7 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, dns_adbaddrinfo_t *addrinfo,
|
|||
if (event != NULL) {
|
||||
adbp = &event->db;
|
||||
aname = dns_fixedname_name(&event->foundname);
|
||||
RUNTIME_CHECK(dns_name_copy(name, aname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, aname);
|
||||
anodep = &event->node;
|
||||
/*
|
||||
* If this is an ANY, SIG or RRSIG query, we're not
|
||||
|
|
@ -6563,7 +6562,7 @@ ncache_message(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
|
|||
if (event != NULL) {
|
||||
adbp = &event->db;
|
||||
aname = dns_fixedname_name(&event->foundname);
|
||||
RUNTIME_CHECK(dns_name_copy(name, aname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, aname);
|
||||
anodep = &event->node;
|
||||
ardataset = event->rdataset;
|
||||
}
|
||||
|
|
@ -7071,7 +7070,7 @@ resume_dslookup(isc_task_t *task, isc_event_t *event) {
|
|||
* Retrieve state from fctx->nsfetch before we destroy it.
|
||||
*/
|
||||
domain = dns_fixedname_initname(&fixed);
|
||||
RUNTIME_CHECK(dns_name_copy(&fctx->nsfetch->private->domain, domain, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(&fctx->nsfetch->private->domain, domain);
|
||||
if (dns_name_equal(&fctx->nsname, domain)) {
|
||||
if (dns_rdataset_isassociated(fevent->rdataset)) {
|
||||
dns_rdataset_disassociate(fevent->rdataset);
|
||||
|
|
|
|||
|
|
@ -885,7 +885,8 @@ make_log_buf(dns_rrl_t *rrl, dns_rrl_entry_t *e,
|
|||
e->log_qname = qbuf->index;
|
||||
qbuf->e = e;
|
||||
dns_fixedname_init(&qbuf->qname);
|
||||
RUNTIME_CHECK(dns_name_copy(qname, dns_fixedname_name(&qbuf->qname), NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(qname,
|
||||
dns_fixedname_name(&qbuf->qname));
|
||||
}
|
||||
}
|
||||
if (qbuf != NULL)
|
||||
|
|
|
|||
|
|
@ -998,7 +998,7 @@ findext(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version,
|
|||
dns_rdataset_disassociate(rdataset);
|
||||
|
||||
if (foundname != NULL) {
|
||||
RUNTIME_CHECK(dns_name_copy(xname, foundname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(xname, foundname);
|
||||
}
|
||||
|
||||
if (nodep != NULL)
|
||||
|
|
@ -1536,7 +1536,7 @@ dbiterator_current(dns_dbiterator_t *iterator, dns_dbnode_t **nodep,
|
|||
|
||||
attachnode(iterator->db, sdbiter->current, nodep);
|
||||
if (name != NULL) {
|
||||
RUNTIME_CHECK(dns_name_copy(sdbiter->current->name, name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(sdbiter->current->name, name);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
return (ISC_R_SUCCESS);
|
||||
|
|
@ -1551,7 +1551,7 @@ dbiterator_pause(dns_dbiterator_t *iterator) {
|
|||
static isc_result_t
|
||||
dbiterator_origin(dns_dbiterator_t *iterator, dns_name_t *name) {
|
||||
UNUSED(iterator);
|
||||
RUNTIME_CHECK(dns_name_copy(dns_rootname, name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(dns_rootname, name);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -997,7 +997,7 @@ findext(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version,
|
|||
dns_rdataset_disassociate(rdataset);
|
||||
|
||||
if (foundname != NULL) {
|
||||
RUNTIME_CHECK(dns_name_copy(xname, foundname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(xname, foundname);
|
||||
}
|
||||
|
||||
if (nodep != NULL)
|
||||
|
|
@ -1379,7 +1379,7 @@ dbiterator_current(dns_dbiterator_t *iterator, dns_dbnode_t **nodep,
|
|||
|
||||
attachnode(iterator->db, sdlziter->current, nodep);
|
||||
if (name != NULL) {
|
||||
RUNTIME_CHECK(dns_name_copy(sdlziter->current->name, name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(sdlziter->current->name, name);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
return (ISC_R_SUCCESS);
|
||||
|
|
@ -1394,7 +1394,7 @@ dbiterator_pause(dns_dbiterator_t *iterator) {
|
|||
static isc_result_t
|
||||
dbiterator_origin(dns_dbiterator_t *iterator, dns_name_t *name) {
|
||||
UNUSED(iterator);
|
||||
RUNTIME_CHECK(dns_name_copy(dns_rootname, name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(dns_rootname, name);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -799,8 +799,7 @@ dns_tkey_processquery(dns_message_t *msg, dns_tkeyctx_t *tctx,
|
|||
|
||||
if (!dns_name_equal(qname, dns_rootname)) {
|
||||
unsigned int n = dns_name_countlabels(qname);
|
||||
RUNTIME_CHECK(dns_name_copy(qname, keyname, NULL)
|
||||
== ISC_R_SUCCESS);
|
||||
dns_name_copynf(qname, keyname);
|
||||
dns_name_getlabelsequence(keyname, 0, n - 1, keyname);
|
||||
} else {
|
||||
static char hexdigits[16] = {
|
||||
|
|
@ -1497,7 +1496,7 @@ dns_tkey_gssnegotiate(dns_message_t *qmsg, dns_message_t *rmsg,
|
|||
dns_fixedname_t fixed;
|
||||
|
||||
dns_fixedname_init(&fixed);
|
||||
RUNTIME_CHECK(dns_name_copy(tkeyname, dns_fixedname_name(&fixed), NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(tkeyname, dns_fixedname_name(&fixed));
|
||||
tkeyname = dns_fixedname_name(&fixed);
|
||||
|
||||
tkey.common.rdclass = dns_rdataclass_any;
|
||||
|
|
|
|||
|
|
@ -1394,7 +1394,7 @@ verify(dns_validator_t *val, dst_key_t *key, dns_rdata_t *rdata,
|
|||
* for the NSEC3 NOQNAME proof.
|
||||
*/
|
||||
closest = dns_fixedname_name(&val->closest);
|
||||
RUNTIME_CHECK(dns_name_copy(wild, closest, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(wild, closest);
|
||||
labels = dns_name_countlabels(closest) - 1;
|
||||
dns_name_getlabelsequence(closest, 1, labels, closest);
|
||||
val->attributes |= VALATTR_NEEDNOQNAME;
|
||||
|
|
@ -2241,7 +2241,7 @@ findnsec3proofs(dns_validator_t *val) {
|
|||
namebuf, sizeof(namebuf));
|
||||
validator_log(val, ISC_LOG_DEBUG(3), "closest encloser from "
|
||||
"wildcard signature '%s'", namebuf);
|
||||
RUNTIME_CHECK(dns_name_copy(dns_fixedname_name(&val->closest), closest, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(dns_fixedname_name(&val->closest), closest);
|
||||
closestp = NULL;
|
||||
setclosestp = NULL;
|
||||
} else {
|
||||
|
|
@ -2634,7 +2634,7 @@ proveunsecure(dns_validator_t *val, bool have_ds, bool resume) {
|
|||
|
||||
secroot = dns_fixedname_initname(&fixedsecroot);
|
||||
found = dns_fixedname_initname(&fixedfound);
|
||||
RUNTIME_CHECK(dns_name_copy(val->event->name, secroot, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(val->event->name, secroot);
|
||||
/*
|
||||
* If this is a response to a DS query, we need to look in
|
||||
* the parent zone for the trust anchor.
|
||||
|
|
@ -2705,7 +2705,7 @@ proveunsecure(dns_validator_t *val, bool have_ds, bool resume) {
|
|||
|
||||
tname = dns_fixedname_initname(&val->fname);
|
||||
if (val->labels == dns_name_countlabels(val->event->name))
|
||||
RUNTIME_CHECK(dns_name_copy(val->event->name, tname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(val->event->name, tname);
|
||||
else
|
||||
dns_name_split(val->event->name, val->labels,
|
||||
NULL, tname);
|
||||
|
|
|
|||
|
|
@ -1297,7 +1297,7 @@ dns_view_findzonecut(dns_view_t *view, const dns_name_t *name,
|
|||
* We found an answer, but the cache may be better.
|
||||
*/
|
||||
zfname = dns_fixedname_name(&zfixedname);
|
||||
RUNTIME_CHECK(dns_name_copy(fname, zfname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(fname, zfname);
|
||||
dns_rdataset_clone(rdataset, &zrdataset);
|
||||
dns_rdataset_disassociate(rdataset);
|
||||
if (sigrdataset != NULL &&
|
||||
|
|
@ -1355,9 +1355,9 @@ dns_view_findzonecut(dns_view_t *view, const dns_name_t *name,
|
|||
dns_rdataset_isassociated(sigrdataset))
|
||||
dns_rdataset_disassociate(sigrdataset);
|
||||
}
|
||||
RUNTIME_CHECK(dns_name_copy(zfname, fname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(zfname, fname);
|
||||
if (dcname != NULL) {
|
||||
RUNTIME_CHECK(dns_name_copy(zfname, dcname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(zfname, dcname);
|
||||
}
|
||||
dns_rdataset_clone(&zrdataset, rdataset);
|
||||
if (sigrdataset != NULL &&
|
||||
|
|
@ -1379,7 +1379,7 @@ dns_view_findzonecut(dns_view_t *view, const dns_name_t *name,
|
|||
dns_rdataset_disassociate(rdataset);
|
||||
result = ISC_R_NOTFOUND;
|
||||
} else if (dcname != NULL) {
|
||||
RUNTIME_CHECK(dns_name_copy(fname, dcname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(fname, dcname);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2160,7 +2160,7 @@ dns_view_searchdlz(dns_view_t *view, const dns_name_t *name,
|
|||
*/
|
||||
for (i = namelabels; i > minlabels && i > 1; i--) {
|
||||
if (i == namelabels) {
|
||||
RUNTIME_CHECK(dns_name_copy(name, zonename, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, zonename);
|
||||
} else
|
||||
dns_name_split(name, i, NULL, zonename);
|
||||
|
||||
|
|
|
|||
|
|
@ -3051,7 +3051,7 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) {
|
|||
/*
|
||||
* Remember bottom of zone due to NS.
|
||||
*/
|
||||
RUNTIME_CHECK(dns_name_copy(name, bottom, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, bottom);
|
||||
|
||||
result = dns_rdataset_first(&rdataset);
|
||||
while (result == ISC_R_SUCCESS) {
|
||||
|
|
@ -3074,7 +3074,7 @@ integrity_checks(dns_zone_t *zone, dns_db_t *db) {
|
|||
/*
|
||||
* Remember bottom of zone due to DNAME.
|
||||
*/
|
||||
RUNTIME_CHECK(dns_name_copy(name, bottom, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, bottom);
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
}
|
||||
|
||||
|
|
@ -7858,7 +7858,7 @@ zone_nsec3chain(dns_zone_t *zone) {
|
|||
* Remember the obscuring name so that
|
||||
* we skip all obscured names.
|
||||
*/
|
||||
RUNTIME_CHECK(dns_name_copy(found, name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(found, name);
|
||||
delegation = true;
|
||||
goto next_addnode;
|
||||
}
|
||||
|
|
@ -8121,7 +8121,7 @@ zone_nsec3chain(dns_zone_t *zone) {
|
|||
* Remember the obscuring name so that
|
||||
* we skip all obscured names.
|
||||
*/
|
||||
RUNTIME_CHECK(dns_name_copy(found, name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(found, name);
|
||||
delegation = true;
|
||||
goto next_removenode;
|
||||
}
|
||||
|
|
@ -8843,7 +8843,7 @@ zone_sign(dns_zone_t *zone) {
|
|||
* Remember the obscuring name so that
|
||||
* we skip all obscured names.
|
||||
*/
|
||||
RUNTIME_CHECK(dns_name_copy(found, name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(found, name);
|
||||
is_bottom_of_zone = true;
|
||||
goto next_node;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1777,11 +1777,11 @@ verify_nodes(vctx_t *vctx, isc_result_t *vresult) {
|
|||
}
|
||||
if (is_delegation(vctx, name, node, NULL)) {
|
||||
zonecut = dns_fixedname_name(&fzonecut);
|
||||
RUNTIME_CHECK(dns_name_copy(name, zonecut, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, zonecut);
|
||||
isdelegation = true;
|
||||
} else if (has_dname(vctx, node)) {
|
||||
zonecut = dns_fixedname_name(&fzonecut);
|
||||
RUNTIME_CHECK(dns_name_copy(name, zonecut, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, zonecut);
|
||||
}
|
||||
nextnode = NULL;
|
||||
result = dns_dbiterator_next(dbiter);
|
||||
|
|
@ -1862,7 +1862,7 @@ verify_nodes(vctx_t *vctx, isc_result_t *vresult) {
|
|||
} else {
|
||||
prevname = dns_fixedname_name(&fprevname);
|
||||
}
|
||||
RUNTIME_CHECK(dns_name_copy(name, prevname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, prevname);
|
||||
if (*vresult == ISC_R_SUCCESS) {
|
||||
*vresult = tvresult;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2838,7 +2838,7 @@ rpz_rrset_find(ns_client_t *client, dns_name_t *name, dns_rdatatype_t type,
|
|||
query_rpzfetch(client, name, type);
|
||||
result = DNS_R_NXRRSET;
|
||||
} else {
|
||||
RUNTIME_CHECK(dns_name_copy(name, st->r_name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, st->r_name);
|
||||
result = ns_query_recurse(client, type, st->r_name,
|
||||
NULL, NULL, resuming);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
|
|
@ -3100,7 +3100,7 @@ rpz_save_p(dns_rpz_st_t *st, dns_rpz_zone_t *rpz, dns_rpz_type_t rpz_type,
|
|||
st->m.rpz = rpz;
|
||||
st->m.type = rpz_type;
|
||||
st->m.policy = policy;
|
||||
RUNTIME_CHECK(dns_name_copy(p_name, st->p_name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(p_name, st->p_name);
|
||||
st->m.prefix = prefix;
|
||||
st->m.result = result;
|
||||
SAVE(st->m.zone, *zonep);
|
||||
|
|
@ -4599,7 +4599,7 @@ query_findclosestnsec3(dns_name_t *qname, dns_db_t *db,
|
|||
dns_name_getlabelsequence(qname, skip, labels - skip,
|
||||
found);
|
||||
} else if (found != NULL)
|
||||
RUNTIME_CHECK(dns_name_copy(&name, found, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(&name, found);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -4788,7 +4788,7 @@ redirect(ns_client_t *client, dns_name_t *name, dns_rdataset_t *rdataset,
|
|||
}
|
||||
|
||||
CTRACE(ISC_LOG_DEBUG(3), "redirect: found data: done");
|
||||
RUNTIME_CHECK(dns_name_copy(found, name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(found, name);
|
||||
if (dns_rdataset_isassociated(rdataset))
|
||||
dns_rdataset_disassociate(rdataset);
|
||||
if (dns_rdataset_isassociated(&trdataset)) {
|
||||
|
|
@ -4888,7 +4888,7 @@ redirect2(ns_client_t *client, dns_name_t *name, dns_rdataset_t *rdataset,
|
|||
if (result != ISC_R_SUCCESS)
|
||||
return (ISC_R_NOTFOUND);
|
||||
} else {
|
||||
RUNTIME_CHECK(dns_name_copy(redirectname, client->view->redirectzone, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(redirectname, client->view->redirectzone);
|
||||
}
|
||||
|
||||
options = 0;
|
||||
|
|
@ -4958,7 +4958,7 @@ redirect2(ns_client_t *client, dns_name_t *name, dns_rdataset_t *rdataset,
|
|||
result = dns_name_concatenate(found, dns_rootname, found, NULL);
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
|
||||
RUNTIME_CHECK(dns_name_copy(found, name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(found, name);
|
||||
if (dns_rdataset_isassociated(rdataset))
|
||||
dns_rdataset_disassociate(rdataset);
|
||||
if (dns_rdataset_isassociated(&trdataset)) {
|
||||
|
|
@ -5515,8 +5515,7 @@ query_lookup(query_ctx_t *qctx) {
|
|||
* Fixup fname and sigrdataset.
|
||||
*/
|
||||
if (qctx->dns64 && qctx->rpz) {
|
||||
RUNTIME_CHECK(dns_name_copy(qctx->client->query.qname,
|
||||
qctx->fname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(qctx->client->query.qname, qctx->fname);
|
||||
if (qctx->sigrdataset != NULL &&
|
||||
dns_rdataset_isassociated(qctx->sigrdataset))
|
||||
{
|
||||
|
|
@ -5690,16 +5689,14 @@ recparam_update(ns_query_recparam_t *param, dns_rdatatype_t qtype,
|
|||
param->qname = NULL;
|
||||
} else {
|
||||
param->qname = dns_fixedname_initname(¶m->fqname);
|
||||
RUNTIME_CHECK(dns_name_copy(qname, param->qname, NULL)
|
||||
== ISC_R_SUCCESS);
|
||||
dns_name_copynf(qname, param->qname);
|
||||
}
|
||||
|
||||
if (qdomain == NULL) {
|
||||
param->qdomain = NULL;
|
||||
} else {
|
||||
param->qdomain = dns_fixedname_initname(¶m->fqdomain);
|
||||
RUNTIME_CHECK(dns_name_copy(qdomain, param->qdomain, NULL)
|
||||
== ISC_R_SUCCESS);
|
||||
dns_name_copynf(qdomain, param->qdomain);
|
||||
}
|
||||
}
|
||||
static atomic_uint_fast32_t last_soft, last_hard;
|
||||
|
|
@ -6049,7 +6046,7 @@ query_resume(query_ctx_t *qctx) {
|
|||
tname = dns_fixedname_name(&qctx->event->foundname);
|
||||
}
|
||||
|
||||
RUNTIME_CHECK(dns_name_copy(tname, qctx->fname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(tname, qctx->fname);
|
||||
|
||||
if (qctx->rpz_st != NULL &&
|
||||
(qctx->rpz_st->state & DNS_RPZ_RECURSING) != 0) {
|
||||
|
|
@ -6345,7 +6342,7 @@ query_checkrpz(query_ctx_t *qctx, isc_result_t result) {
|
|||
SAVE(qctx->rpz_st->q.node, qctx->node);
|
||||
SAVE(qctx->rpz_st->q.rdataset, qctx->rdataset);
|
||||
SAVE(qctx->rpz_st->q.sigrdataset, qctx->sigrdataset);
|
||||
RUNTIME_CHECK(dns_name_copy(qctx->fname, qctx->rpz_st->fname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(qctx->fname, qctx->rpz_st->fname);
|
||||
qctx->rpz_st->q.result = result;
|
||||
qctx->client->query.attributes |= NS_QUERYATTR_RECURSING;
|
||||
return (ISC_R_COMPLETE);
|
||||
|
|
@ -6370,9 +6367,7 @@ query_checkrpz(query_ctx_t *qctx, isc_result_t result) {
|
|||
* we looked up even if we were stopped short
|
||||
* in recursion or for a deferral.
|
||||
*/
|
||||
RUNTIME_CHECK(dns_name_copy(qctx->client->query.qname,
|
||||
qctx->fname, NULL)
|
||||
== ISC_R_SUCCESS);
|
||||
dns_name_copynf(qctx->client->query.qname, qctx->fname);
|
||||
rpz_clean(&qctx->zone, &qctx->db, &qctx->node, NULL);
|
||||
if (qctx->rpz_st->m.rdataset != NULL) {
|
||||
ns_client_putrdataset(qctx->client, &qctx->rdataset);
|
||||
|
|
@ -6545,8 +6540,7 @@ query_rpzcname(query_ctx_t *qctx, dns_name_t *cname) {
|
|||
return (result);
|
||||
}
|
||||
} else {
|
||||
RUNTIME_CHECK(dns_name_copy(cname, qctx->fname, NULL)
|
||||
== ISC_R_SUCCESS);
|
||||
dns_name_copynf(cname, qctx->fname);
|
||||
}
|
||||
|
||||
ns_client_keepname(client, qctx->fname, qctx->dbuf);
|
||||
|
|
@ -7776,7 +7770,7 @@ query_prepare_delegation_response(query_ctx_t *qctx) {
|
|||
* it here in case we need it.
|
||||
*/
|
||||
dns_fixedname_init(&qctx->dsname);
|
||||
RUNTIME_CHECK(dns_name_copy(qctx->fname, dns_fixedname_name(&qctx->dsname), NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(qctx->fname, dns_fixedname_name(&qctx->dsname));
|
||||
|
||||
/*
|
||||
* This is the best answer.
|
||||
|
|
@ -8229,7 +8223,7 @@ query_nodata(query_ctx_t *qctx, isc_result_t res) {
|
|||
return (ns_query_done(qctx));;
|
||||
}
|
||||
}
|
||||
RUNTIME_CHECK(dns_name_copy(qctx->client->query.qname, qctx->fname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(qctx->client->query.qname, qctx->fname);
|
||||
qctx->dns64 = false;
|
||||
#ifdef dns64_bis_return_excluded_addresses
|
||||
/*
|
||||
|
|
@ -8641,7 +8635,8 @@ query_redirect(query_ctx_t *qctx) {
|
|||
SAVE(qctx->client->query.redirect.sigrdataset,
|
||||
qctx->sigrdataset);
|
||||
qctx->client->query.redirect.result = DNS_R_NCACHENXDOMAIN;
|
||||
RUNTIME_CHECK(dns_name_copy(qctx->fname, qctx->client->query.redirect.fname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(qctx->fname,
|
||||
qctx->client->query.redirect.fname);
|
||||
qctx->client->query.redirect.authoritative =
|
||||
qctx->authoritative;
|
||||
qctx->client->query.redirect.is_zone = qctx->is_zone;
|
||||
|
|
@ -8751,7 +8746,7 @@ query_synthnodata(query_ctx_t *qctx, const dns_name_t *signer,
|
|||
goto cleanup;
|
||||
}
|
||||
|
||||
RUNTIME_CHECK(dns_name_copy(signer, name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(signer, name);
|
||||
|
||||
/*
|
||||
* Add SOA record. Omit the RRSIG if DNSSEC was not requested.
|
||||
|
|
@ -8816,7 +8811,7 @@ query_synthwildcard(query_ctx_t *qctx, dns_rdataset_t *rdataset,
|
|||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
RUNTIME_CHECK(dns_name_copy(qctx->client->query.qname, name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(qctx->client->query.qname, name);
|
||||
|
||||
cloneset = ns_client_newrdataset(qctx->client);
|
||||
if (cloneset == NULL) {
|
||||
|
|
@ -8978,7 +8973,7 @@ query_synthnxdomain(query_ctx_t *qctx,
|
|||
goto cleanup;
|
||||
}
|
||||
|
||||
RUNTIME_CHECK(dns_name_copy(signer, name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(signer, name);
|
||||
|
||||
/*
|
||||
* Add SOA record. Omit the RRSIG if DNSSEC was not requested.
|
||||
|
|
@ -9009,7 +9004,7 @@ query_synthnxdomain(query_ctx_t *qctx,
|
|||
goto cleanup;
|
||||
}
|
||||
|
||||
RUNTIME_CHECK(dns_name_copy(nowild, name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(nowild, name);
|
||||
|
||||
cloneset = ns_client_newrdataset(qctx->client);
|
||||
clonesigset = ns_client_newrdataset(qctx->client);
|
||||
|
|
@ -9062,7 +9057,7 @@ checksignames(dns_name_t *signer, dns_rdataset_t *sigrdataset) {
|
|||
result = dns_rdata_tostruct(&rdata, &rrsig, NULL);
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
if (dns_name_countlabels(signer) == 0) {
|
||||
RUNTIME_CHECK(dns_name_copy(&rrsig.signer, signer, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(&rrsig.signer, signer);
|
||||
} else if (!dns_name_equal(signer, &rrsig.signer)) {
|
||||
return (ISC_R_FAILURE);
|
||||
}
|
||||
|
|
@ -9479,7 +9474,8 @@ query_cname(query_ctx_t *qctx) {
|
|||
(qctx->fname->attributes & DNS_NAMEATTR_WILDCARD) != 0)
|
||||
{
|
||||
dns_fixedname_init(&qctx->wildcardname);
|
||||
RUNTIME_CHECK(dns_name_copy(qctx->fname, dns_fixedname_name(&qctx->wildcardname), NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(qctx->fname,
|
||||
dns_fixedname_name(&qctx->wildcardname));
|
||||
qctx->need_wildcardproof = true;
|
||||
}
|
||||
|
||||
|
|
@ -9591,7 +9587,8 @@ query_dname(query_ctx_t *qctx) {
|
|||
(qctx->fname->attributes & DNS_NAMEATTR_WILDCARD) != 0)
|
||||
{
|
||||
dns_fixedname_init(&qctx->wildcardname);
|
||||
RUNTIME_CHECK(dns_name_copy(qctx->fname, dns_fixedname_name(&qctx->wildcardname), NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(qctx->fname,
|
||||
dns_fixedname_name(&qctx->wildcardname));
|
||||
qctx->need_wildcardproof = true;
|
||||
}
|
||||
|
||||
|
|
@ -9783,7 +9780,8 @@ query_prepresponse(query_ctx_t *qctx) {
|
|||
(qctx->fname->attributes & DNS_NAMEATTR_WILDCARD) != 0)
|
||||
{
|
||||
dns_fixedname_init(&qctx->wildcardname);
|
||||
RUNTIME_CHECK(dns_name_copy(qctx->fname, dns_fixedname_name(&qctx->wildcardname), NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(qctx->fname,
|
||||
dns_fixedname_name(&qctx->wildcardname));
|
||||
qctx->need_wildcardproof = true;
|
||||
}
|
||||
|
||||
|
|
@ -10365,7 +10363,7 @@ query_addwildcardproof(query_ctx_t *qctx, bool ispositive,
|
|||
/*
|
||||
* Find the closest encloser.
|
||||
*/
|
||||
RUNTIME_CHECK(dns_name_copy(name, cname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, cname);
|
||||
while (result == DNS_R_NXDOMAIN) {
|
||||
labels = dns_name_countlabels(cname) - 1;
|
||||
/*
|
||||
|
|
@ -10418,7 +10416,7 @@ query_addwildcardproof(query_ctx_t *qctx, bool ispositive,
|
|||
*/
|
||||
labels = dns_name_countlabels(cname) + 1;
|
||||
if (dns_name_countlabels(name) == labels)
|
||||
RUNTIME_CHECK(dns_name_copy(name, wname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, wname);
|
||||
else
|
||||
dns_name_split(name, labels, NULL, wname);
|
||||
|
||||
|
|
|
|||
|
|
@ -706,7 +706,7 @@ foreach_rr(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
|
|||
add_rr_prepare_ctx_t *ctx = rr_action_data;
|
||||
|
||||
ctx->oldname = dns_fixedname_initname(&fixed);
|
||||
RUNTIME_CHECK(dns_name_copy(name, ctx->oldname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, ctx->oldname);
|
||||
dns_rdataset_getownercase(&rdataset, ctx->oldname);
|
||||
}
|
||||
|
||||
|
|
@ -1040,7 +1040,7 @@ temp_check(isc_mem_t *mctx, dns_diff_t *temp, dns_db_t *db,
|
|||
t = ISC_LIST_HEAD(temp->tuples);
|
||||
while (t != NULL) {
|
||||
name = &t->name;
|
||||
RUNTIME_CHECK(dns_name_copy(name, tmpname, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(name, tmpname);
|
||||
*typep = t->rdata.type;
|
||||
|
||||
/* A new unique name begins here. */
|
||||
|
|
|
|||
|
|
@ -911,7 +911,7 @@ resolve_ns(isc_task_t *task, isc_event_t *event) {
|
|||
ISC_LIST_APPEND(trans->nslist, pns, link);
|
||||
ISC_LIST_INIT(pns->servers);
|
||||
|
||||
RUNTIME_CHECK(dns_name_copy(&ns.name, pns->name, NULL) == ISC_R_SUCCESS);
|
||||
dns_name_copynf(&ns.name, pns->name);
|
||||
dns_rdata_reset(&rdata);
|
||||
dns_rdata_freestruct(&ns);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue