mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-09 01:42:07 -04:00
s/DNS_R_/ISC_R_/ change for some codes.
This commit is contained in:
parent
c1a2cfef7f
commit
4195904998
113 changed files with 1657 additions and 1684 deletions
|
|
@ -266,9 +266,9 @@ expecttofindkey(dns_name_t *name, dns_db_t *db, dns_dbversion_t *version) {
|
|||
result = dns_db_find(db, name, version, dns_rdatatype_key, options,
|
||||
0, NULL, dns_fixedname_name(&fname), NULL, NULL);
|
||||
switch (result) {
|
||||
case DNS_R_SUCCESS:
|
||||
case ISC_R_SUCCESS:
|
||||
case DNS_R_NXDOMAIN:
|
||||
case DNS_R_NXRDATASET:
|
||||
case DNS_R_NXRRSET:
|
||||
return ISC_TRUE;
|
||||
case DNS_R_DELEGATION:
|
||||
case DNS_R_CNAME:
|
||||
|
|
@ -470,7 +470,7 @@ signset(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node,
|
|||
dns_rdata_freestruct(&sig);
|
||||
result = dns_rdataset_next(&oldsigset);
|
||||
}
|
||||
if (result == DNS_R_NOMORE)
|
||||
if (result == ISC_R_NOMORE)
|
||||
result = ISC_R_SUCCESS;
|
||||
check_result(result, "dns_db_dns_rdataset_first()/next()");
|
||||
dns_rdataset_disassociate(&oldsigset);
|
||||
|
|
@ -569,7 +569,7 @@ hasnullkey(dns_rdataset_t rdataset) {
|
|||
return (ISC_TRUE);
|
||||
result = dns_rdataset_next(&rdataset);
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
check_result(result, "iteration over keys");
|
||||
return (ISC_FALSE);
|
||||
}
|
||||
|
|
@ -669,7 +669,7 @@ signname(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node,
|
|||
dns_rdataset_disassociate(&rdataset);
|
||||
result = dns_rdatasetiter_next(rdsiter);
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
fatal("rdataset iteration failed");
|
||||
dns_rdatasetiter_destroy(&rdsiter);
|
||||
}
|
||||
|
|
@ -694,9 +694,9 @@ active_node(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node) {
|
|||
if (!active)
|
||||
result = dns_rdatasetiter_next(rdsiter);
|
||||
else
|
||||
result = DNS_R_NOMORE;
|
||||
result = ISC_R_NOMORE;
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
fatal("rdataset iteration failed");
|
||||
dns_rdatasetiter_destroy(&rdsiter);
|
||||
|
||||
|
|
@ -850,7 +850,7 @@ signzone(dns_db_t *db, dns_dbversion_t *version) {
|
|||
&nextnode, origin, lastcut);
|
||||
if (result == ISC_R_SUCCESS)
|
||||
target = nextname;
|
||||
else if (result == DNS_R_NOMORE)
|
||||
else if (result == ISC_R_NOMORE)
|
||||
target = origin;
|
||||
else {
|
||||
target = NULL; /* Make compiler happy. */
|
||||
|
|
@ -864,7 +864,7 @@ signzone(dns_db_t *db, dns_dbversion_t *version) {
|
|||
dns_db_detachnode(db, &curnode);
|
||||
node = nextnode;
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
fatal("db iteration failed");
|
||||
if (lastcut != NULL) {
|
||||
dns_name_free(lastcut, mctx);
|
||||
|
|
|
|||
|
|
@ -65,14 +65,14 @@ convert_named_acl(char *aclname, dns_c_ctx_t *cctx,
|
|||
}
|
||||
/* Not yet converted. Convert now. */
|
||||
result = dns_c_acltable_getacl(cctx->acls, aclname, &cacl);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_SECURITY,
|
||||
DNS_LOGMODULE_ACL, ISC_LOG_WARNING,
|
||||
"undefined ACL '%s'", aclname);
|
||||
return (result);
|
||||
}
|
||||
result = dns_acl_fromconfig(cacl->ipml, cctx, ctx, mctx, &dacl);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
dacl->name = aclname;
|
||||
ISC_LIST_APPEND(ctx->named_acl_cache, dacl, nextincache);
|
||||
|
|
|
|||
|
|
@ -991,12 +991,12 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
|||
client->signer = NULL;
|
||||
dns_name_init(&client->signername, NULL);
|
||||
result = dns_message_signer(client->message, &client->signername);
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
ns_client_log(client, DNS_LOGCATEGORY_SECURITY,
|
||||
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(3),
|
||||
"request has valid signature");
|
||||
client->signer = &client->signername;
|
||||
} else if (result == DNS_R_NOTFOUND) {
|
||||
} else if (result == ISC_R_NOTFOUND) {
|
||||
ns_client_log(client, DNS_LOGCATEGORY_SECURITY,
|
||||
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(3),
|
||||
"request is not signed");
|
||||
|
|
@ -1024,7 +1024,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
|
|||
/* XXX this will log too much too early */
|
||||
ns_client_checkacl(client, "recursion",
|
||||
ns_g_server->recursionacl,
|
||||
ISC_TRUE) == DNS_R_SUCCESS)
|
||||
ISC_TRUE) == ISC_R_SUCCESS)
|
||||
ra = ISC_TRUE;
|
||||
|
||||
if (ra == ISC_TRUE)
|
||||
|
|
@ -1584,7 +1584,7 @@ ns_client_checkacl(ns_client_t *client,
|
|||
result = dns_acl_match(&netaddr, client->signer, acl,
|
||||
&ns_g_server->aclenv,
|
||||
&match, NULL);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto deny; /* Internal error, already logged. */
|
||||
if (match > 0)
|
||||
goto allow;
|
||||
|
|
@ -1594,7 +1594,7 @@ ns_client_checkacl(ns_client_t *client,
|
|||
ns_client_log(client, DNS_LOGCATEGORY_SECURITY,
|
||||
NS_LOGMODULE_CLIENT, ISC_LOG_DEBUG(3),
|
||||
"%s approved", opname);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
deny:
|
||||
ns_client_log(client, DNS_LOGCATEGORY_SECURITY,
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ ns_interfacemgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
|
|||
|
||||
mgr = isc_mem_get(mctx, sizeof(*mgr));
|
||||
if (mgr == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
result = isc_mutex_init(&mgr->lock);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
|
|
@ -112,7 +112,7 @@ ns_interfacemgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
|
|||
|
||||
result = ns_listenlist_default(mctx, ns_g_port,
|
||||
&mgr->listenon);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_mem;
|
||||
|
||||
result = dns_aclenv_init(mctx, &mgr->aclenv);
|
||||
|
|
@ -122,7 +122,7 @@ ns_interfacemgr_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
|
|||
mgr->references = 1;
|
||||
mgr->magic = IFMGR_MAGIC;
|
||||
*mgrp = mgr;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
cleanup_listenon:
|
||||
ns_listenlist_detach(&mgr->listenon);
|
||||
|
|
@ -206,7 +206,7 @@ ns_interface_create(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr,
|
|||
REQUIRE(NS_INTERFACEMGR_VALID(mgr));
|
||||
ifp = isc_mem_get(mgr->mctx, sizeof(*ifp));
|
||||
if (ifp == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
ifp->mgr = NULL;
|
||||
ifp->generation = mgr->generation;
|
||||
ifp->addr = *addr;
|
||||
|
|
@ -250,7 +250,7 @@ ns_interface_create(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr,
|
|||
ifp->magic = IFACE_MAGIC;
|
||||
*ifpret = ifp;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
task_create_failure:
|
||||
isc_mutex_destroy(&ifp->lock);
|
||||
|
|
@ -258,7 +258,7 @@ ns_interface_create(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr,
|
|||
ifp->magic = 0;
|
||||
isc_mem_put(mgr->mctx, ifp, sizeof(*ifp));
|
||||
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -362,7 +362,7 @@ ns_interface_accepttcp(ns_interface_t *ifp) {
|
|||
tcp_bind_failure:
|
||||
isc_socket_detach(&ifp->tcpsocket);
|
||||
tcp_socket_failure:
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -374,18 +374,18 @@ ns_interface_setup(ns_interfacemgr_t *mgr, isc_sockaddr_t *addr,
|
|||
REQUIRE(ifpret != NULL && *ifpret == NULL);
|
||||
|
||||
result = ns_interface_create(mgr, addr, name, &ifp);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
result = ns_interface_listenudp(ifp);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_interface;
|
||||
|
||||
result = ns_interface_accepttcp(ifp);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
/*
|
||||
* XXXRTH We don't currently have a way to easily stop dispatch
|
||||
* service, so we return currently return DNS_R_SUCCESS (the UDP
|
||||
* service, so we return currently return ISC_R_SUCCESS (the UDP
|
||||
* stuff will work even if TCP creation failed). This will be fixed
|
||||
* later.
|
||||
*/
|
||||
|
|
@ -601,7 +601,7 @@ do_ipv4(ns_interfacemgr_t *mgr) {
|
|||
&listen_sockaddr,
|
||||
interface.name,
|
||||
&ifp);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(IFMGR_COMMON_LOGARGS,
|
||||
ISC_LOG_ERROR,
|
||||
"creating IPv4 interface %s "
|
||||
|
|
@ -647,7 +647,7 @@ do_ipv6(ns_interfacemgr_t *mgr) {
|
|||
"listening on IPv6 interfaces, port %u",
|
||||
ns_g_port);
|
||||
result = ns_interface_setup(mgr, &listen_addr, "<any>", &ifp);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(IFMGR_COMMON_LOGARGS,
|
||||
ISC_LOG_ERROR,
|
||||
"listening on IPv6 interfaces failed");
|
||||
|
|
|
|||
|
|
@ -91,12 +91,12 @@
|
|||
*/
|
||||
#define CHECK(op) \
|
||||
do { result = (op); \
|
||||
if (result != DNS_R_SUCCESS) goto failure; \
|
||||
if (result != ISC_R_SUCCESS) goto failure; \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* Fail unconditionally with result 'code', which must not
|
||||
* be DNS_R_SUCCESS. The reason for failure presumably has
|
||||
* be ISC_R_SUCCESS. The reason for failure presumably has
|
||||
* been logged already.
|
||||
*/
|
||||
|
||||
|
|
@ -166,7 +166,7 @@ ns_notify_start(ns_client_t *client)
|
|||
* Interpret the question section.
|
||||
*/
|
||||
result = dns_message_firstname(request, DNS_SECTION_QUESTION);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
FAILC(DNS_R_FORMERR,
|
||||
"notify question section empty");
|
||||
|
||||
|
|
@ -183,12 +183,12 @@ ns_notify_start(ns_client_t *client)
|
|||
|
||||
/* The zone section must have exactly one name. */
|
||||
result = dns_message_nextname(request, DNS_SECTION_ZONE);
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
FAILC(DNS_R_FORMERR,
|
||||
"notify question section contains multiple RRs");
|
||||
|
||||
result = dns_zt_find(client->view->zonetable, zonename, NULL, &zone);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
FAILC(DNS_R_REFUSED,
|
||||
"not authoritative for notify zone");
|
||||
|
||||
|
|
|
|||
|
|
@ -474,16 +474,16 @@ query_simplefind(void *arg, dns_name_t *name, dns_rdatatype_t type,
|
|||
zone = NULL;
|
||||
db = NULL;
|
||||
result = dns_zt_find(client->view->zonetable, name, NULL, &zone);
|
||||
if (result == DNS_R_SUCCESS || result == DNS_R_PARTIALMATCH) {
|
||||
if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH) {
|
||||
isc_result_t tresult;
|
||||
tresult = dns_zone_getdb(zone, &db);
|
||||
if (tresult != DNS_R_SUCCESS)
|
||||
if (tresult != ISC_R_SUCCESS)
|
||||
result = tresult;
|
||||
}
|
||||
|
||||
if (result == ISC_R_NOTFOUND && USECACHE(client))
|
||||
dns_db_attach(client->view->cachedb, &db);
|
||||
else if (result != DNS_R_SUCCESS && result != DNS_R_PARTIALMATCH)
|
||||
else if (result != ISC_R_SUCCESS && result != DNS_R_PARTIALMATCH)
|
||||
goto cleanup;
|
||||
|
||||
/*
|
||||
|
|
@ -510,7 +510,7 @@ query_simplefind(void *arg, dns_name_t *name, dns_rdatatype_t type,
|
|||
rdataset, sigrdataset);
|
||||
|
||||
if (result == DNS_R_DELEGATION ||
|
||||
result == DNS_R_NOTFOUND) {
|
||||
result == ISC_R_NOTFOUND) {
|
||||
if (rdataset->methods != NULL)
|
||||
dns_rdataset_disassociate(rdataset);
|
||||
if (sigrdataset->methods != NULL)
|
||||
|
|
@ -544,7 +544,7 @@ query_simplefind(void *arg, dns_name_t *name, dns_rdatatype_t type,
|
|||
/*
|
||||
* We don't know the answer.
|
||||
*/
|
||||
result = DNS_R_NOTFOUND;
|
||||
result = ISC_R_NOTFOUND;
|
||||
} else if (result == DNS_R_GLUE) {
|
||||
if (USECACHE(client) && RECURSIONOK(client)) {
|
||||
/*
|
||||
|
|
@ -572,7 +572,7 @@ query_simplefind(void *arg, dns_name_t *name, dns_rdatatype_t type,
|
|||
dns_rdataset_disassociate(rdataset);
|
||||
if (sigrdataset->methods != NULL)
|
||||
dns_rdataset_disassociate(sigrdataset);
|
||||
result = DNS_R_NOTFOUND;
|
||||
result = ISC_R_NOTFOUND;
|
||||
}
|
||||
|
||||
cleanup:
|
||||
|
|
@ -610,7 +610,7 @@ query_isduplicate(ns_client_t *client, dns_name_t *name,
|
|||
*/
|
||||
CTRACE("query_isduplicate: true: done");
|
||||
return (ISC_TRUE);
|
||||
} else if (result == DNS_R_NXRDATASET) {
|
||||
} else if (result == DNS_R_NXRRSET) {
|
||||
/*
|
||||
* The name exists, but the rdataset does not.
|
||||
*/
|
||||
|
|
@ -686,16 +686,16 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
|
|||
* Find a database to answer the query.
|
||||
*/
|
||||
result = dns_zt_find(client->view->zonetable, name, NULL, &zone);
|
||||
if (result == DNS_R_SUCCESS || result == DNS_R_PARTIALMATCH) {
|
||||
if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH) {
|
||||
isc_result_t tresult;
|
||||
tresult = dns_zone_getdb(zone, &db);
|
||||
if (tresult != DNS_R_SUCCESS)
|
||||
if (tresult != ISC_R_SUCCESS)
|
||||
result = tresult;
|
||||
}
|
||||
|
||||
if (result == ISC_R_NOTFOUND && USECACHE(client))
|
||||
dns_db_attach(client->view->cachedb, &db);
|
||||
else if (result != DNS_R_SUCCESS && result != DNS_R_PARTIALMATCH)
|
||||
else if (result != ISC_R_SUCCESS && result != DNS_R_PARTIALMATCH)
|
||||
goto cleanup;
|
||||
|
||||
/*
|
||||
|
|
@ -733,7 +733,7 @@ query_addadditional(void *arg, dns_name_t *name, dns_rdatatype_t qtype) {
|
|||
client->now, &node, fname, rdataset,
|
||||
sigrdataset);
|
||||
|
||||
if (result == DNS_R_DELEGATION || result == DNS_R_NOTFOUND) {
|
||||
if (result == DNS_R_DELEGATION || result == ISC_R_NOTFOUND) {
|
||||
if (is_zone) {
|
||||
if (USECACHE(client)) {
|
||||
/*
|
||||
|
|
@ -1239,7 +1239,7 @@ query_addrrset(ns_client_t *client, dns_name_t **namep,
|
|||
*namep = NULL;
|
||||
mname = name;
|
||||
} else
|
||||
RUNTIME_CHECK(result == DNS_R_NXRDATASET);
|
||||
RUNTIME_CHECK(result == DNS_R_NXRRSET);
|
||||
|
||||
/*
|
||||
* Note: we only add SIGs if we've added the type they cover, so
|
||||
|
|
@ -1478,7 +1478,7 @@ query_addbestns(ns_client_t *client) {
|
|||
*/
|
||||
result = dns_zt_find(client->view->zonetable, client->query.qname,
|
||||
NULL, &zone);
|
||||
if (result == DNS_R_SUCCESS || result == DNS_R_PARTIALMATCH)
|
||||
if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH)
|
||||
result = dns_zone_getdb(zone, &db);
|
||||
if (result == ISC_R_NOTFOUND) {
|
||||
/*
|
||||
|
|
@ -1880,7 +1880,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event) {
|
|||
*/
|
||||
result = dns_zt_find(client->view->zonetable, client->query.qname,
|
||||
NULL, &zone);
|
||||
if (result == DNS_R_SUCCESS || result == DNS_R_PARTIALMATCH)
|
||||
if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH)
|
||||
result = dns_zone_getdb(zone, &db);
|
||||
|
||||
if (result == ISC_R_NOTFOUND) {
|
||||
|
|
@ -1934,7 +1934,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event) {
|
|||
* XXX there should also be a per-view one.
|
||||
*/
|
||||
result = ns_client_checkacl(client, "query", queryacl, ISC_TRUE);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
QUERY_ERROR(result);
|
||||
goto cleanup;
|
||||
}
|
||||
|
|
@ -2018,7 +2018,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event) {
|
|||
resume:
|
||||
CTRACE("query_find: resume");
|
||||
switch (result) {
|
||||
case DNS_R_SUCCESS:
|
||||
case ISC_R_SUCCESS:
|
||||
/*
|
||||
* This case is handled in the main line below.
|
||||
*/
|
||||
|
|
@ -2031,7 +2031,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event) {
|
|||
INSIST(is_zone);
|
||||
authoritative = ISC_FALSE;
|
||||
break;
|
||||
case DNS_R_NOTFOUND:
|
||||
case ISC_R_NOTFOUND:
|
||||
/*
|
||||
* The cache doesn't even have the root NS. Get them from
|
||||
* the hints DB.
|
||||
|
|
@ -2163,7 +2163,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event) {
|
|||
}
|
||||
}
|
||||
goto cleanup;
|
||||
case DNS_R_NXRDATASET:
|
||||
case DNS_R_NXRRSET:
|
||||
INSIST(is_zone);
|
||||
if (dns_rdataset_isassociated(rdataset)) {
|
||||
/*
|
||||
|
|
@ -2474,7 +2474,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event) {
|
|||
* We didn't match any rdatasets.
|
||||
*/
|
||||
if (qtype == dns_rdatatype_sig &&
|
||||
result == DNS_R_NOMORE) {
|
||||
result == ISC_R_NOMORE) {
|
||||
/*
|
||||
* XXXRTH If this is a secure zone and we
|
||||
* didn't find any SIGs, we should generate
|
||||
|
|
@ -2494,7 +2494,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event) {
|
|||
*/
|
||||
result = query_addsoa(client, db);
|
||||
if (result == ISC_R_SUCCESS)
|
||||
result = DNS_R_NOMORE;
|
||||
result = ISC_R_NOMORE;
|
||||
} else {
|
||||
/*
|
||||
* Something went wrong.
|
||||
|
|
@ -2503,7 +2503,7 @@ query_find(ns_client_t *client, dns_fetchevent_t *event) {
|
|||
}
|
||||
}
|
||||
dns_rdatasetiter_destroy(&rdsiter);
|
||||
if (result != DNS_R_NOMORE) {
|
||||
if (result != ISC_R_NOMORE) {
|
||||
QUERY_ERROR(DNS_R_SERVFAIL);
|
||||
goto cleanup;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1417,14 +1417,14 @@ ns_server_reload(isc_task_t *task, isc_event_t *event) {
|
|||
UNUSED(task);
|
||||
|
||||
result = load_configuration(ns_g_conffile, server, ISC_FALSE);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
|
||||
NS_LOGMODULE_SERVER, ISC_LOG_ERROR,
|
||||
"reloading configuration failed: %s",
|
||||
isc_result_totext(result));
|
||||
}
|
||||
result = load_zones(server, ISC_FALSE);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
|
||||
NS_LOGMODULE_SERVER, ISC_LOG_ERROR,
|
||||
"reloading zones failed: %s",
|
||||
|
|
@ -1465,7 +1465,7 @@ ns_listenlist_fromconfig(dns_c_lstnlist_t *clist, dns_c_ctx_t *cctx,
|
|||
{
|
||||
ns_listenelt_t *delt = NULL;
|
||||
result = ns_listenelt_fromconfig(ce, cctx, actx, mctx, &delt);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
ISC_LIST_APPEND(dlist->elts, delt, link);
|
||||
}
|
||||
|
|
@ -1494,7 +1494,7 @@ ns_listenelt_fromconfig(dns_c_lstnon_t *celt, dns_c_ctx_t *cctx,
|
|||
return (result);
|
||||
|
||||
result = dns_acl_fromconfig(celt->iml, cctx, actx, mctx, &delt->acl);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
ns_listenelt_destroy(delt);
|
||||
return (result);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,12 +101,12 @@
|
|||
*/
|
||||
#define CHECK(op) \
|
||||
do { result = (op); \
|
||||
if (result != DNS_R_SUCCESS) goto failure; \
|
||||
if (result != ISC_R_SUCCESS) goto failure; \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* Fail unconditionally with result 'code', which must not
|
||||
* be DNS_R_SUCCESS. The reason for failure presumably has
|
||||
* be ISC_R_SUCCESS. The reason for failure presumably has
|
||||
* been logged already.
|
||||
*/
|
||||
|
||||
|
|
@ -191,7 +191,7 @@ do_one_tuple(dns_difftuple_t **tuple,
|
|||
|
||||
/* Apply it to the database. */
|
||||
result = dns_diff_apply(&temp_diff, db, ver);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
dns_difftuple_free(tuple);
|
||||
return (result);
|
||||
}
|
||||
|
|
@ -201,7 +201,7 @@ do_one_tuple(dns_difftuple_t **tuple,
|
|||
|
||||
/* Do not clear temp_diff. */
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -213,7 +213,7 @@ update_one_rr(dns_db_t *db, dns_dbversion_t *ver, dns_diff_t *diff,
|
|||
isc_result_t result;
|
||||
result = dns_difftuple_create(diff->mctx, op,
|
||||
name, ttl, rdata, &tuple);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
return (do_one_tuple(&tuple, db, ver, diff));
|
||||
}
|
||||
|
|
@ -257,19 +257,19 @@ foreach_node_rr_action(void *data, dns_rdataset_t *rdataset)
|
|||
isc_result_t result;
|
||||
foreach_node_rr_ctx_t *ctx = data;
|
||||
for (result = dns_rdataset_first(rdataset);
|
||||
result == DNS_R_SUCCESS;
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_rdataset_next(rdataset))
|
||||
{
|
||||
rr_t rr;
|
||||
dns_rdataset_current(rdataset, &rr.rdata);
|
||||
rr.ttl = rdataset->ttl;
|
||||
result = (*ctx->rr_action)(ctx->rr_action_data, &rr);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
return (result);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -292,19 +292,19 @@ foreach_rrset(dns_db_t *db,
|
|||
|
||||
node = NULL;
|
||||
result = dns_db_findnode(db, name, ISC_FALSE, &node);
|
||||
if (result == DNS_R_NOTFOUND)
|
||||
return (DNS_R_SUCCESS);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result == ISC_R_NOTFOUND)
|
||||
return (ISC_R_SUCCESS);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
iter = NULL;
|
||||
result = dns_db_allrdatasets(db, node, ver,
|
||||
(isc_stdtime_t) 0, &iter);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_node;
|
||||
|
||||
for (result = dns_rdatasetiter_first(iter);
|
||||
result == DNS_R_SUCCESS;
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_rdatasetiter_next(iter))
|
||||
{
|
||||
dns_rdataset_t rdataset;
|
||||
|
|
@ -315,11 +315,11 @@ foreach_rrset(dns_db_t *db,
|
|||
result = (*action)(action_data, &rdataset);
|
||||
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_iterator;
|
||||
}
|
||||
if (result == DNS_R_NOMORE)
|
||||
result = DNS_R_SUCCESS;
|
||||
if (result == ISC_R_NOMORE)
|
||||
result = ISC_R_SUCCESS;
|
||||
|
||||
cleanup_iterator:
|
||||
dns_rdatasetiter_destroy(&iter);
|
||||
|
|
@ -382,35 +382,35 @@ foreach_rr(dns_db_t *db,
|
|||
|
||||
node = NULL;
|
||||
result = dns_db_findnode(db, name, ISC_FALSE, &node);
|
||||
if (result == DNS_R_NOTFOUND)
|
||||
return (DNS_R_SUCCESS);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result == ISC_R_NOTFOUND)
|
||||
return (ISC_R_SUCCESS);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
dns_rdataset_init(&rdataset);
|
||||
result = dns_db_findrdataset(db, node, ver, type, covers,
|
||||
(isc_stdtime_t) 0, &rdataset, NULL);
|
||||
if (result == DNS_R_NOTFOUND) {
|
||||
result = DNS_R_SUCCESS;
|
||||
if (result == ISC_R_NOTFOUND) {
|
||||
result = ISC_R_SUCCESS;
|
||||
goto cleanup_node;
|
||||
}
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_node;
|
||||
|
||||
for (result = dns_rdataset_first(&rdataset);
|
||||
result == DNS_R_SUCCESS;
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_rdataset_next(&rdataset))
|
||||
{
|
||||
rr_t rr;
|
||||
dns_rdataset_current(&rdataset, &rr.rdata);
|
||||
rr.ttl = rdataset.ttl;
|
||||
result = (*rr_action)(rr_action_data, &rr);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_rdataset;
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
goto cleanup_rdataset;
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
|
||||
cleanup_rdataset:
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
|
|
@ -438,14 +438,14 @@ rrset_exists_action(void *data, rr_t *rr) /*ARGSUSED*/
|
|||
{
|
||||
UNUSED(data);
|
||||
UNUSED(rr);
|
||||
return (DNS_R_EXISTS);
|
||||
return (ISC_R_EXISTS);
|
||||
}
|
||||
|
||||
/*
|
||||
* Utility macro for RR existence checking functions.
|
||||
*
|
||||
* If the variable 'result' has the value DNS_R_EXISTS or
|
||||
* DNS_R_SUCCESS, set *exists to ISC_TRUE or ISC_FALSE,
|
||||
* If the variable 'result' has the value ISC_R_EXISTS or
|
||||
* ISC_R_SUCCESS, set *exists to ISC_TRUE or ISC_FALSE,
|
||||
* respectively, and return success.
|
||||
*
|
||||
* If 'result' has any other value, there was a failure.
|
||||
|
|
@ -455,10 +455,10 @@ rrset_exists_action(void *data, rr_t *rr) /*ARGSUSED*/
|
|||
* but that form generates tons of warnings on Solaris 2.6.
|
||||
*/
|
||||
#define RETURN_EXISTENCE_FLAG \
|
||||
return ((result == DNS_R_EXISTS) ? \
|
||||
(*exists = ISC_TRUE, DNS_R_SUCCESS) : \
|
||||
((result == DNS_R_SUCCESS) ? \
|
||||
(*exists = ISC_FALSE, DNS_R_SUCCESS) : \
|
||||
return ((result == ISC_R_EXISTS) ? \
|
||||
(*exists = ISC_TRUE, ISC_R_SUCCESS) : \
|
||||
((result == ISC_R_SUCCESS) ? \
|
||||
(*exists = ISC_FALSE, ISC_R_SUCCESS) : \
|
||||
result));
|
||||
|
||||
/*
|
||||
|
|
@ -484,8 +484,8 @@ cname_compatibility_action(void *data, dns_rdataset_t *rrset)
|
|||
UNUSED(data);
|
||||
if (rrset->type != dns_rdatatype_cname &&
|
||||
! dns_rdatatype_isdnssec(rrset->type))
|
||||
return (DNS_R_EXISTS);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_EXISTS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -511,7 +511,7 @@ count_rr_action(void *data, rr_t *rr) /*ARGSUSED*/ {
|
|||
int *countp = data;
|
||||
UNUSED(rr);
|
||||
(*countp)++;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -542,8 +542,8 @@ static isc_result_t
|
|||
matching_rr_exists_action(void *data, rr_t *rr) {
|
||||
matching_rr_exists_ctx_t *ctx = data;
|
||||
if ((*ctx->predicate)(ctx->update_rr, &rr->rdata))
|
||||
return (DNS_R_EXISTS);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_EXISTS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -582,7 +582,7 @@ name_exists_action(void *data, dns_rdataset_t *rrset) /*ARGSUSED*/
|
|||
{
|
||||
UNUSED(data);
|
||||
UNUSED(rrset);
|
||||
return (DNS_R_EXISTS);
|
||||
return (ISC_R_EXISTS);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -668,7 +668,7 @@ temp_append(dns_diff_t *diff, dns_name_t *name, dns_rdata_t *rdata)
|
|||
/*
|
||||
* Compare two rdatasets represented as sorted lists of tuples.
|
||||
* All list elements must have the same owner name and type.
|
||||
* Return DNS_R_SUCCESS if the rdatasets are equal, rcode(dns_rcode_nxrrset)
|
||||
* Return ISC_R_SUCCESS if the rdatasets are equal, rcode(dns_rcode_nxrrset)
|
||||
* if not.
|
||||
*/
|
||||
static isc_result_t
|
||||
|
|
@ -686,7 +686,7 @@ temp_check_rrset(dns_difftuple_t *a, dns_difftuple_t *b) {
|
|||
}
|
||||
if (a != NULL || b != NULL)
|
||||
return (DNS_R_NXRRSET);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -716,7 +716,7 @@ temp_order(const void *av, const void *bv)
|
|||
* Check the "RRset exists (value dependent)" prerequisite information
|
||||
* in 'temp' against the contents of the database 'db'.
|
||||
*
|
||||
* Return DNS_R_SUCCESS if the prerequisites are satisfied,
|
||||
* Return ISC_R_SUCCESS if the prerequisites are satisfied,
|
||||
* rcode(dns_rcode_nxrrset) if not.
|
||||
*/
|
||||
|
||||
|
|
@ -732,14 +732,14 @@ temp_check(isc_mem_t *mctx, dns_diff_t *temp, dns_db_t *db,
|
|||
|
||||
/* Exit early if the list is empty (for efficiency only). */
|
||||
if (ISC_LIST_HEAD(temp->tuples) == NULL)
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
/*
|
||||
* Sort the prerequisite records by owner name,
|
||||
* type, and rdata.
|
||||
*/
|
||||
result = dns_diff_sort(temp, temp_order);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
dns_diff_init(mctx, &trash);
|
||||
|
|
@ -756,9 +756,9 @@ temp_check(isc_mem_t *mctx, dns_diff_t *temp, dns_db_t *db,
|
|||
/* A new unique name begins here. */
|
||||
node = NULL;
|
||||
result = dns_db_findnode(db, name, ISC_FALSE, &node);
|
||||
if (result == DNS_R_NOTFOUND)
|
||||
if (result == ISC_R_NOTFOUND)
|
||||
return (DNS_R_NXRRSET);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
/* A new unique type begins here. */
|
||||
|
|
@ -784,7 +784,7 @@ temp_check(isc_mem_t *mctx, dns_diff_t *temp, dns_db_t *db,
|
|||
result = dns_db_findrdataset(db, node, ver, type,
|
||||
covers, (isc_stdtime_t) 0,
|
||||
&rdataset, NULL);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
dns_db_detachnode(db, &node);
|
||||
return (DNS_R_NXRRSET);
|
||||
}
|
||||
|
|
@ -793,19 +793,19 @@ temp_check(isc_mem_t *mctx, dns_diff_t *temp, dns_db_t *db,
|
|||
dns_diff_init(mctx, &u_rrs);
|
||||
|
||||
for (result = dns_rdataset_first(&rdataset);
|
||||
result == DNS_R_SUCCESS;
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_rdataset_next(&rdataset))
|
||||
{
|
||||
dns_rdata_t rdata;
|
||||
dns_rdataset_current(&rdataset, &rdata);
|
||||
result = temp_append(&d_rrs, name, &rdata);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto failure;
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
goto failure;
|
||||
result = dns_diff_sort(&d_rrs, temp_order);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto failure;
|
||||
|
||||
/*
|
||||
|
|
@ -827,7 +827,7 @@ temp_check(isc_mem_t *mctx, dns_diff_t *temp, dns_db_t *db,
|
|||
/* Compare the two sorted lists. */
|
||||
result = temp_check_rrset(ISC_LIST_HEAD(u_rrs.tuples),
|
||||
ISC_LIST_HEAD(d_rrs.tuples));
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto failure;
|
||||
|
||||
/*
|
||||
|
|
@ -854,7 +854,7 @@ temp_check(isc_mem_t *mctx, dns_diff_t *temp, dns_db_t *db,
|
|||
}
|
||||
|
||||
dns_diff_clear(&trash);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
|
|
@ -950,7 +950,7 @@ delete_if_action(void *data, rr_t *rr) {
|
|||
rr->ttl, &rr->rdata);
|
||||
return (result);
|
||||
} else {
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1010,9 +1010,9 @@ get_current_rr(dns_message_t *msg, dns_section_t section,
|
|||
*covers = rdataset->covers;
|
||||
*ttl = rdataset->ttl;
|
||||
result = dns_rdataset_first(rdataset);
|
||||
INSIST(result == DNS_R_SUCCESS);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
dns_rdataset_current(rdataset, rdata);
|
||||
INSIST(dns_rdataset_next(rdataset) == DNS_R_NOMORE);
|
||||
INSIST(dns_rdataset_next(rdataset) == ISC_R_NOMORE);
|
||||
*update_class = rdata->rdclass;
|
||||
rdata->rdclass = zoneclass;
|
||||
}
|
||||
|
|
@ -1052,7 +1052,7 @@ increment_soa_serial(dns_db_t *db, dns_dbversion_t *ver,
|
|||
dns_soa_setserial(serial, &addtuple->rdata);
|
||||
CHECK(do_one_tuple(&addtuple, db, ver, diff));
|
||||
CHECK(do_one_tuple(&deltuple, db, ver, diff));
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
|
||||
failure:
|
||||
if (addtuple != NULL)
|
||||
|
|
@ -1094,7 +1094,7 @@ check_soa_increment(dns_db_t *db, dns_dbversion_t *ver,
|
|||
update_serial = dns_soa_getserial(update_rdata);
|
||||
|
||||
result = dns_db_getsoaserial(db, ver, &db_serial);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
if (DNS_SERIAL_GE(db_serial, update_serial)) {
|
||||
|
|
@ -1103,7 +1103,7 @@ check_soa_increment(dns_db_t *db, dns_dbversion_t *ver,
|
|||
*ok = ISC_TRUE;
|
||||
}
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1144,7 +1144,7 @@ namelist_append_subdomain(dns_db_t *db, dns_name_t *name, dns_diff_t *affected)
|
|||
CHECK(dns_db_createiterator(db, ISC_FALSE, &dbit));
|
||||
|
||||
for (result = dns_dbiterator_seek(dbit, name);
|
||||
result == DNS_R_SUCCESS;
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_dbiterator_next(dbit))
|
||||
{
|
||||
dns_dbnode_t *node = NULL;
|
||||
|
|
@ -1172,8 +1172,8 @@ is_non_nxt_action(void *data, dns_rdataset_t *rrset)
|
|||
if (!(rrset->type == dns_rdatatype_nxt ||
|
||||
(rrset->type == dns_rdatatype_sig &&
|
||||
rrset->covers == dns_rdatatype_nxt)))
|
||||
return (DNS_R_EXISTS);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_EXISTS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1241,16 +1241,16 @@ is_glue(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *name,
|
|||
(isc_stdtime_t) 0, NULL,
|
||||
dns_fixedname_name(&foundname),
|
||||
NULL, NULL);
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
*flag = ISC_FALSE;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
} else if (result == DNS_R_ZONECUT) {
|
||||
/* XXX should omit non-delegation types from NXT */
|
||||
*flag = ISC_FALSE;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
} else if (result == DNS_R_GLUE) {
|
||||
*flag = ISC_TRUE;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
} else {
|
||||
return (result);
|
||||
}
|
||||
|
|
@ -1280,7 +1280,7 @@ next_active(dns_db_t *db, dns_dbversion_t *ver, dns_name_t *oldname,
|
|||
result = dns_dbiterator_next(dbit);
|
||||
else
|
||||
result = dns_dbiterator_prev(dbit);
|
||||
if (result == DNS_R_NOMORE) {
|
||||
if (result == ISC_R_NOMORE) {
|
||||
/* Wrap around. */
|
||||
if (forward)
|
||||
CHECK(dns_dbiterator_first(dbit));
|
||||
|
|
@ -1465,7 +1465,7 @@ update_signatures(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *oldver,
|
|||
|
||||
result = find_zone_keys(db, newver, mctx,
|
||||
MAXZONEKEYS, zone_keys, &nkeys);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_UPDATE,
|
||||
NS_LOGMODULE_UPDATE, ISC_LOG_ERROR,
|
||||
"could not get zone keys for secure "
|
||||
|
|
@ -1738,7 +1738,7 @@ update_signatures(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *oldver,
|
|||
|
||||
static isc_result_t
|
||||
send_update_event(ns_client_t *client, dns_zone_t *zone) {
|
||||
isc_result_t result = DNS_R_SUCCESS;
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
update_event_t *event = NULL;
|
||||
isc_task_t *zonetask = NULL;
|
||||
ns_client_t *evclient;
|
||||
|
|
@ -1747,9 +1747,9 @@ send_update_event(ns_client_t *client, dns_zone_t *zone) {
|
|||
isc_event_allocate(client->mctx, client, DNS_EVENT_UPDATE,
|
||||
update_action, NULL, sizeof(*event));
|
||||
if (event == NULL)
|
||||
FAIL(DNS_R_NOMEMORY);
|
||||
FAIL(ISC_R_NOMEMORY);
|
||||
event->zone = zone;
|
||||
event->result = DNS_R_SUCCESS;
|
||||
event->result = ISC_R_SUCCESS;
|
||||
|
||||
evclient = NULL;
|
||||
ns_client_attach(client, &evclient);
|
||||
|
|
@ -1769,7 +1769,7 @@ respond(ns_client_t *client, isc_result_t result) {
|
|||
isc_result_t msg_result;
|
||||
|
||||
msg_result = dns_message_reply(client->message, ISC_TRUE);
|
||||
if (msg_result != DNS_R_SUCCESS)
|
||||
if (msg_result != ISC_R_SUCCESS)
|
||||
goto msg_failure;
|
||||
client->message->rcode = dns_result_torcode(result);
|
||||
|
||||
|
|
@ -1798,7 +1798,7 @@ ns_update_start(ns_client_t *client)
|
|||
* Interpret the zone section.
|
||||
*/
|
||||
result = dns_message_firstname(request, DNS_SECTION_ZONE);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
FAILC(DNS_R_FORMERR,
|
||||
"update zone section empty");
|
||||
|
||||
|
|
@ -1819,12 +1819,12 @@ ns_update_start(ns_client_t *client)
|
|||
|
||||
/* The zone section must have exactly one name. */
|
||||
result = dns_message_nextname(request, DNS_SECTION_ZONE);
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
FAILC(DNS_R_FORMERR,
|
||||
"update zone section contains multiple RRs");
|
||||
|
||||
result = dns_zt_find(client->view->zonetable, zonename, NULL, &zone);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
FAILC(DNS_R_NOTAUTH,
|
||||
"not authoritative for update zone");
|
||||
|
||||
|
|
@ -1886,7 +1886,7 @@ update_action(isc_task_t *task, isc_event_t *event)
|
|||
/* Check prerequisites. */
|
||||
|
||||
for (result = dns_message_firstname(request, DNS_SECTION_PREREQUISITE);
|
||||
result == DNS_R_SUCCESS;
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_message_nextname(request, DNS_SECTION_PREREQUISITE))
|
||||
{
|
||||
dns_name_t *name = NULL;
|
||||
|
|
@ -1952,17 +1952,17 @@ update_action(isc_task_t *task, isc_event_t *event)
|
|||
} else if (update_class == zoneclass) {
|
||||
/* "temp<rr.name, rr.type> += rr;" */
|
||||
result = temp_append(&temp, name, &rdata);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"temp entry creation failed: %s",
|
||||
dns_result_totext(result));
|
||||
FAIL(DNS_R_UNEXPECTED);
|
||||
FAIL(ISC_R_UNEXPECTED);
|
||||
}
|
||||
} else {
|
||||
FAILC(DNS_R_FORMERR, "malformed prerequisite");
|
||||
}
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
FAIL(result);
|
||||
|
||||
/*
|
||||
|
|
@ -1970,7 +1970,7 @@ update_action(isc_task_t *task, isc_event_t *event)
|
|||
* prerequisites.
|
||||
*/
|
||||
result = temp_check(mctx, &temp, db, ver);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
FAILC(result, "'RRset exists (value dependent)' "
|
||||
"prerequisite not satisfied");
|
||||
|
||||
|
|
@ -1992,7 +1992,7 @@ update_action(isc_task_t *task, isc_event_t *event)
|
|||
/* Perform the Update Section Prescan. */
|
||||
|
||||
for (result = dns_message_firstname(request, DNS_SECTION_UPDATE);
|
||||
result == DNS_R_SUCCESS;
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_message_nextname(request, DNS_SECTION_UPDATE))
|
||||
{
|
||||
dns_name_t *name = NULL;
|
||||
|
|
@ -2060,7 +2060,7 @@ update_action(isc_task_t *task, isc_event_t *event)
|
|||
}
|
||||
}
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
FAIL(result);
|
||||
|
||||
isc_log_write(UPDATE_DEBUG_LOGARGS, "update section prescan OK");
|
||||
|
|
@ -2068,7 +2068,7 @@ update_action(isc_task_t *task, isc_event_t *event)
|
|||
/* Process the Update Section. */
|
||||
|
||||
for (result = dns_message_firstname(request, DNS_SECTION_UPDATE);
|
||||
result == DNS_R_SUCCESS;
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_message_nextname(request, DNS_SECTION_UPDATE))
|
||||
{
|
||||
dns_name_t *name = NULL;
|
||||
|
|
@ -2144,7 +2144,7 @@ update_action(isc_task_t *task, isc_event_t *event)
|
|||
result = update_one_rr(db, ver, &diff,
|
||||
DNS_DIFFOP_ADD,
|
||||
name, ttl, &rdata);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
FAIL(result);
|
||||
} else {
|
||||
isc_log_write(UPDATE_PROTOCOL_LOGARGS,
|
||||
|
|
@ -2211,7 +2211,7 @@ update_action(isc_task_t *task, isc_event_t *event)
|
|||
rdata.type, covers, &rdata, &diff));
|
||||
}
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
FAIL(result);
|
||||
|
||||
/*
|
||||
|
|
@ -2233,7 +2233,7 @@ update_action(isc_task_t *task, isc_event_t *event)
|
|||
if (dns_db_issecure(db)) {
|
||||
result = update_signatures(mctx, db,
|
||||
oldver, ver, &diff);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_UPDATE,
|
||||
NS_LOGMODULE_UPDATE,
|
||||
ISC_LOG_ERROR,
|
||||
|
|
@ -2249,11 +2249,11 @@ update_action(isc_task_t *task, isc_event_t *event)
|
|||
journal = NULL;
|
||||
result = dns_journal_open(mctx, dns_zone_getjournal(zone),
|
||||
ISC_TRUE, &journal);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
FAILS(result, "journal open failed");
|
||||
|
||||
result = dns_journal_write_transaction(journal, &diff);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
dns_journal_destroy(&journal);
|
||||
FAILS(result, "journal write failed");
|
||||
}
|
||||
|
|
@ -2268,7 +2268,7 @@ update_action(isc_task_t *task, isc_event_t *event)
|
|||
*/
|
||||
isc_log_write(UPDATE_DEBUG_LOGARGS, "committing update transaction");
|
||||
dns_db_closeversion(db, &ver, ISC_TRUE);
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
goto common;
|
||||
|
||||
failure:
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: xfrout.c,v 1.52 2000/04/06 20:25:48 gson Exp $ */
|
||||
/* $Id: xfrout.c,v 1.53 2000/04/06 22:01:04 explorer Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
|
||||
#define CHECK(op) \
|
||||
do { result = (op); \
|
||||
if (result != DNS_R_SUCCESS) goto failure; \
|
||||
if (result != ISC_R_SUCCESS) goto failure; \
|
||||
} while (0)
|
||||
|
||||
/**************************************************************************/
|
||||
|
|
@ -137,34 +137,34 @@ db_rr_iterator_init(db_rr_iterator_t *it, dns_db_t *db, dns_dbversion_t *ver,
|
|||
it->now = now;
|
||||
it->node = NULL;
|
||||
result = dns_db_createiterator(it->db, ISC_FALSE, &it->dbit);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
it->rdatasetit = NULL;
|
||||
dns_rdataset_init(&it->rdataset);
|
||||
dns_fixedname_init(&it->fixedname);
|
||||
INSIST(! dns_rdataset_isassociated(&it->rdataset));
|
||||
it->result = DNS_R_SUCCESS;
|
||||
it->result = ISC_R_SUCCESS;
|
||||
return (it->result);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
db_rr_iterator_first(db_rr_iterator_t *it) {
|
||||
it->result = dns_dbiterator_first(it->dbit);
|
||||
if (it->result != DNS_R_SUCCESS)
|
||||
if (it->result != ISC_R_SUCCESS)
|
||||
return (it->result);
|
||||
it->result = dns_dbiterator_current(it->dbit, &it->node,
|
||||
dns_fixedname_name(&it->fixedname));
|
||||
if (it->result != DNS_R_SUCCESS)
|
||||
if (it->result != ISC_R_SUCCESS)
|
||||
return (it->result);
|
||||
|
||||
it->result = dns_db_allrdatasets(it->db, it->node,
|
||||
it->ver, it->now,
|
||||
&it->rdatasetit);
|
||||
if (it->result != DNS_R_SUCCESS)
|
||||
if (it->result != ISC_R_SUCCESS)
|
||||
return (it->result);
|
||||
|
||||
it->result = dns_rdatasetiter_first(it->rdatasetit);
|
||||
if (it->result != DNS_R_SUCCESS)
|
||||
if (it->result != ISC_R_SUCCESS)
|
||||
return (it->result);
|
||||
|
||||
dns_rdatasetiter_current(it->rdatasetit, &it->rdataset);
|
||||
|
|
@ -176,7 +176,7 @@ db_rr_iterator_first(db_rr_iterator_t *it) {
|
|||
|
||||
isc_result_t
|
||||
db_rr_iterator_next(db_rr_iterator_t *it) {
|
||||
if (it->result != DNS_R_SUCCESS)
|
||||
if (it->result != ISC_R_SUCCESS)
|
||||
return (it->result);
|
||||
|
||||
INSIST(it->dbit != NULL);
|
||||
|
|
@ -184,32 +184,32 @@ db_rr_iterator_next(db_rr_iterator_t *it) {
|
|||
INSIST(it->rdatasetit != NULL);
|
||||
|
||||
it->result = dns_rdataset_next(&it->rdataset);
|
||||
if (it->result == DNS_R_NOMORE) {
|
||||
if (it->result == ISC_R_NOMORE) {
|
||||
dns_rdataset_disassociate(&it->rdataset);
|
||||
it->result = dns_rdatasetiter_next(it->rdatasetit);
|
||||
while (it->result == DNS_R_NOMORE) {
|
||||
while (it->result == ISC_R_NOMORE) {
|
||||
dns_rdatasetiter_destroy(&it->rdatasetit);
|
||||
dns_db_detachnode(it->db, &it->node);
|
||||
it->result = dns_dbiterator_next(it->dbit);
|
||||
if (it->result == DNS_R_NOMORE) {
|
||||
if (it->result == ISC_R_NOMORE) {
|
||||
/* We are at the end of the entire database. */
|
||||
return (it->result);
|
||||
}
|
||||
if (it->result != DNS_R_SUCCESS)
|
||||
if (it->result != ISC_R_SUCCESS)
|
||||
return (it->result);
|
||||
it->result = dns_dbiterator_current(it->dbit,
|
||||
&it->node,
|
||||
dns_fixedname_name(&it->fixedname));
|
||||
if (it->result != DNS_R_SUCCESS)
|
||||
if (it->result != ISC_R_SUCCESS)
|
||||
return (it->result);
|
||||
it->result = dns_db_allrdatasets(it->db, it->node,
|
||||
it->ver, it->now,
|
||||
&it->rdatasetit);
|
||||
if (it->result != DNS_R_SUCCESS)
|
||||
if (it->result != ISC_R_SUCCESS)
|
||||
return (it->result);
|
||||
it->result = dns_rdatasetiter_first(it->rdatasetit);
|
||||
}
|
||||
if (it->result != DNS_R_SUCCESS)
|
||||
if (it->result != ISC_R_SUCCESS)
|
||||
return (it->result);
|
||||
dns_rdatasetiter_current(it->rdatasetit, &it->rdataset);
|
||||
}
|
||||
|
|
@ -232,7 +232,7 @@ db_rr_iterator_current(db_rr_iterator_t *it, dns_name_t **name,
|
|||
isc_uint32_t *ttl, dns_rdata_t **rdata)
|
||||
{
|
||||
REQUIRE(name != NULL && *name == NULL);
|
||||
REQUIRE(it->result == DNS_R_SUCCESS);
|
||||
REQUIRE(it->result == ISC_R_SUCCESS);
|
||||
*name = dns_fixedname_name(&it->fixedname);
|
||||
*ttl = it->rdataset.ttl;
|
||||
dns_rdataset_current(&it->rdataset, &it->rdata);
|
||||
|
|
@ -260,7 +260,7 @@ log_rr(dns_name_t *name, dns_rdata_t *rdata, isc_uint32_t ttl) {
|
|||
ISC_LINK_INIT(&rdl, link);
|
||||
dns_rdataset_init(&rds);
|
||||
ISC_LIST_APPEND(rdl.rdata, rdata, link);
|
||||
RUNTIME_CHECK(dns_rdatalist_tordataset(&rdl, &rds) == DNS_R_SUCCESS);
|
||||
RUNTIME_CHECK(dns_rdatalist_tordataset(&rdl, &rds) == ISC_R_SUCCESS);
|
||||
|
||||
isc_buffer_init(&buf, mem, sizeof(mem), ISC_BUFFERTYPE_TEXT);
|
||||
result = dns_rdataset_totext(&rds, name,
|
||||
|
|
@ -274,7 +274,7 @@ log_rr(dns_name_t *name, dns_rdata_t *rdata, isc_uint32_t ttl) {
|
|||
* We could use xfrout_log(), but that would produce
|
||||
* very long lines with a repetitive prefix.
|
||||
*/
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
isc_buffer_used(&buf, &r);
|
||||
isc_log_write(XFROUT_DEBUG_LOGARGS(8),
|
||||
"%.*s", (int) r.length, (char *) r.base);
|
||||
|
|
@ -347,7 +347,7 @@ ixfr_rrstream_create(isc_mem_t *mctx,
|
|||
|
||||
s = isc_mem_get(mctx, sizeof(*s));
|
||||
if (s == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
s->common.mctx = mctx;
|
||||
s->common.methods = &ixfr_rrstream_methods;
|
||||
s->journal = NULL;
|
||||
|
|
@ -357,7 +357,7 @@ ixfr_rrstream_create(isc_mem_t *mctx,
|
|||
CHECK(dns_journal_iter_init(s->journal, begin_serial, end_serial));
|
||||
|
||||
*sp = (rrstream_t *) s;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
failure:
|
||||
ixfr_rrstream_destroy((rrstream_t **) &s);
|
||||
|
|
@ -437,7 +437,7 @@ axfr_rrstream_create(isc_mem_t *mctx,
|
|||
|
||||
s = isc_mem_get(mctx, sizeof(*s));
|
||||
if (s == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
s->common.mctx = mctx;
|
||||
s->common.methods = &axfr_rrstream_methods;
|
||||
s->it_valid = ISC_FALSE;
|
||||
|
|
@ -446,7 +446,7 @@ axfr_rrstream_create(isc_mem_t *mctx,
|
|||
s->it_valid = ISC_TRUE;
|
||||
|
||||
*sp = (rrstream_t *) s;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
failure:
|
||||
axfr_rrstream_destroy((rrstream_t **) &s);
|
||||
|
|
@ -459,7 +459,7 @@ axfr_rrstream_first(rrstream_t *rs)
|
|||
axfr_rrstream_t *s = (axfr_rrstream_t *) rs;
|
||||
isc_result_t result;
|
||||
result = db_rr_iterator_first(&s->it);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
/* Skip SOA records. */
|
||||
for (;;) {
|
||||
|
|
@ -471,7 +471,7 @@ axfr_rrstream_first(rrstream_t *rs)
|
|||
if (rdata->type != dns_rdatatype_soa)
|
||||
break;
|
||||
result = db_rr_iterator_next(&s->it);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
break;
|
||||
}
|
||||
return (result);
|
||||
|
|
@ -489,7 +489,7 @@ axfr_rrstream_next(rrstream_t *rs)
|
|||
isc_uint32_t ttl_dummy;
|
||||
dns_rdata_t *rdata = NULL;
|
||||
result = db_rr_iterator_next(&s->it);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
break;
|
||||
db_rr_iterator_current(&s->it, &name_dummy,
|
||||
&ttl_dummy, &rdata);
|
||||
|
|
@ -552,7 +552,7 @@ soa_rrstream_create(isc_mem_t *mctx,
|
|||
|
||||
s = isc_mem_get(mctx, sizeof(*s));
|
||||
if (s == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
s->common.mctx = mctx;
|
||||
s->common.methods = &soa_rrstream_methods;
|
||||
s->soa_tuple = NULL;
|
||||
|
|
@ -561,7 +561,7 @@ soa_rrstream_create(isc_mem_t *mctx,
|
|||
&s->soa_tuple));
|
||||
|
||||
*sp = (rrstream_t *) s;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
failure:
|
||||
soa_rrstream_destroy((rrstream_t **) &s);
|
||||
|
|
@ -571,13 +571,13 @@ soa_rrstream_create(isc_mem_t *mctx,
|
|||
static isc_result_t
|
||||
soa_rrstream_first(rrstream_t *rs) {
|
||||
UNUSED(rs);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
soa_rrstream_next(rrstream_t *rs) {
|
||||
UNUSED(rs);
|
||||
return (DNS_R_NOMORE);
|
||||
return (ISC_R_NOMORE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -655,7 +655,7 @@ compound_rrstream_create(isc_mem_t *mctx,
|
|||
|
||||
s = isc_mem_get(mctx, sizeof(*s));
|
||||
if (s == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
s->common.mctx = mctx;
|
||||
s->common.methods = &compound_rrstream_methods;
|
||||
s->components[0] = *soa_stream;
|
||||
|
|
@ -667,7 +667,7 @@ compound_rrstream_create(isc_mem_t *mctx,
|
|||
*soa_stream = NULL;
|
||||
*data_stream = NULL;
|
||||
*sp = (rrstream_t *) s;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -677,7 +677,7 @@ compound_rrstream_first(rrstream_t *rs) {
|
|||
do {
|
||||
rrstream_t *curstream = s->components[s->state];
|
||||
s->result = curstream->methods->first(curstream);
|
||||
} while (s->result == DNS_R_NOMORE && s->state < 2) ;
|
||||
} while (s->result == ISC_R_NOMORE && s->state < 2) ;
|
||||
return (s->result);
|
||||
}
|
||||
|
||||
|
|
@ -686,9 +686,9 @@ compound_rrstream_next(rrstream_t *rs) {
|
|||
compound_rrstream_t *s = (compound_rrstream_t *) rs;
|
||||
rrstream_t *curstream = s->components[s->state];
|
||||
s->result = curstream->methods->next(curstream);
|
||||
while (s->result == DNS_R_NOMORE) {
|
||||
while (s->result == ISC_R_NOMORE) {
|
||||
if (s->state == 2)
|
||||
return (DNS_R_NOMORE);
|
||||
return (ISC_R_NOMORE);
|
||||
s->state++;
|
||||
curstream = s->components[s->state];
|
||||
s->result = curstream->methods->first(curstream);
|
||||
|
|
@ -704,7 +704,7 @@ compound_rrstream_current(rrstream_t *rs,
|
|||
compound_rrstream_t *s = (compound_rrstream_t *) rs;
|
||||
rrstream_t *curstream;
|
||||
INSIST(0 <= s->state && s->state < 3);
|
||||
INSIST(s->result == DNS_R_SUCCESS);
|
||||
INSIST(s->result == ISC_R_SUCCESS);
|
||||
curstream = s->components[s->state];
|
||||
curstream->methods->current(curstream, name, ttl, rdata);
|
||||
}
|
||||
|
|
@ -828,7 +828,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype)
|
|||
* Apply quota.
|
||||
*/
|
||||
result = isc_quota_attach(&ns_g_server->xfroutquota, "a);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(XFROUT_COMMON_LOGARGS, ISC_LOG_WARNING,
|
||||
"%s request denied: %s", mnemonic,
|
||||
isc_result_totext(result));
|
||||
|
|
@ -839,7 +839,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype)
|
|||
* Interpret the question section.
|
||||
*/
|
||||
result = dns_message_firstname(request, DNS_SECTION_QUESTION);
|
||||
INSIST(result == DNS_R_SUCCESS);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
|
||||
/*
|
||||
* The question section must contain exactly one question, and
|
||||
|
|
@ -853,11 +853,11 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype)
|
|||
if (ISC_LIST_NEXT(question_rdataset, link) != NULL)
|
||||
FAILC(DNS_R_FORMERR, "multiple questions");
|
||||
result = dns_message_nextname(request, DNS_SECTION_QUESTION);
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
FAILC(DNS_R_FORMERR, "multiple questions");
|
||||
|
||||
result = dns_zt_find(client->view->zonetable, question_name, NULL, &zone);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
FAILC(DNS_R_NOTAUTH, "non-authoritative zone");
|
||||
switch(dns_zone_gettype(zone)) {
|
||||
case dns_zone_master:
|
||||
|
|
@ -877,7 +877,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype)
|
|||
* the same name and class as the question.
|
||||
*/
|
||||
for (result = dns_message_firstname(request, DNS_SECTION_AUTHORITY);
|
||||
result == DNS_R_SUCCESS;
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_message_nextname(request, DNS_SECTION_AUTHORITY))
|
||||
{
|
||||
soa_name = NULL;
|
||||
|
|
@ -901,7 +901,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype)
|
|||
CHECK(dns_rdataset_first(soa_rdataset));
|
||||
dns_rdataset_current(soa_rdataset, &soa_rdata);
|
||||
result = dns_rdataset_next(soa_rdataset);
|
||||
if (result == DNS_R_SUCCESS)
|
||||
if (result == ISC_R_SUCCESS)
|
||||
FAILC(DNS_R_FORMERR,
|
||||
"IXFR authority section "
|
||||
"has multiple SOAs");
|
||||
|
|
@ -910,7 +910,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype)
|
|||
}
|
||||
}
|
||||
got_soa:
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
CHECK(result);
|
||||
|
||||
xfrout_log1(client, question_name, ISC_LOG_DEBUG(6),
|
||||
|
|
@ -1032,7 +1032,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype)
|
|||
sendstream(xfr);
|
||||
xfr = NULL;
|
||||
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
|
||||
failure:
|
||||
if (quota != NULL)
|
||||
|
|
@ -1054,7 +1054,7 @@ ns_xfr_start(ns_client_t *client, dns_rdatatype_t reqtype)
|
|||
/* XXX kludge */
|
||||
if (xfr != NULL) {
|
||||
xfrout_fail(xfr, result, "setting up zone transfer");
|
||||
} else if (result != DNS_R_SUCCESS) {
|
||||
} else if (result != ISC_R_SUCCESS) {
|
||||
ns_client_log(client, DNS_LOGCATEGORY_XFER_OUT, NS_LOGMODULE_XFER_OUT,
|
||||
ISC_LOG_DEBUG(3), "zone transfer setup failed");
|
||||
ns_client_error(client, result);
|
||||
|
|
@ -1080,7 +1080,7 @@ xfrout_ctx_create(isc_mem_t *mctx, ns_client_t *client, unsigned int id,
|
|||
INSIST(xfrp != NULL && *xfrp == NULL);
|
||||
xfr = isc_mem_get(mctx, sizeof(*xfr));
|
||||
if (xfr == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
xfr->mctx = mctx;
|
||||
xfr->client = NULL;
|
||||
ns_client_attach(client, &xfr->client);
|
||||
|
|
@ -1114,7 +1114,7 @@ xfrout_ctx_create(isc_mem_t *mctx, ns_client_t *client, unsigned int id,
|
|||
len = 65535;
|
||||
mem = isc_mem_get(mctx, len);
|
||||
if (mem == NULL) {
|
||||
result = DNS_R_NOMEMORY;
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto failure;
|
||||
}
|
||||
isc_buffer_init(&xfr->buf, mem, len, ISC_BUFFERTYPE_BINARY);
|
||||
|
|
@ -1126,7 +1126,7 @@ xfrout_ctx_create(isc_mem_t *mctx, ns_client_t *client, unsigned int id,
|
|||
len = 2 + 65535;
|
||||
mem = isc_mem_get(mctx, len);
|
||||
if (mem == NULL) {
|
||||
result = DNS_R_NOMEMORY;
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto failure;
|
||||
}
|
||||
isc_buffer_init(&xfr->txlenbuf, mem, 2, ISC_BUFFERTYPE_BINARY);
|
||||
|
|
@ -1153,7 +1153,7 @@ xfrout_ctx_create(isc_mem_t *mctx, ns_client_t *client, unsigned int id,
|
|||
xfr->client->shutdown_arg = xfr;
|
||||
|
||||
*xfrp = xfr;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
failure:
|
||||
xfrout_ctx_destroy(&xfr);
|
||||
|
|
@ -1320,14 +1320,14 @@ sendstream(xfrout_ctx_t *xfr)
|
|||
dns_message_gettemprdataset(msg, &msgrds);
|
||||
dns_rdataset_init(msgrds);
|
||||
result = dns_rdatalist_tordataset(msgrdl, msgrds);
|
||||
INSIST(result == DNS_R_SUCCESS);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
|
||||
ISC_LIST_APPEND(msgname->list, msgrds, link);
|
||||
|
||||
dns_message_addname(msg, msgname, DNS_SECTION_ANSWER);
|
||||
|
||||
result = xfr->stream->methods->next(xfr->stream);
|
||||
if (result == DNS_R_NOMORE) {
|
||||
if (result == ISC_R_NOMORE) {
|
||||
xfr->end_of_stream = ISC_TRUE;
|
||||
break;
|
||||
}
|
||||
|
|
@ -1389,7 +1389,7 @@ sendstream(xfrout_ctx_t *xfr)
|
|||
if (msg != NULL) {
|
||||
dns_message_destroy(&msg);
|
||||
}
|
||||
if (result == DNS_R_SUCCESS)
|
||||
if (result == ISC_R_SUCCESS)
|
||||
return;
|
||||
|
||||
xfrout_fail(xfr, result, "sending zone data");
|
||||
|
|
@ -1449,7 +1449,7 @@ xfrout_senddone(isc_task_t *task, isc_event_t *event) {
|
|||
/* End of zone transfer stream. */
|
||||
xfrout_log(xfr, ISC_LOG_DEBUG(6),
|
||||
"end of transfer");
|
||||
ns_client_next(xfr->client, DNS_R_SUCCESS);
|
||||
ns_client_next(xfr->client, ISC_R_SUCCESS);
|
||||
xfrout_ctx_destroy(&xfr);
|
||||
}
|
||||
}
|
||||
|
|
@ -1505,7 +1505,7 @@ xfrout_logv(ns_client_t *client, dns_name_t *zonename, int level,
|
|||
|
||||
isc_buffer_init(&znbuf, znmem, sizeof(znmem), ISC_BUFFERTYPE_TEXT);
|
||||
result = dns_name_totext(zonename, omit_final_dot, &znbuf);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_buffer_clear(&znbuf);
|
||||
isc_buffer_putmem(&znbuf, (unsigned char *)"<UNKNOWN>",
|
||||
strlen("<UNKNOWN>"));
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ configure_zone_acl(dns_c_zone_t *czone, dns_c_ctx_t *cctx,
|
|||
result = dns_acl_fromconfig(cacl, cctx, aclconfctx,
|
||||
dns_zone_getmctx(zone), &dacl);
|
||||
dns_c_ipmatchlist_detach(&cacl);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
(*setzacl)(zone, dacl);
|
||||
dns_acl_detach(&dacl);
|
||||
|
|
@ -114,7 +114,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_aclconfctx_t *ac,
|
|||
|
||||
/* XXX needs to be an zone option */
|
||||
result = dns_zone_setdbtype(zone, "rbt");
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
switch (czone->ztype) {
|
||||
|
|
@ -125,7 +125,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_aclconfctx_t *ac,
|
|||
return (result);
|
||||
|
||||
result = dns_zone_setdatabase(zone, filename);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
#ifdef notyet
|
||||
result = dns_c_zone_getchecknames(czone, &severity);
|
||||
|
|
@ -139,7 +139,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_aclconfctx_t *ac,
|
|||
NULL,
|
||||
dns_zone_setupdateacl,
|
||||
dns_zone_clearupdateacl);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
result = configure_zone_acl(czone, cctx, ac, zone,
|
||||
|
|
@ -147,7 +147,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_aclconfctx_t *ac,
|
|||
dns_c_ctx_getallowquery,
|
||||
dns_zone_setqueryacl,
|
||||
dns_zone_clearqueryacl);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
result = configure_zone_acl(czone, cctx, ac, zone,
|
||||
|
|
@ -155,7 +155,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_aclconfctx_t *ac,
|
|||
dns_c_ctx_getallowtransfer,
|
||||
dns_zone_setxfracl,
|
||||
dns_zone_clearxfracl);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
result = dns_c_zone_getdialup(czone, &boolean);
|
||||
|
|
@ -175,7 +175,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_aclconfctx_t *ac,
|
|||
for (i = 0; i < iplist->nextidx; i++) {
|
||||
result = dns_zone_addnotify(zone,
|
||||
&iplist->ips[i]);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
} else
|
||||
|
|
@ -184,7 +184,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_aclconfctx_t *ac,
|
|||
result = dns_c_zone_getmaxtranstimeout(czone, &maxxfr);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
result = dns_c_ctx_getmaxtransfertimeout(cctx, &maxxfr);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
maxxfr = MAX_XFER_TIME;
|
||||
}
|
||||
dns_zone_setmaxxfrout(zone, maxxfr);
|
||||
|
|
@ -192,7 +192,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_aclconfctx_t *ac,
|
|||
result = dns_c_zone_getmaxtransidleout(czone, &maxxfr);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
result = dns_c_ctx_getmaxtransferidleout(cctx, &maxxfr);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
maxxfr = DNS_DEFAULT_IDLEOUT;
|
||||
}
|
||||
dns_zone_setidleout(zone, maxxfr);
|
||||
|
|
@ -225,7 +225,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_aclconfctx_t *ac,
|
|||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
result = dns_zone_setdatabase(zone, filename);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
#ifdef notyet
|
||||
result = dns_c_zone_getchecknames(czone, &severity);
|
||||
|
|
@ -239,7 +239,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_aclconfctx_t *ac,
|
|||
dns_c_ctx_getallowquery,
|
||||
dns_zone_setqueryacl,
|
||||
dns_zone_clearqueryacl);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
|
||||
|
|
@ -253,7 +253,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_aclconfctx_t *ac,
|
|||
for (i = 0; i < iplist->nextidx; i++) {
|
||||
result = dns_zone_addmaster(zone,
|
||||
&iplist->ips[i]);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
} else
|
||||
|
|
@ -296,7 +296,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_aclconfctx_t *ac,
|
|||
result = dns_c_zone_getmaxtranstimeout(czone, &maxxfr);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
result = dns_c_ctx_getmaxtransfertimeout(cctx, &maxxfr);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
maxxfr = MAX_XFER_TIME;
|
||||
}
|
||||
dns_zone_setmaxxfrout(zone, maxxfr);
|
||||
|
|
@ -304,7 +304,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_aclconfctx_t *ac,
|
|||
result = dns_c_zone_getmaxtransidleout(czone, &maxxfr);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
result = dns_c_ctx_getmaxtransferidleout(cctx, &maxxfr);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
maxxfr = DNS_DEFAULT_IDLEOUT;
|
||||
}
|
||||
dns_zone_setidleout(zone, maxxfr);
|
||||
|
|
@ -317,7 +317,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_aclconfctx_t *ac,
|
|||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
result = dns_zone_setdatabase(zone, filename);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
#ifdef notyet
|
||||
result = dns_c_zone_getchecknames(czone, &severity);
|
||||
|
|
@ -331,7 +331,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_aclconfctx_t *ac,
|
|||
dns_c_ctx_getallowquery,
|
||||
dns_zone_setqueryacl,
|
||||
dns_zone_clearqueryacl);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
result = dns_c_zone_getmasterport(czone, &port);
|
||||
|
|
@ -344,7 +344,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_aclconfctx_t *ac,
|
|||
for (i = 0; i < iplist->nextidx; i++) {
|
||||
result = dns_zone_addmaster(zone,
|
||||
&iplist->ips[i]);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
} else
|
||||
|
|
@ -390,7 +390,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_aclconfctx_t *ac,
|
|||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
result = dns_zone_setdatabase(zone, filename);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
#ifdef notyet
|
||||
result = dns_c_zone_getchecknames(czone, &severity);
|
||||
|
|
@ -403,7 +403,7 @@ dns_zone_configure(dns_c_ctx_t *cctx, dns_aclconfctx_t *ac,
|
|||
|
||||
}
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_boolean_t
|
||||
|
|
@ -434,7 +434,7 @@ dns_zonemgr_configure(dns_c_ctx_t *cctx, dns_zonemgr_t *zmgr)
|
|||
isc_result_t result;
|
||||
|
||||
result = dns_c_ctx_gettransfersin(cctx, &val);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
val = 10;
|
||||
dns_zonemgr_settransfersin(zmgr, val);
|
||||
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ main(int argc, char *argv[]) {
|
|||
|
||||
RUNTIME_CHECK(dns_view_createresolver(view, taskmgr, 10, socketmgr,
|
||||
timermgr, 0, NULL, NULL) ==
|
||||
DNS_R_SUCCESS);
|
||||
ISC_R_SUCCESS);
|
||||
|
||||
{
|
||||
struct in_addr ina;
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ main(int argc, char *argv[]) {
|
|||
|
||||
RUNTIME_CHECK(dns_view_createresolver(view, taskmgr, 10, socketmgr,
|
||||
timermgr, 0, NULL, NULL) ==
|
||||
DNS_R_SUCCESS);
|
||||
ISC_R_SUCCESS);
|
||||
|
||||
{
|
||||
struct in_addr ina;
|
||||
|
|
|
|||
|
|
@ -135,18 +135,18 @@ test(unsigned int allowed, dns_name_t *name1, dns_name_t *name2,
|
|||
}
|
||||
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
|
||||
isc_buffer_init(&source, buf1, sizeof buf1, ISC_BUFFERTYPE_BINARY);
|
||||
RUNTIME_CHECK(dns_compress_init(&cctx, -1, mctx) == DNS_R_SUCCESS);
|
||||
RUNTIME_CHECK(dns_compress_init(&cctx, -1, mctx) == ISC_R_SUCCESS);
|
||||
|
||||
RUNTIME_CHECK(dns_name_towire(name1, &cctx, &source) == DNS_R_SUCCESS);
|
||||
RUNTIME_CHECK(dns_name_towire(name1, &cctx, &source) == ISC_R_SUCCESS);
|
||||
|
||||
/*
|
||||
RUNTIME_CHECK(dns_compress_localinit(&cctx, name1, &source) ==
|
||||
DNS_R_SUCCESS);
|
||||
ISC_R_SUCCESS);
|
||||
*/
|
||||
dns_compress_setmethods(&cctx, allowed);
|
||||
RUNTIME_CHECK(dns_name_towire(name2, &cctx, &source) == DNS_R_SUCCESS);
|
||||
RUNTIME_CHECK(dns_name_towire(name2, &cctx, &source) == DNS_R_SUCCESS);
|
||||
RUNTIME_CHECK(dns_name_towire(name3, &cctx, &source) == DNS_R_SUCCESS);
|
||||
RUNTIME_CHECK(dns_name_towire(name2, &cctx, &source) == ISC_R_SUCCESS);
|
||||
RUNTIME_CHECK(dns_name_towire(name2, &cctx, &source) == ISC_R_SUCCESS);
|
||||
RUNTIME_CHECK(dns_name_towire(name3, &cctx, &source) == ISC_R_SUCCESS);
|
||||
|
||||
/*
|
||||
dns_compress_localinvalidate(&cctx);
|
||||
|
|
@ -175,17 +175,17 @@ test(unsigned int allowed, dns_name_t *name1, dns_name_t *name2,
|
|||
|
||||
dns_name_init(&name, NULL);
|
||||
RUNTIME_CHECK(dns_name_fromwire(&name, &source, &dctx, ISC_FALSE,
|
||||
&target) == DNS_R_SUCCESS);
|
||||
&target) == ISC_R_SUCCESS);
|
||||
dns_decompress_setmethods(&dctx, allowed);
|
||||
/*
|
||||
dns_decompress_localinit(&dctx, &name, &source);
|
||||
*/
|
||||
RUNTIME_CHECK(dns_name_fromwire(&name, &source, &dctx, ISC_FALSE,
|
||||
&target) == DNS_R_SUCCESS);
|
||||
&target) == ISC_R_SUCCESS);
|
||||
RUNTIME_CHECK(dns_name_fromwire(&name, &source, &dctx, ISC_FALSE,
|
||||
&target) == DNS_R_SUCCESS);
|
||||
&target) == ISC_R_SUCCESS);
|
||||
RUNTIME_CHECK(dns_name_fromwire(&name, &source, &dctx, ISC_FALSE,
|
||||
&target) == DNS_R_SUCCESS);
|
||||
&target) == ISC_R_SUCCESS);
|
||||
/*
|
||||
dns_decompress_localinvalidate(&dctx);
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ t_create(char *db_type, char *origin, char *class, char *cache,
|
|||
isc_buffer_add(&origin_buffer, len);
|
||||
dns_result = dns_name_fromtext(dns_fixedname_name(&dns_origin),
|
||||
&origin_buffer, NULL, ISC_FALSE, NULL);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_fromtext failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
return(dns_result);
|
||||
|
|
@ -81,7 +81,7 @@ t_create(char *db_type, char *origin, char *class, char *cache,
|
|||
textregion.base = class;
|
||||
textregion.length = strlen(class);
|
||||
dns_result = dns_rdataclass_fromtext(&rdataclass, &textregion);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdataclass_fromtext failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
return(dns_result);
|
||||
|
|
@ -89,7 +89,7 @@ t_create(char *db_type, char *origin, char *class, char *cache,
|
|||
|
||||
dns_result = dns_db_create(mctx, db_type, dns_fixedname_name(&dns_origin),
|
||||
iscache, rdataclass, 0, NULL, db);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_create failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
}
|
||||
|
|
@ -155,7 +155,7 @@ t_dns_db_load(char **av) {
|
|||
}
|
||||
|
||||
dns_result = t_create(db_type, origin, class, cache, mctx, &db);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
isc_mem_destroy(&mctx);
|
||||
return(T_UNRESOLVED);
|
||||
}
|
||||
|
|
@ -176,7 +176,7 @@ t_dns_db_load(char **av) {
|
|||
isc_buffer_add(&findname_buffer, len);
|
||||
dns_result = dns_name_fromtext(dns_fixedname_name(&dns_findname),
|
||||
&findname_buffer, NULL, ISC_FALSE, NULL);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_fromtext failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detach(&db);
|
||||
|
|
@ -187,7 +187,7 @@ t_dns_db_load(char **av) {
|
|||
textregion.base = find_type;
|
||||
textregion.length = strlen(find_type);
|
||||
dns_result = dns_rdatatype_fromtext(&rdatatype, &textregion);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdatatype_fromtext %s failed %s\n",
|
||||
find_type,
|
||||
dns_result_totext(dns_result));
|
||||
|
|
@ -223,7 +223,7 @@ t_dns_db_load(char **av) {
|
|||
result = T_PASS;
|
||||
}
|
||||
|
||||
if (dns_result != DNS_R_NOTFOUND) {
|
||||
if (dns_result != ISC_R_NOTFOUND) {
|
||||
dns_db_detachnode(db, &nodep);
|
||||
if (dns_rdataset_isassociated(&rdataset))
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
|
|
@ -285,7 +285,7 @@ t_dns_db_zc_x(char *filename,
|
|||
isc_buffer_add(&origin_buffer, len);
|
||||
dns_result = dns_name_fromtext(dns_fixedname_name(&dns_origin),
|
||||
&origin_buffer, NULL, ISC_FALSE, NULL);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_fromtext failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
return(T_UNRESOLVED);
|
||||
|
|
@ -294,7 +294,7 @@ t_dns_db_zc_x(char *filename,
|
|||
textregion.base = class;
|
||||
textregion.length = strlen(class);
|
||||
dns_result = dns_rdataclass_fromtext(&rdataclass, &textregion);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdataclass_fromtext failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
return(T_UNRESOLVED);
|
||||
|
|
@ -310,7 +310,7 @@ t_dns_db_zc_x(char *filename,
|
|||
dns_result = dns_db_create(mctx, db_type,
|
||||
dns_fixedname_name(&dns_origin),
|
||||
cache, rdataclass, 0, NULL, &db);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_create failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
isc_mem_destroy(&mctx);
|
||||
|
|
@ -318,7 +318,7 @@ t_dns_db_zc_x(char *filename,
|
|||
}
|
||||
|
||||
dns_result = dns_db_load(db, filename);
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
if ((*cf)(db) == exp_result)
|
||||
result = T_PASS;
|
||||
else
|
||||
|
|
@ -496,7 +496,7 @@ t_dns_db_origin(char **av) {
|
|||
}
|
||||
|
||||
dns_result = t_create("rbt", origin, "in", "isc_true", mctx, &db);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("t_create failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
isc_mem_destroy(&mctx);
|
||||
|
|
@ -510,7 +510,7 @@ t_dns_db_origin(char **av) {
|
|||
isc_buffer_add(&origin_buffer, len);
|
||||
|
||||
dns_result = dns_db_load(db, filename);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_load failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detach(&db);
|
||||
|
|
@ -520,7 +520,7 @@ t_dns_db_origin(char **av) {
|
|||
|
||||
dns_result = dns_name_fromtext(dns_fixedname_name(&dns_origin),
|
||||
&origin_buffer, NULL, ISC_FALSE, NULL);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_fromtext failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detach(&db);
|
||||
|
|
@ -590,7 +590,7 @@ t_dns_db_class(char **av) {
|
|||
textregion.base = class;
|
||||
textregion.length = strlen(class);
|
||||
dns_result = dns_rdataclass_fromtext(&rdataclass, &textregion);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdataclass_fromtext failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
return(T_UNRESOLVED);
|
||||
|
|
@ -604,7 +604,7 @@ t_dns_db_class(char **av) {
|
|||
}
|
||||
|
||||
dns_result = t_create("rbt", ".", class, "isc_true", mctx, &db);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("t_create failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
isc_mem_destroy(&mctx);
|
||||
|
|
@ -612,7 +612,7 @@ t_dns_db_class(char **av) {
|
|||
}
|
||||
|
||||
dns_result = dns_db_load(db, filename);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_load failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detach(&db);
|
||||
|
|
@ -700,13 +700,13 @@ t_dns_db_currentversion(char **av) {
|
|||
}
|
||||
|
||||
dns_result = t_create(db_type, origin, class, cache, mctx, &db);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
isc_mem_destroy(&mctx);
|
||||
return(T_UNRESOLVED);
|
||||
}
|
||||
|
||||
dns_result = dns_db_load(db, filename);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_load returned %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detach(&db);
|
||||
|
|
@ -720,7 +720,7 @@ t_dns_db_currentversion(char **av) {
|
|||
isc_buffer_add(&findname_buffer, len);
|
||||
dns_result = dns_name_fromtext(dns_fixedname_name(&dns_findname),
|
||||
&findname_buffer, NULL, ISC_FALSE, NULL);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_fromtext failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detach(&db);
|
||||
|
|
@ -731,7 +731,7 @@ t_dns_db_currentversion(char **av) {
|
|||
textregion.base = findtype;
|
||||
textregion.length = strlen(findtype);
|
||||
dns_result = dns_rdatatype_fromtext(&rdatatype, &textregion);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdatatype_fromtext %s failed %s\n",
|
||||
findtype,
|
||||
dns_result_totext(dns_result));
|
||||
|
|
@ -760,7 +760,7 @@ t_dns_db_currentversion(char **av) {
|
|||
dns_fixedname_name(&dns_foundname),
|
||||
&rdataset, NULL);
|
||||
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("unable to find %s using current version\n", findname);
|
||||
dns_db_closeversion(db, &cversionp, ISC_FALSE);
|
||||
dns_db_detach(&db);
|
||||
|
|
@ -779,7 +779,7 @@ t_dns_db_currentversion(char **av) {
|
|||
|
||||
nversionp = NULL;
|
||||
dns_result = dns_db_newversion(db, &nversionp);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_newversion failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detachnode(db, &nodep);
|
||||
|
|
@ -792,7 +792,7 @@ t_dns_db_currentversion(char **av) {
|
|||
|
||||
/* delete the found rdataset in the new version */
|
||||
dns_result = dns_db_deleterdataset(db, nodep, nversionp, rdatatype, 0);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_deleterdataset failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
|
|
@ -820,7 +820,7 @@ t_dns_db_currentversion(char **av) {
|
|||
dns_fixedname_name(&dns_foundname),
|
||||
&rdataset, NULL);
|
||||
|
||||
if ((dns_result != DNS_R_NOTFOUND) && (dns_result != DNS_R_NXDOMAIN)) {
|
||||
if ((dns_result != ISC_R_NOTFOUND) && (dns_result != DNS_R_NXDOMAIN)) {
|
||||
t_info("unexpectedly found %s using current version\n", findname);
|
||||
dns_db_closeversion(db, &cversionp, ISC_FALSE);
|
||||
dns_db_closeversion(db, &nversionp, ISC_FALSE);
|
||||
|
|
@ -844,7 +844,7 @@ t_dns_db_currentversion(char **av) {
|
|||
&rdataset, NULL);
|
||||
|
||||
/* and expect it to succeed */
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
result = T_PASS;
|
||||
}
|
||||
else {
|
||||
|
|
@ -940,13 +940,13 @@ t_dns_db_newversion(char **av) {
|
|||
}
|
||||
|
||||
dns_result = t_create(db_type, origin, class, cache, mctx, &db);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
isc_mem_destroy(&mctx);
|
||||
return(T_UNRESOLVED);
|
||||
}
|
||||
|
||||
dns_result = dns_db_load(db, filename);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_load returned %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detach(&db);
|
||||
|
|
@ -964,7 +964,7 @@ t_dns_db_newversion(char **av) {
|
|||
isc_buffer_add(&newname_buffer, len);
|
||||
dns_result = dns_name_fromtext(dns_fixedname_name(&dns_newname),
|
||||
&newname_buffer, NULL, ISC_FALSE, NULL);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_fromtext failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detach(&db);
|
||||
|
|
@ -975,7 +975,7 @@ t_dns_db_newversion(char **av) {
|
|||
nodep = NULL;
|
||||
dns_result = dns_db_findnode(db, dns_fixedname_name(&dns_newname),
|
||||
ISC_TRUE, &nodep);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_findnode failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detach(&db);
|
||||
|
|
@ -991,7 +991,7 @@ t_dns_db_newversion(char **av) {
|
|||
textregion.length = strlen(newtype);
|
||||
dns_result = dns_rdatatype_fromtext(&rdatatype, &textregion);
|
||||
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdatatype_fromtext %s failed %s\n",
|
||||
newtype,
|
||||
dns_result_totext(dns_result));
|
||||
|
|
@ -1004,7 +1004,7 @@ t_dns_db_newversion(char **av) {
|
|||
textregion.base = class;
|
||||
textregion.length = strlen(class);
|
||||
dns_result = dns_rdataclass_fromtext(&rdataclass, &textregion);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdataclass_fromtext failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detachnode(db, &nodep);
|
||||
|
|
@ -1028,7 +1028,7 @@ t_dns_db_newversion(char **av) {
|
|||
ISC_LIST_APPEND(rdatalist.rdata, &added_rdata, link);
|
||||
|
||||
dns_result = dns_rdatalist_tordataset(&rdatalist, &added_rdataset);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdatalist_tordataset failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detachnode(db, &nodep);
|
||||
|
|
@ -1039,7 +1039,7 @@ t_dns_db_newversion(char **av) {
|
|||
|
||||
nversionp = NULL;
|
||||
dns_result = dns_db_newversion(db, &nversionp);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_newversion failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detachnode(db, &nodep);
|
||||
|
|
@ -1050,7 +1050,7 @@ t_dns_db_newversion(char **av) {
|
|||
|
||||
dns_result = dns_db_addrdataset(db, nodep, nversionp, 0,
|
||||
&added_rdataset, 0, NULL);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_addrdataset failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_closeversion(db, &nversionp, ISC_FALSE);
|
||||
|
|
@ -1086,7 +1086,7 @@ t_dns_db_newversion(char **av) {
|
|||
&found_rdataset,
|
||||
NULL);
|
||||
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
/* ZZZ - NXRRSET ??? reference counts ??? */
|
||||
t_info("dns_db_find failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
|
|
@ -1100,7 +1100,7 @@ t_dns_db_newversion(char **av) {
|
|||
}
|
||||
|
||||
dns_result = dns_rdataset_first(&found_rdataset);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdataset_first failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detachnode(db, &nodep);
|
||||
|
|
@ -1148,7 +1148,7 @@ static char *a10 =
|
|||
"When versionp points to a read-write version and commit is "
|
||||
"ISC_TRUE, a call to dns_db_closeversion(db, versionp, commit) "
|
||||
"causes all changes made in the version to take effect, "
|
||||
"and returns DNS_R_SUCCESS.";
|
||||
"and returns ISC_R_SUCCESS.";
|
||||
|
||||
static int
|
||||
t_dns_db_closeversion_1(char **av) {
|
||||
|
|
@ -1218,13 +1218,13 @@ t_dns_db_closeversion_1(char **av) {
|
|||
}
|
||||
|
||||
dns_result = t_create(db_type, origin, class, cache, mctx, &db);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
isc_mem_destroy(&mctx);
|
||||
return(T_UNRESOLVED);
|
||||
}
|
||||
|
||||
dns_result = dns_db_load(db, filename);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_load returned %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detach(&db);
|
||||
|
|
@ -1242,7 +1242,7 @@ t_dns_db_closeversion_1(char **av) {
|
|||
isc_buffer_add(&name_buffer, len);
|
||||
dns_result = dns_name_fromtext(dns_fixedname_name(&dns_existingname),
|
||||
&name_buffer, NULL, ISC_FALSE, NULL);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_fromtext failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detach(&db);
|
||||
|
|
@ -1253,7 +1253,7 @@ t_dns_db_closeversion_1(char **av) {
|
|||
textregion.base = existing_type;
|
||||
textregion.length = strlen(existing_type);
|
||||
dns_result = dns_rdatatype_fromtext(&existing_rdatatype, &textregion);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdatatype_fromtext %s failed %s\n",
|
||||
existing_type,
|
||||
dns_result_totext(dns_result));
|
||||
|
|
@ -1266,7 +1266,7 @@ t_dns_db_closeversion_1(char **av) {
|
|||
nodep = NULL;
|
||||
dns_result = dns_db_findnode(db, dns_fixedname_name(&dns_existingname),
|
||||
ISC_FALSE, &nodep);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_findnode %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detach(&db);
|
||||
|
|
@ -1277,7 +1277,7 @@ t_dns_db_closeversion_1(char **av) {
|
|||
/* open a new version */
|
||||
nversionp = NULL;
|
||||
dns_result = dns_db_newversion(db, &nversionp);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_newversion failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detachnode(db, &nodep);
|
||||
|
|
@ -1287,7 +1287,7 @@ t_dns_db_closeversion_1(char **av) {
|
|||
}
|
||||
|
||||
dns_result = dns_db_deleterdataset(db, nodep, nversionp, existing_rdatatype, 0);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_deleterdataset failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_closeversion(db, &nversionp, ISC_FALSE);
|
||||
|
|
@ -1310,7 +1310,7 @@ t_dns_db_closeversion_1(char **av) {
|
|||
isc_buffer_add(&name_buffer, len);
|
||||
dns_result = dns_name_fromtext(dns_fixedname_name(&dns_newname),
|
||||
&name_buffer, NULL, ISC_FALSE, NULL);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_fromtext failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_closeversion(db, &nversionp, ISC_FALSE);
|
||||
|
|
@ -1321,7 +1321,7 @@ t_dns_db_closeversion_1(char **av) {
|
|||
|
||||
dns_result = dns_db_findnode(db, dns_fixedname_name(&dns_newname),
|
||||
ISC_TRUE, &nodep);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_findnode failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_closeversion(db, &nversionp, ISC_FALSE);
|
||||
|
|
@ -1337,7 +1337,7 @@ t_dns_db_closeversion_1(char **av) {
|
|||
textregion.base = new_type;
|
||||
textregion.length = strlen(new_type);
|
||||
dns_result = dns_rdatatype_fromtext(&new_rdatatype, &textregion);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdatatype_fromtext %s failed %s\n",
|
||||
new_type,
|
||||
dns_result_totext(dns_result));
|
||||
|
|
@ -1350,7 +1350,7 @@ t_dns_db_closeversion_1(char **av) {
|
|||
textregion.base = class;
|
||||
textregion.length = strlen(class);
|
||||
dns_result = dns_rdataclass_fromtext(&rdataclass, &textregion);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdataclass_fromtext failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detachnode(db, &nodep);
|
||||
|
|
@ -1374,7 +1374,7 @@ t_dns_db_closeversion_1(char **av) {
|
|||
ISC_LIST_APPEND(rdatalist.rdata, &added_rdata, link);
|
||||
|
||||
dns_result = dns_rdatalist_tordataset(&rdatalist, &added_rdataset);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdatalist_tordataset failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detachnode(db, &nodep);
|
||||
|
|
@ -1385,7 +1385,7 @@ t_dns_db_closeversion_1(char **av) {
|
|||
|
||||
dns_result = dns_db_addrdataset(db, nodep, nversionp, 0,
|
||||
&added_rdataset, 0, NULL);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_addrdataset failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_closeversion(db, &nversionp, ISC_FALSE);
|
||||
|
|
@ -1417,7 +1417,7 @@ t_dns_db_closeversion_1(char **av) {
|
|||
dns_fixedname_name(&dns_foundname),
|
||||
&found_rdataset, NULL);
|
||||
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
/* ZZZ NXRRSET ??? reference counting ??? */
|
||||
t_info("dns_db_find failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
|
|
@ -1431,7 +1431,7 @@ t_dns_db_closeversion_1(char **av) {
|
|||
}
|
||||
|
||||
dns_result = dns_rdataset_first(&found_rdataset);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdataset_first failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detachnode(db, &nodep);
|
||||
|
|
@ -1472,7 +1472,7 @@ t_dns_db_closeversion_1(char **av) {
|
|||
&found_rdataset, NULL);
|
||||
|
||||
|
||||
if ((dns_result != DNS_R_NOTFOUND) && (dns_result != DNS_R_NXDOMAIN)) {
|
||||
if ((dns_result != ISC_R_NOTFOUND) && (dns_result != DNS_R_NXDOMAIN)) {
|
||||
dns_rdataset_disassociate(&found_rdataset);
|
||||
dns_db_detachnode(db, &nodep);
|
||||
t_info("dns_db_find %s returned %s\n", existing_name,
|
||||
|
|
@ -1506,7 +1506,7 @@ static char *a11 =
|
|||
"When versionp points to a read-write version and commit is "
|
||||
"ISC_FALSE, a call to dns_db_closeversion(db, versionp, commit) "
|
||||
"causes all changes made in the version to to be rolled back, "
|
||||
"and returns DNS_R_SUCCESS.";
|
||||
"and returns ISC_R_SUCCESS.";
|
||||
|
||||
static int
|
||||
t_dns_db_closeversion_2(char **av) {
|
||||
|
|
@ -1576,13 +1576,13 @@ t_dns_db_closeversion_2(char **av) {
|
|||
}
|
||||
|
||||
dns_result = t_create(db_type, origin, class, cache, mctx, &db);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
isc_mem_destroy(&mctx);
|
||||
return(T_UNRESOLVED);
|
||||
}
|
||||
|
||||
dns_result = dns_db_load(db, filename);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_load returned %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detach(&db);
|
||||
|
|
@ -1600,7 +1600,7 @@ t_dns_db_closeversion_2(char **av) {
|
|||
isc_buffer_add(&name_buffer, len);
|
||||
dns_result = dns_name_fromtext(dns_fixedname_name(&dns_existingname),
|
||||
&name_buffer, NULL, ISC_FALSE, NULL);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_fromtext failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detach(&db);
|
||||
|
|
@ -1611,7 +1611,7 @@ t_dns_db_closeversion_2(char **av) {
|
|||
textregion.base = existing_type;
|
||||
textregion.length = strlen(existing_type);
|
||||
dns_result = dns_rdatatype_fromtext(&existing_rdatatype, &textregion);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdatatype_fromtext %s failed %s\n",
|
||||
existing_type,
|
||||
dns_result_totext(dns_result));
|
||||
|
|
@ -1624,7 +1624,7 @@ t_dns_db_closeversion_2(char **av) {
|
|||
nodep = NULL;
|
||||
dns_result = dns_db_findnode(db, dns_fixedname_name(&dns_existingname),
|
||||
ISC_FALSE, &nodep);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_findnode %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detach(&db);
|
||||
|
|
@ -1635,7 +1635,7 @@ t_dns_db_closeversion_2(char **av) {
|
|||
/* open a new version */
|
||||
nversionp = NULL;
|
||||
dns_result = dns_db_newversion(db, &nversionp);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_newversion failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detachnode(db, &nodep);
|
||||
|
|
@ -1645,7 +1645,7 @@ t_dns_db_closeversion_2(char **av) {
|
|||
}
|
||||
|
||||
dns_result = dns_db_deleterdataset(db, nodep, nversionp, existing_rdatatype, 0);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_deleterdataset failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_closeversion(db, &nversionp, ISC_FALSE);
|
||||
|
|
@ -1668,7 +1668,7 @@ t_dns_db_closeversion_2(char **av) {
|
|||
isc_buffer_add(&name_buffer, len);
|
||||
dns_result = dns_name_fromtext(dns_fixedname_name(&dns_newname),
|
||||
&name_buffer, NULL, ISC_FALSE, NULL);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_fromtext failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_closeversion(db, &nversionp, ISC_FALSE);
|
||||
|
|
@ -1679,7 +1679,7 @@ t_dns_db_closeversion_2(char **av) {
|
|||
|
||||
dns_result = dns_db_findnode(db, dns_fixedname_name(&dns_newname),
|
||||
ISC_TRUE, &nodep);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_findnode failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_closeversion(db, &nversionp, ISC_FALSE);
|
||||
|
|
@ -1691,7 +1691,7 @@ t_dns_db_closeversion_2(char **av) {
|
|||
textregion.base = new_type;
|
||||
textregion.length = strlen(new_type);
|
||||
dns_result = dns_rdatatype_fromtext(&new_rdatatype, &textregion);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdatatype_fromtext %s failed %s\n",
|
||||
new_type,
|
||||
dns_result_totext(dns_result));
|
||||
|
|
@ -1704,7 +1704,7 @@ t_dns_db_closeversion_2(char **av) {
|
|||
textregion.base = class;
|
||||
textregion.length = strlen(class);
|
||||
dns_result = dns_rdataclass_fromtext(&rdataclass, &textregion);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdataclass_fromtext failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detachnode(db, &nodep);
|
||||
|
|
@ -1728,7 +1728,7 @@ t_dns_db_closeversion_2(char **av) {
|
|||
ISC_LIST_APPEND(rdatalist.rdata, &added_rdata, link);
|
||||
|
||||
dns_result = dns_rdatalist_tordataset(&rdatalist, &added_rdataset);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdatalist_tordataset failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detachnode(db, &nodep);
|
||||
|
|
@ -1739,7 +1739,7 @@ t_dns_db_closeversion_2(char **av) {
|
|||
|
||||
dns_result = dns_db_addrdataset(db, nodep, nversionp, 0,
|
||||
&added_rdataset, 0, NULL);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_addrdataset failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_closeversion(db, &nversionp, ISC_FALSE);
|
||||
|
|
@ -1766,9 +1766,9 @@ t_dns_db_closeversion_2(char **av) {
|
|||
dns_fixedname_name(&dns_foundname),
|
||||
&found_rdataset, NULL);
|
||||
|
||||
if ( (dns_result == DNS_R_NOTFOUND) ||
|
||||
if ( (dns_result == ISC_R_NOTFOUND) ||
|
||||
(dns_result == DNS_R_NXDOMAIN) ||
|
||||
(dns_result == DNS_R_NXRDATASET)) {
|
||||
(dns_result == DNS_R_NXRRSET)) {
|
||||
|
||||
t_info("dns_db_find failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
|
|
@ -1782,7 +1782,7 @@ t_dns_db_closeversion_2(char **av) {
|
|||
}
|
||||
|
||||
dns_result = dns_rdataset_first(&found_rdataset);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdataset_first failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detachnode(db, &nodep);
|
||||
|
|
@ -1823,7 +1823,7 @@ t_dns_db_closeversion_2(char **av) {
|
|||
&found_rdataset, NULL);
|
||||
|
||||
|
||||
if ((dns_result != DNS_R_NOTFOUND) && (dns_result != DNS_R_NXDOMAIN)) {
|
||||
if ((dns_result != ISC_R_NOTFOUND) && (dns_result != DNS_R_NXDOMAIN)) {
|
||||
t_info("dns_db_find %s returned %s\n", existing_name,
|
||||
dns_result_totext(dns_result));
|
||||
if (dns_rdataset_isassociated(&found_rdataset))
|
||||
|
|
@ -1853,7 +1853,7 @@ t_dns_db_closeversion_2(char **av) {
|
|||
dns_fixedname_name(&dns_foundname),
|
||||
&found_rdataset, NULL);
|
||||
|
||||
if ((dns_result != DNS_R_NOTFOUND) && (dns_result != DNS_R_NXDOMAIN)) {
|
||||
if ((dns_result != ISC_R_NOTFOUND) && (dns_result != DNS_R_NXDOMAIN)) {
|
||||
t_info("dns_db_find %s returned %s\n", new_name,
|
||||
dns_result_totext(dns_result));
|
||||
dns_rdataset_disassociate(&found_rdataset);
|
||||
|
|
@ -1881,9 +1881,9 @@ t_dns_db_closeversion_2(char **av) {
|
|||
&found_rdataset, NULL);
|
||||
|
||||
|
||||
if ( (dns_result == DNS_R_NOTFOUND) ||
|
||||
if ( (dns_result == ISC_R_NOTFOUND) ||
|
||||
(dns_result == DNS_R_NXDOMAIN) ||
|
||||
(dns_result == DNS_R_NXRDATASET)) {
|
||||
(dns_result == DNS_R_NXRRSET)) {
|
||||
|
||||
t_info("dns_db_find %s returned %d\n", existing_name,
|
||||
dns_result_totext(dns_result));
|
||||
|
|
@ -1978,7 +1978,7 @@ t_dns_db_expirenode(char **av) {
|
|||
isc_buffer_add(&name_buffer, len);
|
||||
dns_result = dns_name_fromtext(dns_fixedname_name(&dns_existingname),
|
||||
&name_buffer, NULL, ISC_FALSE, NULL);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_fromtext failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
return(T_UNRESOLVED);
|
||||
|
|
@ -1994,13 +1994,13 @@ t_dns_db_expirenode(char **av) {
|
|||
|
||||
db = NULL;
|
||||
dns_result = t_create(db_type, origin, class, "cache", mctx, &db);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
isc_mem_destroy(&mctx);
|
||||
return(T_UNRESOLVED);
|
||||
}
|
||||
|
||||
dns_result = dns_db_load(db, filename);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_load returned %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detach(&db);
|
||||
|
|
@ -2015,7 +2015,7 @@ t_dns_db_expirenode(char **av) {
|
|||
dns_fixedname_name(&dns_existingname),
|
||||
ISC_FALSE,
|
||||
&nodep);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("unable to find %s\n", existing_name);
|
||||
dns_db_detach(&db);
|
||||
isc_mem_destroy(&mctx);
|
||||
|
|
@ -2027,7 +2027,7 @@ t_dns_db_expirenode(char **av) {
|
|||
node_expire_time += now;
|
||||
|
||||
dns_result = dns_db_expirenode(db, nodep, node_expire_time);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_expirenode failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detachnode(db, &nodep);
|
||||
|
|
@ -2063,9 +2063,9 @@ t_dns_db_expirenode(char **av) {
|
|||
result = T_FAIL;
|
||||
}
|
||||
|
||||
if ( (dns_result != DNS_R_NOTFOUND) &&
|
||||
if ( (dns_result != ISC_R_NOTFOUND) &&
|
||||
(dns_result != DNS_R_NXDOMAIN) &&
|
||||
(dns_result != DNS_R_NXRDATASET)) {
|
||||
(dns_result != DNS_R_NXRRSET)) {
|
||||
|
||||
/*
|
||||
* don't need to disassociate the rdataset because
|
||||
|
|
@ -2094,8 +2094,8 @@ t12() {
|
|||
static char *a13 =
|
||||
"If the node name exists, then a call to "
|
||||
"dns_db_findnode(db, name, ISC_FALSE, nodep) initializes nodep "
|
||||
"to point to the node and returns DNS_R_SUCCESS, otherwise "
|
||||
"it returns DNS_R_NOTFOUND.";
|
||||
"to point to the node and returns ISC_R_SUCCESS, otherwise "
|
||||
"it returns ISC_R_NOTFOUND.";
|
||||
|
||||
|
||||
static int
|
||||
|
|
@ -2145,7 +2145,7 @@ t_dns_db_findnode_1(char **av) {
|
|||
textregion.base = find_type;
|
||||
textregion.length = strlen(find_type);
|
||||
dns_result = dns_rdatatype_fromtext(&rdatatype, &textregion);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdatatype_fromtext %s failed %s\n",
|
||||
find_type,
|
||||
dns_result_totext(dns_result));
|
||||
|
|
@ -2160,13 +2160,13 @@ t_dns_db_findnode_1(char **av) {
|
|||
}
|
||||
|
||||
dns_result = t_create(db_type, origin, class, cache, mctx, &db);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
isc_mem_destroy(&mctx);
|
||||
return(T_UNRESOLVED);
|
||||
}
|
||||
|
||||
dns_result = dns_db_load(db, filename);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_load returned %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detach(&db);
|
||||
|
|
@ -2188,7 +2188,7 @@ t_dns_db_findnode_1(char **av) {
|
|||
if (dns_result != exp_result) {
|
||||
t_info("dns_db_findnode failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
if (dns_result == DNS_R_SUCCESS)
|
||||
if (dns_result == ISC_R_SUCCESS)
|
||||
dns_db_detachnode(db, &nodep);
|
||||
dns_db_detach(&db);
|
||||
isc_mem_destroy(&mctx);
|
||||
|
|
@ -2202,7 +2202,7 @@ t_dns_db_findnode_1(char **av) {
|
|||
* and expecting the search to succeed
|
||||
*/
|
||||
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
cversionp = NULL;
|
||||
dns_db_currentversion(db, &cversionp);
|
||||
dns_rdataset_init(&rdataset);
|
||||
|
|
@ -2210,7 +2210,7 @@ t_dns_db_findnode_1(char **av) {
|
|||
dns_result = dns_db_findrdataset(db, nodep, cversionp,
|
||||
rdatatype, 0,
|
||||
0, &rdataset, NULL);
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
result = T_PASS;
|
||||
}
|
||||
|
|
@ -2245,7 +2245,7 @@ static char *a14 =
|
|||
"If the node name does not exist and create is ISC_TRUE, "
|
||||
"then a call to dns_db_findnode(db, name, create, nodep) "
|
||||
"creates the node, initializes nodep to point to the node, "
|
||||
"and returns DNS_R_SUCCESS.";
|
||||
"and returns ISC_R_SUCCESS.";
|
||||
|
||||
static int
|
||||
t_dns_db_findnode_2(char **av) {
|
||||
|
|
@ -2294,13 +2294,13 @@ t_dns_db_findnode_2(char **av) {
|
|||
}
|
||||
|
||||
dns_result = t_create(db_type, origin, class, cache, mctx, &db);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
isc_mem_destroy(&mctx);
|
||||
return(T_UNRESOLVED);
|
||||
}
|
||||
|
||||
dns_result = dns_db_load(db, filename);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_load returned %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detach(&db);
|
||||
|
|
@ -2320,9 +2320,9 @@ t_dns_db_findnode_2(char **av) {
|
|||
|
||||
dns_result = dns_db_findnode(db, dns_fixedname_name(&dns_name),
|
||||
ISC_FALSE, &nodep);
|
||||
if ( (dns_result != DNS_R_NOTFOUND) &&
|
||||
if ( (dns_result != ISC_R_NOTFOUND) &&
|
||||
(dns_result != DNS_R_NXDOMAIN) &&
|
||||
(dns_result != DNS_R_NXRDATASET)) {
|
||||
(dns_result != DNS_R_NXRRSET)) {
|
||||
|
||||
t_info("dns_db_findnode %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
|
|
@ -2335,7 +2335,7 @@ t_dns_db_findnode_2(char **av) {
|
|||
/* add it */
|
||||
dns_result = dns_db_findnode(db, dns_fixedname_name(&dns_name),
|
||||
ISC_TRUE, &nodep);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_findnode %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detach(&db);
|
||||
|
|
@ -2360,7 +2360,7 @@ t_dns_db_findnode_2(char **av) {
|
|||
&newnodep,
|
||||
dns_fixedname_name(&dns_foundname),
|
||||
&rdataset, NULL);
|
||||
if ((dns_result != DNS_R_NOTFOUND) && (dns_result != DNS_R_NXDOMAIN)) {
|
||||
if ((dns_result != ISC_R_NOTFOUND) && (dns_result != DNS_R_NXDOMAIN)) {
|
||||
dns_db_detachnode(db, &newnodep);
|
||||
}
|
||||
|
||||
|
|
@ -2370,10 +2370,10 @@ t_dns_db_findnode_2(char **av) {
|
|||
++nfails;
|
||||
}
|
||||
|
||||
/* then try dns_db_findnode DNS_R_SUCCESS */
|
||||
/* then try dns_db_findnode ISC_R_SUCCESS */
|
||||
dns_result = dns_db_findnode(db, dns_fixedname_name(&dns_name), ISC_FALSE, &newnodep);
|
||||
t_info("dns_db_findnode %s\n", dns_result_totext(dns_result));
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
dns_db_detachnode(db, &newnodep);
|
||||
}
|
||||
else {
|
||||
|
|
@ -2464,13 +2464,13 @@ t_dns_db_find_x(char **av) {
|
|||
}
|
||||
|
||||
dns_result = t_create(dbtype, dborigin, dbclass, dbcache, mctx, &db);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
isc_mem_destroy(&mctx);
|
||||
return(T_UNRESOLVED);
|
||||
}
|
||||
|
||||
dns_result = dns_db_load(db, dbfile);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_db_load returned %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detach(&db);
|
||||
|
|
@ -2486,7 +2486,7 @@ t_dns_db_find_x(char **av) {
|
|||
isc_buffer_add(&findname_buffer, len);
|
||||
dns_result = dns_name_fromtext(dns_fixedname_name(&dns_findname),
|
||||
&findname_buffer, NULL, ISC_FALSE, NULL);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_fromtext failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
dns_db_detach(&db);
|
||||
|
|
@ -2497,7 +2497,7 @@ t_dns_db_find_x(char **av) {
|
|||
textregion.base = findtype;
|
||||
textregion.length = strlen(findtype);
|
||||
dns_result = dns_rdatatype_fromtext(&rdatatype, &textregion);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdatatype_fromtext %s failed %s\n",
|
||||
findtype,
|
||||
dns_result_totext(dns_result));
|
||||
|
|
@ -2544,9 +2544,9 @@ t_dns_db_find_x(char **av) {
|
|||
result = T_PASS;
|
||||
}
|
||||
|
||||
if ((dns_result != DNS_R_NOTFOUND) && (dns_result != DNS_R_NXDOMAIN)) {
|
||||
if ((dns_result != ISC_R_NOTFOUND) && (dns_result != DNS_R_NXDOMAIN)) {
|
||||
|
||||
if ((dns_result != DNS_R_NXRDATASET) && (dns_result != DNS_R_ZONECUT))
|
||||
if ((dns_result != DNS_R_NXRRSET) && (dns_result != DNS_R_ZONECUT))
|
||||
if (dns_rdataset_isassociated(&rdataset))
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
dns_db_detachnode(db, &nodep);
|
||||
|
|
@ -2663,7 +2663,7 @@ t21() {
|
|||
}
|
||||
|
||||
static char *a22 =
|
||||
"A call to dns_db_find() returns DNS_R_NXRDATASET when "
|
||||
"A call to dns_db_find() returns DNS_R_NXRRSET when "
|
||||
"the desired name exists, but the desired type does not.";
|
||||
|
||||
static void
|
||||
|
|
@ -2678,7 +2678,7 @@ t22() {
|
|||
|
||||
static char *a23 =
|
||||
"When db is a cache database, a call to dns_db_find() "
|
||||
"returns DNS_R_NOTFOUND when the desired name does not exist, "
|
||||
"returns ISC_R_NOTFOUND when the desired name does not exist, "
|
||||
"and no delegation could be found.";
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ print_rdataset(dns_name_t *name, dns_rdataset_t *rdataset) {
|
|||
result = dns_rdataset_totext(rdataset, name, ISC_FALSE, ISC_FALSE,
|
||||
&text);
|
||||
isc_buffer_used(&text, &r);
|
||||
if (result == DNS_R_SUCCESS)
|
||||
if (result == ISC_R_SUCCESS)
|
||||
printf("%.*s", (int)r.length, (char *)r.base);
|
||||
else
|
||||
print_result("", result);
|
||||
|
|
@ -113,13 +113,13 @@ print_rdatasets(dns_name_t *name, dns_rdatasetiter_t *rdsiter) {
|
|||
|
||||
dns_rdataset_init(&rdataset);
|
||||
result = dns_rdatasetiter_first(rdsiter);
|
||||
while (result == DNS_R_SUCCESS) {
|
||||
while (result == ISC_R_SUCCESS) {
|
||||
dns_rdatasetiter_current(rdsiter, &rdataset);
|
||||
print_rdataset(name, &rdataset);
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
result = dns_rdatasetiter_next(rdsiter);
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
print_result("", result);
|
||||
}
|
||||
|
||||
|
|
@ -144,7 +144,7 @@ select_db(char *origintext) {
|
|||
origin = dns_fixedname_name(&forigin);
|
||||
result = dns_name_fromtext(origin, &source, dns_rootname, ISC_FALSE,
|
||||
NULL);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
print_result("bad name", result);
|
||||
return (NULL);
|
||||
}
|
||||
|
|
@ -187,7 +187,7 @@ list(dbinfo *dbi, char *seektext) {
|
|||
|
||||
result = dns_db_createiterator(dbi->db, ISC_FALSE,
|
||||
&dbi->dbiterator);
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
if (seektext != NULL) {
|
||||
len = strlen(seektext);
|
||||
isc_buffer_init(&source, seektext, len,
|
||||
|
|
@ -210,18 +210,18 @@ list(dbinfo *dbi, char *seektext) {
|
|||
result = dns_dbiterator_last(dbi->dbiterator);
|
||||
}
|
||||
} else
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
|
||||
node = NULL;
|
||||
rdsiter = NULL;
|
||||
i = 0;
|
||||
while (result == DNS_R_SUCCESS) {
|
||||
while (result == ISC_R_SUCCESS) {
|
||||
result = dns_dbiterator_current(dbi->dbiterator, &node, name);
|
||||
if (result != DNS_R_SUCCESS && result != DNS_R_NEWORIGIN)
|
||||
if (result != ISC_R_SUCCESS && result != DNS_R_NEWORIGIN)
|
||||
break;
|
||||
result = dns_db_allrdatasets(dbi->db, node, dbi->iversion, 0,
|
||||
&rdsiter);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
dns_db_detachnode(dbi->db, &node);
|
||||
break;
|
||||
}
|
||||
|
|
@ -233,14 +233,14 @@ list(dbinfo *dbi, char *seektext) {
|
|||
else
|
||||
result = dns_dbiterator_prev(dbi->dbiterator);
|
||||
i++;
|
||||
if (result == DNS_R_SUCCESS && i == dbi->pause_every) {
|
||||
if (result == ISC_R_SUCCESS && i == dbi->pause_every) {
|
||||
printf("[more...]\n");
|
||||
result = dns_dbiterator_pause(dbi->dbiterator);
|
||||
if (result == DNS_R_SUCCESS)
|
||||
if (result == ISC_R_SUCCESS)
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
print_result("", result);
|
||||
|
||||
dns_dbiterator_destroy(&dbi->dbiterator);
|
||||
|
|
@ -260,7 +260,7 @@ load(char *filename, char *origintext, isc_boolean_t cache) {
|
|||
|
||||
dbi = isc_mem_get(mctx, sizeof *dbi);
|
||||
if (dbi == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
dbi->db = NULL;
|
||||
dbi->version = NULL;
|
||||
|
|
@ -282,19 +282,19 @@ load(char *filename, char *origintext, isc_boolean_t cache) {
|
|||
origin = dns_fixedname_name(&forigin);
|
||||
result = dns_name_fromtext(origin, &source, dns_rootname, ISC_FALSE,
|
||||
NULL);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
result = dns_db_create(mctx, dbtype, origin, cache, dns_rdataclass_in,
|
||||
0, NULL, &dbi->db);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_mem_put(mctx, dbi, sizeof *dbi);
|
||||
return (result);
|
||||
}
|
||||
|
||||
printf("loading %s (%s)\n", filename, origintext);
|
||||
result = dns_db_load(dbi->db, filename);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
dns_db_detach(&dbi->db);
|
||||
isc_mem_put(mctx, dbi, sizeof *dbi);
|
||||
return (result);
|
||||
|
|
@ -306,7 +306,7 @@ load(char *filename, char *origintext, isc_boolean_t cache) {
|
|||
dns_dbtable_adddefault(dbtable, dbi->db);
|
||||
cache_dbi = dbi;
|
||||
} else {
|
||||
if (dns_dbtable_add(dbtable, dbi->db) != DNS_R_SUCCESS) {
|
||||
if (dns_dbtable_add(dbtable, dbi->db) != ISC_R_SUCCESS) {
|
||||
dns_db_detach(&dbi->db);
|
||||
isc_mem_put(mctx, dbi, sizeof *dbi);
|
||||
return (result);
|
||||
|
|
@ -314,7 +314,7 @@ load(char *filename, char *origintext, isc_boolean_t cache) {
|
|||
}
|
||||
ISC_LIST_APPEND(dbs, dbi, link);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -387,7 +387,7 @@ main(int argc, char *argv[]) {
|
|||
|
||||
RUNTIME_CHECK(isc_mem_create(0, 0, &mctx) == ISC_R_SUCCESS);
|
||||
RUNTIME_CHECK(dns_dbtable_create(mctx, dns_rdataclass_in, &dbtable) ==
|
||||
DNS_R_SUCCESS);
|
||||
ISC_R_SUCCESS);
|
||||
|
||||
strcpy(dbtype, "rbt");
|
||||
while ((ch = isc_commandline_parse(argc, argv, "c:d:t:z:P:Q:gpqvT"))
|
||||
|
|
@ -395,7 +395,7 @@ main(int argc, char *argv[]) {
|
|||
switch (ch) {
|
||||
case 'c':
|
||||
result = load(isc_commandline_argument, ".", ISC_TRUE);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
printf("cache load(%s) %08x: %s\n",
|
||||
isc_commandline_argument, result,
|
||||
isc_result_totext(result));
|
||||
|
|
@ -437,7 +437,7 @@ main(int argc, char *argv[]) {
|
|||
origintext++; /* Skip '/'. */
|
||||
result = load(isc_commandline_argument, origintext,
|
||||
ISC_FALSE);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
printf("zone load(%s) %08x: %s\n",
|
||||
isc_commandline_argument, result,
|
||||
isc_result_totext(result));
|
||||
|
|
@ -507,7 +507,7 @@ main(int argc, char *argv[]) {
|
|||
continue;
|
||||
}
|
||||
result = dns_db_newversion(dbi->db, &dbi->wversion);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
print_result("", result);
|
||||
else
|
||||
printf("newversion\n");
|
||||
|
|
@ -661,7 +661,7 @@ main(int argc, char *argv[]) {
|
|||
} else if (strstr(s, "!DU ") == s) {
|
||||
DBI_CHECK(dbi);
|
||||
result = dns_db_dump(dbi->db, dbi->version, s+4);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
printf("\n");
|
||||
print_result("", result);
|
||||
}
|
||||
|
|
@ -717,7 +717,7 @@ main(int argc, char *argv[]) {
|
|||
isc_buffer_init(&target, b, sizeof b, ISC_BUFFERTYPE_BINARY);
|
||||
result = dns_name_fromtext(&name, &source, origin,
|
||||
ISC_FALSE, &target);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
print_result("bad name: ", result);
|
||||
continue;
|
||||
}
|
||||
|
|
@ -725,7 +725,7 @@ main(int argc, char *argv[]) {
|
|||
if (dbi == NULL) {
|
||||
db = NULL;
|
||||
result = dns_dbtable_find(dbtable, &name, &db);
|
||||
if (result != DNS_R_SUCCESS &&
|
||||
if (result != ISC_R_SUCCESS &&
|
||||
result != DNS_R_PARTIALMATCH) {
|
||||
if (!quiet) {
|
||||
printf("\n");
|
||||
|
|
@ -737,7 +737,7 @@ main(int argc, char *argv[]) {
|
|||
ISC_BUFFERTYPE_TEXT);
|
||||
result = dns_name_totext(dns_db_origin(db), ISC_FALSE,
|
||||
&tb1);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
printf("\n");
|
||||
print_result("", result);
|
||||
dns_db_detach(&db);
|
||||
|
|
@ -761,7 +761,7 @@ main(int argc, char *argv[]) {
|
|||
|
||||
found_as = ISC_FALSE;
|
||||
switch (result) {
|
||||
case DNS_R_SUCCESS:
|
||||
case ISC_R_SUCCESS:
|
||||
case DNS_R_GLUE:
|
||||
case DNS_R_CNAME:
|
||||
case DNS_R_ZONECUT:
|
||||
|
|
@ -770,7 +770,7 @@ main(int argc, char *argv[]) {
|
|||
case DNS_R_DELEGATION:
|
||||
found_as = ISC_TRUE;
|
||||
break;
|
||||
case DNS_R_NXRDATASET:
|
||||
case DNS_R_NXRRSET:
|
||||
if (dns_rdataset_isassociated(&rdataset))
|
||||
break;
|
||||
if (dbi != NULL) {
|
||||
|
|
@ -804,7 +804,7 @@ main(int argc, char *argv[]) {
|
|||
isc_buffer_init(&tb2, t2, sizeof t2,
|
||||
ISC_BUFFERTYPE_TEXT);
|
||||
result = dns_name_totext(&name, ISC_FALSE, &tb1);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
print_result("", result);
|
||||
dns_db_detachnode(db, &node);
|
||||
if (dbi == NULL)
|
||||
|
|
@ -812,7 +812,7 @@ main(int argc, char *argv[]) {
|
|||
continue;
|
||||
}
|
||||
result = dns_name_totext(fname, ISC_FALSE, &tb2);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
print_result("", result);
|
||||
dns_db_detachnode(db, &node);
|
||||
if (dbi == NULL)
|
||||
|
|
@ -833,7 +833,7 @@ main(int argc, char *argv[]) {
|
|||
rdsiter = NULL;
|
||||
result = dns_db_allrdatasets(db, node, version, 0,
|
||||
&rdsiter);
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
if (!quiet)
|
||||
print_rdatasets(fname, rdsiter);
|
||||
dns_rdatasetiter_destroy(&rdsiter);
|
||||
|
|
@ -857,7 +857,7 @@ main(int argc, char *argv[]) {
|
|||
result = dns_db_addrdataset(db, node, version,
|
||||
0, &rdataset,
|
||||
addopts, NULL);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
print_result("", result);
|
||||
if (printnode)
|
||||
dns_db_printnode(db, node, stdout);
|
||||
|
|
@ -865,7 +865,7 @@ main(int argc, char *argv[]) {
|
|||
result = dns_db_deleterdataset(db, node,
|
||||
version, type,
|
||||
0);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
print_result("", result);
|
||||
if (printnode)
|
||||
dns_db_printnode(db, node, stdout);
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ hex_dump(isc_buffer_t *b)
|
|||
static inline void
|
||||
CHECKRESULT(isc_result_t result, char *msg)
|
||||
{
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
printf("%s: %s\n", msg, isc_result_totext(result));
|
||||
|
||||
exit(1);
|
||||
|
|
@ -291,7 +291,7 @@ got_request(isc_task_t *task, isc_event_t *ev_in)
|
|||
printf("App: Got request. Result: %s\n",
|
||||
isc_result_totext(ev->result));
|
||||
|
||||
if (ev->result != DNS_R_SUCCESS) {
|
||||
if (ev->result != ISC_R_SUCCESS) {
|
||||
printf("Got error, terminating application\n");
|
||||
dns_dispatch_removerequest(disp, &resp, &ev);
|
||||
dns_dispatch_detach(&disp);
|
||||
|
|
@ -331,7 +331,7 @@ got_request(isc_task_t *task, isc_event_t *ev_in)
|
|||
printf("--- adding request\n");
|
||||
RUNTIME_CHECK(dns_dispatch_addrequest(disp, task, got_request,
|
||||
NULL, &resp)
|
||||
== DNS_R_SUCCESS);
|
||||
== ISC_R_SUCCESS);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ hex_dump(isc_buffer_t *b)
|
|||
static inline void
|
||||
CHECKRESULT(isc_result_t result, char *msg)
|
||||
{
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
printf("%s: %s\n", msg, isc_result_totext(result));
|
||||
|
||||
exit(1);
|
||||
|
|
@ -294,7 +294,7 @@ got_request(isc_task_t *task, isc_event_t *ev_in)
|
|||
printf("App: Got request. Result: %s\n",
|
||||
isc_result_totext(ev->result));
|
||||
|
||||
if (ev->result != DNS_R_SUCCESS) {
|
||||
if (ev->result != ISC_R_SUCCESS) {
|
||||
RUNTIME_CHECK(isc_mutex_lock(&client_lock) == ISC_R_SUCCESS);
|
||||
printf("Got error, terminating CLIENT %p resp %p\n",
|
||||
cli, cli->resp);
|
||||
|
|
@ -341,7 +341,7 @@ got_request(isc_task_t *task, isc_event_t *ev_in)
|
|||
printf("--- adding request\n");
|
||||
RUNTIME_CHECK(dns_dispatch_addrequest(disp, task, got_request,
|
||||
cli, &cli->resp)
|
||||
== DNS_R_SUCCESS);
|
||||
== ISC_R_SUCCESS);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ t1_add_callback(void *arg, dns_name_t *owner, dns_rdataset_t *dataset) {
|
|||
isc_buffer_init(&target, buf, BIGBUFLEN, ISC_BUFFERTYPE_TEXT);
|
||||
result = dns_rdataset_totext(dataset, owner, ISC_FALSE, ISC_FALSE,
|
||||
&target);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
t_info("dns_rdataset_totext: %s\n", dns_result_totext(result));
|
||||
|
||||
return(result);
|
||||
|
|
@ -99,7 +99,7 @@ test_master(char *testfile, char *origin, char *class,
|
|||
dns_name_init(&dns_origin, NULL);
|
||||
dns_result = dns_name_fromtext(&dns_origin, &source, dns_rootname,
|
||||
ISC_FALSE, &target);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_fromtext failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
return(T_UNRESOLVED);
|
||||
|
|
@ -112,7 +112,7 @@ test_master(char *testfile, char *origin, char *class,
|
|||
textregion.length = strlen(class);
|
||||
|
||||
dns_result = dns_rdataclass_fromtext(&rdataclass, &textregion);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rdataclass_fromtext failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
return(T_UNRESOLVED);
|
||||
|
|
@ -186,7 +186,7 @@ test_master_x(char *filename) {
|
|||
}
|
||||
|
||||
static char *a1 = "dns_master_loadfile loads a valid master file and "
|
||||
"returns DNS_R_SUCCESS";
|
||||
"returns ISC_R_SUCCESS";
|
||||
static void
|
||||
t1() {
|
||||
int result;
|
||||
|
|
@ -195,7 +195,7 @@ t1() {
|
|||
t_result(result);
|
||||
}
|
||||
|
||||
static char *a2 = "dns_master_loadfile returns DNS_R_UNEXPECTEDEND when the "
|
||||
static char *a2 = "dns_master_loadfile returns ISC_R_UNEXPECTEDEND when the "
|
||||
"masterfile input ends unexpectedly";
|
||||
static void
|
||||
t2() {
|
||||
|
|
@ -267,8 +267,8 @@ t7() {
|
|||
}
|
||||
|
||||
testspec_t T_testlist[] = {
|
||||
{ t1, "DNS_R_SUCCESS" },
|
||||
{ t2, "DNS_R_UNEXPECTEDEND" },
|
||||
{ t1, "ISC_R_SUCCESS" },
|
||||
{ t2, "ISC_R_UNEXPECTEDEND" },
|
||||
{ t3, "DNS_NOOWNER" },
|
||||
{ t4, "DNS_NOTTL" },
|
||||
{ t5, "DNS_BADCLASS" },
|
||||
|
|
|
|||
|
|
@ -47,14 +47,14 @@ print_dataset(void *arg, dns_name_t *owner, dns_rdataset_t *dataset) {
|
|||
isc_buffer_init(&target, buf, 64*1024, ISC_BUFFERTYPE_TEXT);
|
||||
result = dns_rdataset_totext(dataset, owner, ISC_FALSE, ISC_FALSE,
|
||||
&target);
|
||||
if (result == DNS_R_SUCCESS)
|
||||
if (result == ISC_R_SUCCESS)
|
||||
fprintf(stdout, "%.*s\n", (int)target.used,
|
||||
(char*)target.base);
|
||||
else
|
||||
fprintf(stdout, "dns_rdataset_totext: %s\n",
|
||||
dns_result_totext(result));
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
@ -81,7 +81,7 @@ main(int argc, char *argv[]) {
|
|||
dns_name_init(&origin, NULL);
|
||||
result = dns_name_fromtext(&origin, &source, dns_rootname,
|
||||
ISC_FALSE, &target);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stdout, "dns_name_fromtext: %s\n",
|
||||
dns_result_totext(result));
|
||||
exit(1);
|
||||
|
|
@ -96,7 +96,7 @@ main(int argc, char *argv[]) {
|
|||
&callbacks, mctx);
|
||||
fprintf(stdout, "dns_master_loadfile: %s\n",
|
||||
dns_result_totext(result));
|
||||
if (result == DNS_R_SUCCESS)
|
||||
if (result == ISC_R_SUCCESS)
|
||||
fprintf(stdout, "soacount = %d, nscount = %d\n",
|
||||
soacount, nscount);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,8 +58,8 @@ print_name(dns_name_t *name) {
|
|||
if (dns_name_countlabels(name) > 0)
|
||||
result = dns_name_totext(name, ISC_FALSE, &source);
|
||||
else
|
||||
result = DNS_R_SUCCESS;
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
result = ISC_R_SUCCESS;
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
isc_buffer_used(&source, &r);
|
||||
if (r.length > 0)
|
||||
printf("%.*s\n", (int)r.length, r.base);
|
||||
|
|
@ -189,10 +189,10 @@ main(int argc, char *argv[]) {
|
|||
dns_fixedname_init(&wname);
|
||||
else
|
||||
dns_fixedname_init(&wname2);
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
printf("%s\n", dns_result_totext(result));
|
||||
if (name == dns_fixedname_name(&wname))
|
||||
dns_fixedname_init(&wname);
|
||||
|
|
@ -228,7 +228,7 @@ main(int argc, char *argv[]) {
|
|||
&wname2.name,
|
||||
NULL);
|
||||
name = &wname2.name;
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
if (check_absolute &&
|
||||
dns_name_countlabels(name) > 0) {
|
||||
if (dns_name_isabsolute(name))
|
||||
|
|
@ -263,8 +263,8 @@ main(int argc, char *argv[]) {
|
|||
if (dns_name_countlabels(name) > 0)
|
||||
result = dns_name_totext(name, ISC_FALSE, &source);
|
||||
else
|
||||
result = DNS_R_SUCCESS;
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
result = ISC_R_SUCCESS;
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
isc_buffer_used(&source, &r);
|
||||
if (r.length > 0)
|
||||
printf("%.*s\n", (int)r.length, r.base);
|
||||
|
|
|
|||
|
|
@ -372,7 +372,7 @@ dname_from_tname(char *name, dns_name_t *dns_name)
|
|||
NULL, ISC_FALSE, NULL);
|
||||
}
|
||||
else {
|
||||
result = DNS_R_NOSPACE;
|
||||
result = ISC_R_NOSPACE;
|
||||
if (junk != NULL)
|
||||
(void) free(junk);
|
||||
if (binbuf != NULL)
|
||||
|
|
@ -394,7 +394,7 @@ test_dns_label_countbits(char *test_name, int pos, int expected_bits) {
|
|||
t_info("testing name %s, label %d\n", test_name, pos);
|
||||
|
||||
result = dname_from_tname(test_name, &dns_name);
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
dns_name_getlabel(&dns_name, pos, &label);
|
||||
bits = dns_label_countbits(&label);
|
||||
if (bits == expected_bits)
|
||||
|
|
@ -477,7 +477,7 @@ test_dns_label_getbit(char *test_name, int label_pos, int bit_pos,
|
|||
test_name, label_pos, bit_pos);
|
||||
|
||||
result = dname_from_tname(test_name, &dns_name);
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
dns_name_getlabel(&dns_name, label_pos, &label);
|
||||
bitval = dns_label_getbit(&label, bit_pos);
|
||||
if (bitval == expected_bitval)
|
||||
|
|
@ -724,7 +724,7 @@ test_dns_name_isabsolute(char *test_name, isc_boolean_t expected) {
|
|||
dns_name_init(&name, NULL);
|
||||
dns_name_setbuffer(&name, &binbuf);
|
||||
result = dns_name_fromtext(&name, &buf, NULL, ISC_FALSE, NULL);
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
isabs_p = dns_name_isabsolute(&name);
|
||||
if (isabs_p == expected)
|
||||
rval = T_PASS;
|
||||
|
|
@ -809,9 +809,9 @@ test_dns_name_hash(char *test_name1, char *test_name2,
|
|||
t_info("testing names %s and %s\n", test_name1, test_name2);
|
||||
|
||||
result = dname_from_tname(test_name1, &dns_name1);
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
result = dname_from_tname(test_name2, &dns_name2);
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
hash1 = dns_name_hash(&dns_name1, ISC_TRUE);
|
||||
hash2 = dns_name_hash(&dns_name2, ISC_TRUE);
|
||||
match = ISC_FALSE;
|
||||
|
|
@ -953,9 +953,9 @@ test_dns_name_fullcompare(char *name1, char *name2, dns_namereln_t exp_dns_reln,
|
|||
dns_namereln_to_text(exp_dns_reln));
|
||||
|
||||
dns_result = dname_from_tname(name1, &dns_name1);
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
dns_result = dname_from_tname(name2, &dns_name2);
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
dns_reln = dns_name_fullcompare(&dns_name1, &dns_name2,
|
||||
&order, &nlabels, &nbits);
|
||||
|
||||
|
|
@ -1088,9 +1088,9 @@ test_dns_name_compare(char *name1, char *name2, int exp_order) {
|
|||
name2);
|
||||
|
||||
dns_result = dname_from_tname(name1, &dns_name1);
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
dns_result = dname_from_tname(name2, &dns_name2);
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
order = dns_name_compare(&dns_name1, &dns_name2);
|
||||
|
||||
if (order != exp_order) {
|
||||
|
|
@ -1186,9 +1186,9 @@ test_dns_name_rdatacompare(char *name1, char *name2, int exp_order) {
|
|||
name2);
|
||||
|
||||
dns_result = dname_from_tname(name1, &dns_name1);
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
dns_result = dname_from_tname(name2, &dns_name2);
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
order = dns_name_rdatacompare(&dns_name1, &dns_name2);
|
||||
|
||||
if (order != exp_order) {
|
||||
|
|
@ -1285,9 +1285,9 @@ test_dns_name_issubdomain(char *name1, char *name2, isc_boolean_t exp_rval) {
|
|||
name2);
|
||||
|
||||
dns_result = dname_from_tname(name1, &dns_name1);
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
dns_result = dname_from_tname(name2, &dns_name2);
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
rval = dns_name_issubdomain(&dns_name1, &dns_name2);
|
||||
|
||||
if (rval != exp_rval) {
|
||||
|
|
@ -1377,7 +1377,7 @@ test_dns_name_countlabels(char *test_name, unsigned int exp_nlabels) {
|
|||
t_info("testing %s\n", test_name);
|
||||
|
||||
dns_result = dname_from_tname(test_name, &dns_name);
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
nlabels = dns_name_countlabels(&dns_name);
|
||||
|
||||
if (nlabels != exp_nlabels) {
|
||||
|
|
@ -1473,9 +1473,9 @@ test_dns_name_getlabel(char *test_name1, int label1_pos,
|
|||
t_info("testing with %s and %s\n", test_name1, test_name2);
|
||||
|
||||
dns_result = dname_from_tname(test_name1, &dns_name1);
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
dns_result = dname_from_tname(test_name2, &dns_name2);
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
dns_name_getlabel(&dns_name1, label1_pos, &dns_label1);
|
||||
dns_name_getlabel(&dns_name2, label2_pos, &dns_label2);
|
||||
if (dns_label1.length != dns_label2.length) {
|
||||
|
|
@ -1588,9 +1588,9 @@ test_dns_name_getlabelsequence(char *test_name1, int label1_start,
|
|||
nfails = 0;
|
||||
result = T_UNRESOLVED;
|
||||
dns_result = dname_from_tname(test_name1, &dns_name1);
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
dns_result = dname_from_tname(test_name2, &dns_name2);
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
t_info("testing %s %s\n", test_name1, test_name2);
|
||||
dns_name_init(&dns_targetname1, NULL);
|
||||
dns_name_init(&dns_targetname2, NULL);
|
||||
|
|
@ -1708,7 +1708,7 @@ test_dns_name_fromregion(char *test_name) {
|
|||
t_info("testing %s\n", test_name);
|
||||
|
||||
dns_result = dname_from_tname(test_name, &dns_name1);
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
|
||||
dns_name_toregion(&dns_name1, ®ion);
|
||||
|
||||
|
|
@ -1880,7 +1880,7 @@ test_dns_name_fromtext(char *test_name1, char *test_name2,
|
|||
|
||||
dns_result = dns_name_fromtext(&dns_name3, &txtbuf3, NULL,
|
||||
ISC_FALSE, &binbuf3);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_fromtext(dns_name3) failed, result == %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
return(T_FAIL);
|
||||
|
|
@ -1888,7 +1888,7 @@ test_dns_name_fromtext(char *test_name1, char *test_name2,
|
|||
|
||||
dns_result = dns_name_fromtext(&dns_name1, &txtbuf1, &dns_name3,
|
||||
downcase, &binbuf1);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_fromtext(dns_name1) failed, result == %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
return(T_FAIL);
|
||||
|
|
@ -1896,7 +1896,7 @@ test_dns_name_fromtext(char *test_name1, char *test_name2,
|
|||
|
||||
dns_result = dns_name_fromtext(&dns_name2, &txtbuf2, NULL,
|
||||
ISC_FALSE, &binbuf2);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_fromtext(dns_name2) failed, result == %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
return(T_FAIL);
|
||||
|
|
@ -2003,7 +2003,7 @@ test_dns_name_totext(char *test_name, isc_boolean_t omit_final) {
|
|||
/* out of the data file to dns_name1 */
|
||||
dns_result = dns_name_fromtext(&dns_name1, &buf1, NULL, ISC_FALSE,
|
||||
&buf2);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_fromtext failed, result == %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
return(T_UNRESOLVED);
|
||||
|
|
@ -2013,7 +2013,7 @@ test_dns_name_totext(char *test_name, isc_boolean_t omit_final) {
|
|||
isc_buffer_invalidate(&buf1);
|
||||
isc_buffer_init(&buf1, junk1, BUFLEN, ISC_BUFFERTYPE_TEXT);
|
||||
dns_result = dns_name_totext(&dns_name1, omit_final, &buf1);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_totext failed, result == %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
return(T_FAIL);
|
||||
|
|
@ -2024,7 +2024,7 @@ test_dns_name_totext(char *test_name, isc_boolean_t omit_final) {
|
|||
isc_buffer_init(&buf3, junk3, BUFLEN, ISC_BUFFERTYPE_BINARY);
|
||||
dns_result = dns_name_fromtext(&dns_name2, &buf1,
|
||||
NULL, ISC_FALSE, &buf3);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_fromtext failed, result == %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
return(T_UNRESOLVED);
|
||||
|
|
@ -2094,16 +2094,16 @@ char *a42 = "dns_name_fromwire(name, source, dctx, downcase, target) "
|
|||
"converts the possibly compressed DNS name 'name' in wire "
|
||||
"format to canonicalized form at target, performing upper to "
|
||||
"lower case conversion if downcase is true, and returns "
|
||||
"DNS_R_SUCCESS";
|
||||
"ISC_R_SUCCESS";
|
||||
|
||||
char *a43 = "when a label length is invalid, dns_name_fromwire() "
|
||||
"returns DNS_R_NOSPACE";
|
||||
"returns ISC_R_NOSPACE";
|
||||
|
||||
char *a44 = "when a label type is invalid, dns_name_fromwire() "
|
||||
"returns DNS_R_BADLABELTYPE";
|
||||
|
||||
char *a45 = "when a name length is invalid, dns_name_fromwire() "
|
||||
"returns DNS_R_NOSPACE";
|
||||
"returns ISC_R_NOSPACE";
|
||||
|
||||
char *a46 = "when a compression type is invalid, dns_name_fromwire() "
|
||||
"returns DNS_R_DISALLOWED";
|
||||
|
|
@ -2112,14 +2112,14 @@ char *a47 = "when a bad compression pointer is encountered, "
|
|||
"dns_name_fromwire() returns DNS_R_BADPOINTER";
|
||||
|
||||
char *a48 = "when input ends unexpected, dns_name_fromwire() "
|
||||
"returns DNS_R_UNEXPECTEDEND";
|
||||
"returns ISC_R_UNEXPECTEDEND";
|
||||
|
||||
char *a49 = "when there are too many compression pointers, "
|
||||
"dns_name_fromwire() returns DNS_R_TOOMANYHOPS";
|
||||
|
||||
char *a50 = "when there is not enough space in target, "
|
||||
"dns_name_fromwire(name, source, dcts, downcase, target) "
|
||||
"returns DNS_R_NOSPACE";
|
||||
"returns ISC_R_NOSPACE";
|
||||
|
||||
static int
|
||||
test_dns_name_fromwire( char *datafile_name,
|
||||
|
|
@ -2160,10 +2160,10 @@ test_dns_name_fromwire( char *datafile_name,
|
|||
dns_result = dns_name_fromwire(&dns_name1, &iscbuf1,
|
||||
&dctx, downcase ? ISC_TRUE : ISC_FALSE, &iscbuf2);
|
||||
|
||||
if ((dns_result == exp_result) && (exp_result == DNS_R_SUCCESS)) {
|
||||
if ((dns_result == exp_result) && (exp_result == ISC_R_SUCCESS)) {
|
||||
|
||||
dns_result = dname_from_tname(exp_name, &dns_name2);
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
dns_namereln = dns_name_fullcompare(
|
||||
&dns_name1,
|
||||
&dns_name2,
|
||||
|
|
@ -2230,17 +2230,17 @@ t_dns_name_fromwire_x(char *testfile, size_t buflen) {
|
|||
*/
|
||||
|
||||
tok = Tokens[5];
|
||||
exp_result = DNS_R_SUCCESS;
|
||||
if (! strcmp(tok, "DNS_R_SUCCESS"))
|
||||
exp_result = DNS_R_SUCCESS;
|
||||
else if (! strcmp(tok, "DNS_R_NOSPACE"))
|
||||
exp_result = DNS_R_NOSPACE;
|
||||
exp_result = ISC_R_SUCCESS;
|
||||
if (! strcmp(tok, "ISC_R_SUCCESS"))
|
||||
exp_result = ISC_R_SUCCESS;
|
||||
else if (! strcmp(tok, "ISC_R_NOSPACE"))
|
||||
exp_result = ISC_R_NOSPACE;
|
||||
else if (! strcmp(tok, "DNS_R_BADLABELTYPE"))
|
||||
exp_result = DNS_R_BADLABELTYPE;
|
||||
else if (! strcmp(tok, "DNS_R_BADPOINTER"))
|
||||
exp_result = DNS_R_BADPOINTER;
|
||||
else if (! strcmp(tok, "DNS_R_UNEXPECTEDEND"))
|
||||
exp_result = DNS_R_UNEXPECTEDEND;
|
||||
else if (! strcmp(tok, "ISC_R_UNEXPECTEDEND"))
|
||||
exp_result = ISC_R_UNEXPECTEDEND;
|
||||
else if (! strcmp(tok, "DNS_R_TOOMANYHOPS"))
|
||||
exp_result = DNS_R_TOOMANYHOPS;
|
||||
else if (! strcmp(tok, "DNS_R_DISALLOWED"))
|
||||
|
|
@ -2326,7 +2326,7 @@ char *a51 = "dns_name_towire(name, cctx, target) converts the DNS name "
|
|||
"target and returns DNS_SUCCESS";
|
||||
|
||||
char *a52 = "when not enough space exists in target, "
|
||||
"dns_name_towire(name, cctx, target) returns DNS_R_NOSPACE";
|
||||
"dns_name_towire(name, cctx, target) returns ISC_R_NOSPACE";
|
||||
|
||||
static int
|
||||
test_dns_name_towire( char *testname,
|
||||
|
|
@ -2368,11 +2368,11 @@ test_dns_name_towire( char *testname,
|
|||
isc_buffer_add(&iscbuf1, len);
|
||||
isc_buffer_init(&iscbuf2, buf2, BUFLEN, ISC_BUFFERTYPE_BINARY);
|
||||
dns_result = dns_name_fromtext(&dns_name, &iscbuf1, NULL, ISC_FALSE, &iscbuf2);
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
isc_buffer_init(&iscbuf3, buf3, buflen, ISC_BUFFERTYPE_BINARY);
|
||||
dns_result = dns_name_towire(&dns_name, &cctx, &iscbuf3);
|
||||
if (dns_result == exp_result) {
|
||||
if (exp_result == DNS_R_SUCCESS) {
|
||||
if (exp_result == ISC_R_SUCCESS) {
|
||||
/* compare results with expected data */
|
||||
val = chkdata( buf3,
|
||||
iscbuf3.used,
|
||||
|
|
@ -2476,7 +2476,7 @@ t_dns_name_towire_2() {
|
|||
char *a53 = "dns_name_concatenate(prefix, suffix, name, target) "
|
||||
"concatenates prefix and suffix, stores the result "
|
||||
"in target, canonicalizes any bitstring labels "
|
||||
"and returns DNS_R_SUCCESS";
|
||||
"and returns ISC_R_SUCCESS";
|
||||
|
||||
void
|
||||
t_dns_name_concatenate() {
|
||||
|
|
|
|||
|
|
@ -76,9 +76,9 @@ active_node(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node) {
|
|||
if (!active)
|
||||
result = dns_rdatasetiter_next(rdsiter);
|
||||
else
|
||||
result = DNS_R_NOMORE;
|
||||
result = ISC_R_NOMORE;
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
fatal("rdataset iteration failed");
|
||||
dns_rdatasetiter_destroy(&rdsiter);
|
||||
|
||||
|
|
@ -171,7 +171,7 @@ nxtify(char *filename) {
|
|||
&nextnode);
|
||||
if (result == ISC_R_SUCCESS)
|
||||
target = nextname;
|
||||
else if (result == DNS_R_NOMORE)
|
||||
else if (result == ISC_R_NOMORE)
|
||||
target = dns_db_origin(db);
|
||||
else {
|
||||
target = NULL; /* Make compiler happy. */
|
||||
|
|
@ -181,7 +181,7 @@ nxtify(char *filename) {
|
|||
dns_db_detachnode(db, &node);
|
||||
node = nextnode;
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
fatal("db iteration failed");
|
||||
dns_dbiterator_destroy(&dbiter);
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -103,9 +103,9 @@ printsection(dns_message_t *msg, dns_section_t sectionid, char *section_name)
|
|||
dns_name_init(&empty_name, NULL);
|
||||
|
||||
result = dns_message_firstname(msg, sectionid);
|
||||
if (result == DNS_R_NOMORE)
|
||||
return (DNS_R_SUCCESS);
|
||||
else if (result != DNS_R_SUCCESS)
|
||||
if (result == ISC_R_NOMORE)
|
||||
return (ISC_R_SUCCESS);
|
||||
else if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
for (;;) {
|
||||
|
|
@ -124,7 +124,7 @@ printsection(dns_message_t *msg, dns_section_t sectionid, char *section_name)
|
|||
ISC_FALSE,
|
||||
no_rdata,
|
||||
&target);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
#ifdef USEINITALWS
|
||||
if (first) {
|
||||
|
|
@ -137,13 +137,13 @@ printsection(dns_message_t *msg, dns_section_t sectionid, char *section_name)
|
|||
printf("%.*s", (int)r.length, (char *)r.base);
|
||||
|
||||
result = dns_message_nextname(msg, sectionid);
|
||||
if (result == DNS_R_NOMORE)
|
||||
if (result == ISC_R_NOMORE)
|
||||
break;
|
||||
else if (result != DNS_R_SUCCESS)
|
||||
else if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -162,12 +162,12 @@ printrdata(dns_message_t *msg, dns_rdataset_t *rdataset, dns_name_t *owner,
|
|||
|
||||
result = dns_rdataset_totext(rdataset, owner, ISC_FALSE, ISC_FALSE,
|
||||
&target);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
isc_buffer_used(&target, &r);
|
||||
printf("%.*s", (int)r.length, (char *)r.base);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -177,7 +177,7 @@ printmessage(dns_message_t *msg) {
|
|||
dns_rdataset_t *opt, *tsig;
|
||||
dns_name_t *tsigname;
|
||||
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
|
||||
printf(";; ->>HEADER<<- opcode: %s, status: %s, id: %u\n",
|
||||
opcodetext[msg->opcode], rcodetext[msg->rcode], msg->id);
|
||||
|
|
@ -229,33 +229,33 @@ printmessage(dns_message_t *msg) {
|
|||
if (! ISC_LIST_EMPTY(msg->sections[DNS_SECTION_QUESTION])) {
|
||||
printf("\n");
|
||||
result = printsection(msg, DNS_SECTION_QUESTION, "QUESTION");
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
if (! ISC_LIST_EMPTY(msg->sections[DNS_SECTION_ANSWER])) {
|
||||
printf("\n");
|
||||
result = printsection(msg, DNS_SECTION_ANSWER, "ANSWER");
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
if (! ISC_LIST_EMPTY(msg->sections[DNS_SECTION_AUTHORITY])) {
|
||||
printf("\n");
|
||||
result = printsection(msg, DNS_SECTION_AUTHORITY, "AUTHORITY");
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
if (! ISC_LIST_EMPTY(msg->sections[DNS_SECTION_ADDITIONAL])) {
|
||||
printf("\n");
|
||||
result = printsection(msg, DNS_SECTION_ADDITIONAL,
|
||||
"ADDITIONAL");
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
if (tsig != NULL) {
|
||||
printf("\n");
|
||||
result = printrdata(msg, tsig, tsigname,
|
||||
"PSEUDOSECTION TSIG");
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
printf("\n");
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ print_data(void *data) {
|
|||
isc_buffer_init(&target, buffer, sizeof(buffer), ISC_BUFFERTYPE_TEXT);
|
||||
|
||||
dns_result = dns_name_totext(data, ISC_FALSE, &target);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_totext failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
}
|
||||
|
|
@ -144,7 +144,7 @@ create_name(char *s, isc_mem_t *mctx, dns_name_t **dns_name) {
|
|||
result = dns_name_fromtext(*dns_name, &source, dns_rootname,
|
||||
ISC_FALSE, &target);
|
||||
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
++nfails;
|
||||
t_info("dns_name_fromtext(%s) failed %s\n",
|
||||
s, dns_result_totext(result));
|
||||
|
|
@ -178,7 +178,7 @@ t1_add(char *name, dns_rbt_t *rbt, isc_mem_t *mctx, isc_result_t *dns_result) {
|
|||
nprobs = 0;
|
||||
if (name && dns_result) {
|
||||
*dns_result = create_name(name, mctx, &dns_name);
|
||||
if (*dns_result == DNS_R_SUCCESS) {
|
||||
if (*dns_result == ISC_R_SUCCESS) {
|
||||
if (T_debug)
|
||||
t_info("dns_rbt_addname succeeded\n");
|
||||
*dns_result = dns_rbt_addname(rbt, dns_name, dns_name);
|
||||
|
|
@ -204,7 +204,7 @@ t1_delete(char *name, dns_rbt_t *rbt, isc_mem_t *mctx, isc_result_t *dns_result)
|
|||
nprobs = 0;
|
||||
if (name && dns_result) {
|
||||
*dns_result = create_name(name, mctx, &dns_name);
|
||||
if (*dns_result == DNS_R_SUCCESS) {
|
||||
if (*dns_result == ISC_R_SUCCESS) {
|
||||
*dns_result = dns_rbt_deletename(rbt, dns_name, ISC_FALSE);
|
||||
delete_name(dns_name, mctx);
|
||||
}
|
||||
|
|
@ -230,7 +230,7 @@ t1_search(char *name, dns_rbt_t *rbt, isc_mem_t *mctx, isc_result_t *dns_result)
|
|||
nprobs = 0;
|
||||
if (name && dns_result) {
|
||||
*dns_result = create_name(name, mctx, &dns_searchname);
|
||||
if (*dns_result == DNS_R_SUCCESS) {
|
||||
if (*dns_result == ISC_R_SUCCESS) {
|
||||
dns_fixedname_init(&dns_fixedname);
|
||||
dns_foundname = dns_fixedname_name(&dns_fixedname);
|
||||
data = NULL;
|
||||
|
|
@ -264,7 +264,7 @@ rbt_init(char *filename, dns_rbt_t **rbt, isc_mem_t *mctx) {
|
|||
}
|
||||
|
||||
dns_result = dns_rbt_create(mctx, delete_name, mctx, rbt);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rbt_create failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
fclose(fp);
|
||||
|
|
@ -283,7 +283,7 @@ rbt_init(char *filename, dns_rbt_t **rbt, isc_mem_t *mctx) {
|
|||
t_info("adding name %s to the rbt\n", p);
|
||||
|
||||
rval = t1_add(p, *rbt, mctx, &dns_result);
|
||||
if ((rval != 0) || (dns_result != DNS_R_SUCCESS)) {
|
||||
if ((rval != 0) || (dns_result != ISC_R_SUCCESS)) {
|
||||
t_info("add of %s failed\n", p);
|
||||
dns_rbt_destroy(rbt);
|
||||
fclose(fp);
|
||||
|
|
@ -332,17 +332,17 @@ test_rbt_gen(char *filename, char *command, char *testname, isc_result_t exp_res
|
|||
}
|
||||
else if (strcmp(command, "add") == 0) {
|
||||
dns_result = create_name(testname, mctx, &dns_name);
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
dns_result = dns_rbt_addname(rbt, dns_name, dns_name);
|
||||
|
||||
if (dns_result != DNS_R_SUCCESS)
|
||||
if (dns_result != ISC_R_SUCCESS)
|
||||
delete_name(dns_name, mctx);
|
||||
|
||||
if (dns_result == exp_result) {
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
rval = t1_search(testname, rbt, mctx, &dns_result);
|
||||
if (rval == 0) {
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
result = T_PASS;
|
||||
}
|
||||
else {
|
||||
|
|
@ -379,7 +379,7 @@ test_rbt_gen(char *filename, char *command, char *testname, isc_result_t exp_res
|
|||
if (dns_result == exp_result) {
|
||||
rval = t1_search(testname, rbt, mctx, &dns_result);
|
||||
if (rval == 0) {
|
||||
if (dns_result == DNS_R_SUCCESS) {
|
||||
if (dns_result == ISC_R_SUCCESS) {
|
||||
t_info("dns_rbt_deletename didn't "
|
||||
"delete the name");
|
||||
result = T_FAIL;
|
||||
|
|
@ -479,7 +479,7 @@ test_dns_rbt_x(char *filename) {
|
|||
}
|
||||
|
||||
|
||||
static char *a1 = "dns_rbt_create creates a rbt and returns DNS_R_SUCCESS "
|
||||
static char *a1 = "dns_rbt_create creates a rbt and returns ISC_R_SUCCESS "
|
||||
"on success";
|
||||
|
||||
static void
|
||||
|
|
@ -492,7 +492,7 @@ t1() {
|
|||
}
|
||||
|
||||
static char *a2 = "dns_rbt_addname adds a name to a database and returns "
|
||||
"DNS_R_SUCCESS on success";
|
||||
"ISC_R_SUCCESS on success";
|
||||
static void
|
||||
t2() {
|
||||
int result;
|
||||
|
|
@ -503,7 +503,7 @@ t2() {
|
|||
}
|
||||
|
||||
static char *a3 = "when name already exists, dns_rbt_addname() returns "
|
||||
"DNS_R_EXISTS";
|
||||
"ISC_R_EXISTS";
|
||||
|
||||
static void
|
||||
t3() {
|
||||
|
|
@ -515,7 +515,7 @@ t3() {
|
|||
}
|
||||
|
||||
static char *a4 = "when name exists, dns_rbt_deletename() returns "
|
||||
"DNS_R_SUCCESS";
|
||||
"ISC_R_SUCCESS";
|
||||
|
||||
static void
|
||||
t4() {
|
||||
|
|
@ -527,7 +527,7 @@ t4() {
|
|||
}
|
||||
|
||||
static char *a5 = "when name does not exist, dns_rbt_deletename() returns "
|
||||
"DNS_R_NOTFOUND";
|
||||
"ISC_R_NOTFOUND";
|
||||
static void
|
||||
t5() {
|
||||
int result;
|
||||
|
|
@ -538,7 +538,7 @@ t5() {
|
|||
}
|
||||
|
||||
static char *a6 = "when name exists and exactly matches the search name, "
|
||||
"dns_rbt_findname() returns DNS_R_SUCCESS";
|
||||
"dns_rbt_findname() returns ISC_R_SUCCESS";
|
||||
|
||||
static void
|
||||
t6() {
|
||||
|
|
@ -550,7 +550,7 @@ t6() {
|
|||
}
|
||||
|
||||
static char *a7 = "when a name does not exist, "
|
||||
"dns_rbt_findname returns DNS_R_NOTFOUND";
|
||||
"dns_rbt_findname returns ISC_R_NOTFOUND";
|
||||
|
||||
static void
|
||||
t7() {
|
||||
|
|
@ -620,7 +620,7 @@ t9_walkchain(dns_rbtnodechain_t *chain, dns_rbt_t *rbt) {
|
|||
NULL : dns_fixedname_name(&origin),
|
||||
dns_fixedname_name(&fullname1),
|
||||
NULL);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_concatenate failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
++nprobs;
|
||||
|
|
@ -631,8 +631,8 @@ t9_walkchain(dns_rbtnodechain_t *chain, dns_rbt_t *rbt) {
|
|||
dns_fixedname_init(&name);
|
||||
dns_result = dns_rbtnodechain_next(chain, dns_fixedname_name(&name),
|
||||
dns_fixedname_name(&origin));
|
||||
if ((dns_result != DNS_R_SUCCESS) && (dns_result != DNS_R_NEWORIGIN)) {
|
||||
if (dns_result != DNS_R_NOMORE) {
|
||||
if ((dns_result != ISC_R_SUCCESS) && (dns_result != DNS_R_NEWORIGIN)) {
|
||||
if (dns_result != ISC_R_NOMORE) {
|
||||
t_info("dns_rbtnodechain_next failed %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
++nprobs;
|
||||
|
|
@ -649,7 +649,7 @@ t9_walkchain(dns_rbtnodechain_t *chain, dns_rbt_t *rbt) {
|
|||
NULL : dns_fixedname_name(&origin),
|
||||
dns_fixedname_name(&fullname2),
|
||||
NULL);
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_concatenate failed %s\n", dns_result_totext(dns_result));
|
||||
++nprobs;
|
||||
break;
|
||||
|
|
@ -771,7 +771,7 @@ t_dns_rbtnodechain_init(char *dbfile, char *findname,
|
|||
dns_result = dns_name_fromtext(dns_fixedname_name(&dns_findname),
|
||||
&isc_buffer, NULL, ISC_FALSE, NULL);
|
||||
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_fromtext failed %s\n", dns_result_totext(dns_result));
|
||||
return(result);
|
||||
}
|
||||
|
|
@ -782,7 +782,7 @@ t_dns_rbtnodechain_init(char *dbfile, char *findname,
|
|||
dns_fixedname_name(&dns_foundname),
|
||||
&node, &chain, ISC_TRUE, NULL, NULL);
|
||||
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rbt_findnode failed %s\n", dns_result_totext(dns_result));
|
||||
return(result);
|
||||
}
|
||||
|
|
@ -794,7 +794,7 @@ t_dns_rbtnodechain_init(char *dbfile, char *findname,
|
|||
dns_fixedname_name(&dns_nextname),
|
||||
dns_fixedname_name(&dns_origin));
|
||||
|
||||
if ((dns_result != DNS_R_SUCCESS) && (dns_result != DNS_R_NEWORIGIN)) {
|
||||
if ((dns_result != ISC_R_SUCCESS) && (dns_result != DNS_R_NEWORIGIN)) {
|
||||
t_info("dns_rbtnodechain_next unexpectedly returned %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
}
|
||||
|
|
@ -809,7 +809,7 @@ t_dns_rbtnodechain_init(char *dbfile, char *findname,
|
|||
dns_fixedname_name(&dns_foundname),
|
||||
&node, &chain, ISC_TRUE, NULL, NULL);
|
||||
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("\tdns_rbt_findnode failed %s\n", dns_result_totext(dns_result));
|
||||
return(result);
|
||||
}
|
||||
|
|
@ -822,7 +822,7 @@ t_dns_rbtnodechain_init(char *dbfile, char *findname,
|
|||
dns_fixedname_name(&dns_prevname),
|
||||
dns_fixedname_name(&dns_origin));
|
||||
|
||||
if ((dns_result != DNS_R_SUCCESS) && (dns_result != DNS_R_NEWORIGIN)) {
|
||||
if ((dns_result != ISC_R_SUCCESS) && (dns_result != DNS_R_NEWORIGIN)) {
|
||||
t_info("dns_rbtnodechain_prev unexpectedly returned %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
}
|
||||
|
|
@ -1013,12 +1013,12 @@ t_dns_rbtnodechain_first(char *dbfile, char *expected_firstname,
|
|||
t_info("testing for next name of %s, origin of %s\n",
|
||||
expected_nextname, expected_nextorigin);
|
||||
|
||||
if ((dns_result != DNS_R_SUCCESS) && (dns_result != DNS_R_NEWORIGIN)) {
|
||||
if ((dns_result != ISC_R_SUCCESS) && (dns_result != DNS_R_NEWORIGIN)) {
|
||||
t_info("dns_rbtnodechain_next unexpectedly returned %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
}
|
||||
if (strcasecmp(expected_firstorigin, expected_nextorigin) == 0)
|
||||
expected_result = DNS_R_SUCCESS;
|
||||
expected_result = ISC_R_SUCCESS;
|
||||
else
|
||||
expected_result = DNS_R_NEWORIGIN;
|
||||
nfails += t_namechk(dns_result, &dns_name, expected_nextname,
|
||||
|
|
@ -1173,12 +1173,12 @@ t_dns_rbtnodechain_last(char *dbfile, char *expected_lastname,
|
|||
dns_fixedname_name(&dns_name),
|
||||
dns_fixedname_name(&dns_origin));
|
||||
|
||||
if ((dns_result != DNS_R_SUCCESS) && (dns_result != DNS_R_NEWORIGIN)) {
|
||||
if ((dns_result != ISC_R_SUCCESS) && (dns_result != DNS_R_NEWORIGIN)) {
|
||||
t_info("dns_rbtnodechain_prev unexpectedly returned %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
}
|
||||
if (strcasecmp(expected_lastorigin, expected_prevorigin) == 0)
|
||||
expected_result = DNS_R_SUCCESS;
|
||||
expected_result = ISC_R_SUCCESS;
|
||||
else
|
||||
expected_result = DNS_R_NEWORIGIN;
|
||||
nfails += t_namechk(dns_result, &dns_name, expected_prevname,
|
||||
|
|
@ -1325,7 +1325,7 @@ t_dns_rbtnodechain_next(char *dbfile, char *findname,
|
|||
dns_result = dns_name_fromtext(dns_fixedname_name(&dns_findname),
|
||||
&isc_buffer, NULL, ISC_FALSE, NULL);
|
||||
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_fromtext failed %s\n", dns_result_totext(dns_result));
|
||||
return(result);
|
||||
}
|
||||
|
|
@ -1336,7 +1336,7 @@ t_dns_rbtnodechain_next(char *dbfile, char *findname,
|
|||
dns_fixedname_name(&dns_foundname),
|
||||
&node, &chain, ISC_TRUE, NULL, NULL);
|
||||
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rbt_findnode failed %s\n", dns_result_totext(dns_result));
|
||||
return(result);
|
||||
}
|
||||
|
|
@ -1348,7 +1348,7 @@ t_dns_rbtnodechain_next(char *dbfile, char *findname,
|
|||
dns_fixedname_name(&dns_nextname),
|
||||
dns_fixedname_name(&dns_origin));
|
||||
|
||||
if ((dns_result != DNS_R_SUCCESS) && (dns_result != DNS_R_NEWORIGIN)) {
|
||||
if ((dns_result != ISC_R_SUCCESS) && (dns_result != DNS_R_NEWORIGIN)) {
|
||||
t_info("dns_rbtnodechain_next unexpectedly returned %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
}
|
||||
|
|
@ -1432,7 +1432,7 @@ test_dns_rbtnodechain_next(char *filename) {
|
|||
|
||||
static char *a12 = "a call to dns_rbtnodechain_next(chain, name, origin) "
|
||||
"sets name to point to the next node of the tree "
|
||||
"and returns DNS_R_SUCCESS or DNS_R_NEWORIGIN on success";
|
||||
"and returns ISC_R_SUCCESS or DNS_R_NEWORIGIN on success";
|
||||
|
||||
|
||||
static void
|
||||
|
|
@ -1496,7 +1496,7 @@ t_dns_rbtnodechain_prev(char *dbfile, char *findname,
|
|||
dns_result = dns_name_fromtext(dns_fixedname_name(&dns_findname),
|
||||
&isc_buffer, NULL, ISC_FALSE, NULL);
|
||||
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_name_fromtext failed %s\n", dns_result_totext(dns_result));
|
||||
return(result);
|
||||
}
|
||||
|
|
@ -1507,7 +1507,7 @@ t_dns_rbtnodechain_prev(char *dbfile, char *findname,
|
|||
dns_fixedname_name(&dns_foundname),
|
||||
&node, &chain, ISC_TRUE, NULL, NULL);
|
||||
|
||||
if (dns_result != DNS_R_SUCCESS) {
|
||||
if (dns_result != ISC_R_SUCCESS) {
|
||||
t_info("dns_rbt_findnode failed %s\n", dns_result_totext(dns_result));
|
||||
return(result);
|
||||
}
|
||||
|
|
@ -1519,7 +1519,7 @@ t_dns_rbtnodechain_prev(char *dbfile, char *findname,
|
|||
dns_fixedname_name(&dns_prevname),
|
||||
dns_fixedname_name(&dns_origin));
|
||||
|
||||
if ((dns_result != DNS_R_SUCCESS) && (dns_result != DNS_R_NEWORIGIN)) {
|
||||
if ((dns_result != ISC_R_SUCCESS) && (dns_result != DNS_R_NEWORIGIN)) {
|
||||
t_info("dns_rbtnodechain_prev unexpectedly returned %s\n",
|
||||
dns_result_totext(dns_result));
|
||||
}
|
||||
|
|
@ -1603,7 +1603,7 @@ test_dns_rbtnodechain_prev(char *filename) {
|
|||
|
||||
static char *a13 = "a call to dns_rbtnodechain_prev(chain, name, origin) "
|
||||
"sets name to point to the previous node of the tree "
|
||||
"and returns DNS_R_SUCCESS or DNS_R_NEWORIGIN on success";
|
||||
"and returns ISC_R_SUCCESS or DNS_R_NEWORIGIN on success";
|
||||
|
||||
static void
|
||||
t13() {
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ create_name(char *s) {
|
|||
result = dns_name_fromtext(name, &source, dns_rootname,
|
||||
ISC_FALSE, &target);
|
||||
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
printf("dns_name_fromtext(%s) failed: %s\n",
|
||||
s, dns_result_totext(result));
|
||||
return (NULL);
|
||||
|
|
@ -132,14 +132,14 @@ detail(dns_rbt_t *rbt, dns_name_t *name) {
|
|||
ISC_TRUE, NULL, NULL);
|
||||
|
||||
switch (result) {
|
||||
case DNS_R_SUCCESS:
|
||||
case ISC_R_SUCCESS:
|
||||
printf(" found exact.");
|
||||
nodes_should_match = ISC_TRUE;
|
||||
break;
|
||||
case DNS_R_PARTIALMATCH:
|
||||
printf(" found parent.");
|
||||
break;
|
||||
case DNS_R_NOTFOUND:
|
||||
case ISC_R_NOTFOUND:
|
||||
printf(" name not found.");
|
||||
break;
|
||||
default:
|
||||
|
|
@ -153,14 +153,14 @@ detail(dns_rbt_t *rbt, dns_name_t *name) {
|
|||
} else
|
||||
printf(" no data at node.");
|
||||
|
||||
if (result == DNS_R_SUCCESS || result == DNS_R_PARTIALMATCH) {
|
||||
if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH) {
|
||||
printf("\n name from dns_rbt_findnode: ");
|
||||
print_name(foundname);
|
||||
}
|
||||
|
||||
result = dns_rbtnodechain_current(&chain, foundname, origin, &node2);
|
||||
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
printf("\n name from dns_rbtnodechain_current: ");
|
||||
|
||||
/*
|
||||
|
|
@ -172,7 +172,7 @@ detail(dns_rbt_t *rbt, dns_name_t *name) {
|
|||
dns_name_isabsolute(foundname) ?
|
||||
NULL : origin,
|
||||
fullname, NULL);
|
||||
if (result == DNS_R_SUCCESS)
|
||||
if (result == ISC_R_SUCCESS)
|
||||
print_name(fullname);
|
||||
else
|
||||
printf("%s\n", dns_result_totext(result));
|
||||
|
|
@ -223,7 +223,7 @@ iterate(dns_rbt_t *rbt, isc_boolean_t forward) {
|
|||
origin);
|
||||
}
|
||||
|
||||
if (result != DNS_R_SUCCESS && result != DNS_R_NEWORIGIN)
|
||||
if (result != ISC_R_SUCCESS && result != DNS_R_NEWORIGIN)
|
||||
printf("start not found!\n");
|
||||
|
||||
else {
|
||||
|
|
@ -234,13 +234,13 @@ iterate(dns_rbt_t *rbt, isc_boolean_t forward) {
|
|||
printf("\n");
|
||||
}
|
||||
|
||||
if (result == DNS_R_SUCCESS ||
|
||||
if (result == ISC_R_SUCCESS ||
|
||||
result == DNS_R_NEWORIGIN) {
|
||||
print_name(&foundname);
|
||||
printf("\n");
|
||||
|
||||
} else {
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
printf("UNEXEPCTED ITERATION ERROR: %s",
|
||||
dns_result_totext(result));
|
||||
break;
|
||||
|
|
@ -253,7 +253,7 @@ iterate(dns_rbt_t *rbt, isc_boolean_t forward) {
|
|||
|
||||
|
||||
#define CMDCHECK(s) (strncasecmp(command, (s), length) == 0)
|
||||
#define PRINTERR(r) if (r != DNS_R_SUCCESS) \
|
||||
#define PRINTERR(r) if (r != ISC_R_SUCCESS) \
|
||||
printf("... %s\n", dns_result_totext(r));
|
||||
|
||||
int
|
||||
|
|
@ -299,7 +299,7 @@ main (int argc, char **argv) {
|
|||
}
|
||||
|
||||
result = dns_rbt_create(mctx, delete_name, NULL, &rbt);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
printf("dns_rbt_create: %s: exiting\n",
|
||||
dns_result_totext(result));
|
||||
exit(1);
|
||||
|
|
@ -376,7 +376,7 @@ main (int argc, char **argv) {
|
|||
foundname,
|
||||
&data);
|
||||
switch (result) {
|
||||
case DNS_R_SUCCESS:
|
||||
case ISC_R_SUCCESS:
|
||||
printf("found exact: ");
|
||||
print_name(data);
|
||||
putchar('\n');
|
||||
|
|
@ -388,10 +388,10 @@ main (int argc, char **argv) {
|
|||
print_name(foundname);
|
||||
printf(")\n");
|
||||
break;
|
||||
case DNS_R_NOTFOUND:
|
||||
case ISC_R_NOTFOUND:
|
||||
printf("NOT FOUND!\n");
|
||||
break;
|
||||
case DNS_R_NOMEMORY:
|
||||
case ISC_R_NOMEMORY:
|
||||
printf("OUT OF MEMORY!\n");
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ main(int argc, char *argv[]) {
|
|||
} else if (token.type == isc_tokentype_string) {
|
||||
result = dns_rdatatype_fromtext(&type,
|
||||
&token.value.as_textregion);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stdout,
|
||||
"dns_rdatatype_fromtext returned %s(%d)\n",
|
||||
dns_result_totext(result), result);
|
||||
|
|
@ -170,7 +170,7 @@ main(int argc, char *argv[]) {
|
|||
} else if (token.type == isc_tokentype_string) {
|
||||
result = dns_rdataclass_fromtext(&class,
|
||||
&token.value.as_textregion);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stdout,
|
||||
"dns_rdataclass_fromtext returned %s(%d)\n",
|
||||
dns_result_totext(result), result);
|
||||
|
|
@ -190,7 +190,7 @@ main(int argc, char *argv[]) {
|
|||
ISC_BUFFERTYPE_BINARY);
|
||||
result = dns_rdata_fromtext(&rdata, class, type, lex,
|
||||
NULL, ISC_FALSE, &dbuf, NULL);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stdout,
|
||||
"dns_rdata_fromtext returned %s(%d)\n",
|
||||
dns_result_totext(result), result);
|
||||
|
|
@ -214,7 +214,7 @@ main(int argc, char *argv[]) {
|
|||
/* Convert to wire and back? */
|
||||
if (wire) {
|
||||
result = dns_compress_init(&cctx, -1, mctx);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stdout,
|
||||
"dns_compress_init returned %s(%d)\n",
|
||||
dns_result_totext(result), result);
|
||||
|
|
@ -224,7 +224,7 @@ main(int argc, char *argv[]) {
|
|||
ISC_BUFFERTYPE_BINARY);
|
||||
result = dns_rdata_towire(&rdata, &cctx, &wbuf);
|
||||
dns_compress_invalidate(&cctx);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stdout,
|
||||
"dns_rdata_towire returned %s(%d)\n",
|
||||
dns_result_totext(result), result);
|
||||
|
|
@ -263,7 +263,7 @@ main(int argc, char *argv[]) {
|
|||
result = dns_rdata_fromwire(&rdata, class, type, &wbuf,
|
||||
&dctx, ISC_FALSE, &dbuf);
|
||||
dns_decompress_invalidate(&dctx);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stdout,
|
||||
"dns_rdata_fromwire returned %s(%d)\n",
|
||||
dns_result_totext(result), result);
|
||||
|
|
@ -289,7 +289,7 @@ main(int argc, char *argv[]) {
|
|||
isc_buffer_init(&tbuf, outbuf, sizeof(outbuf),
|
||||
ISC_BUFFERTYPE_TEXT);
|
||||
result = dns_rdata_totext(&rdata, NULL, &tbuf);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
fprintf(stdout, "dns_rdata_totext returned %s(%d)\n",
|
||||
dns_result_totext(result), result);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ launch(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
|
|||
NULL, options, task, done,
|
||||
NULL,
|
||||
&fetch) ==
|
||||
DNS_R_SUCCESS);
|
||||
ISC_R_SUCCESS);
|
||||
ISC_LIST_APPEND(fetches, fetch, link);
|
||||
|
||||
UNLOCK(&lock);
|
||||
|
|
@ -206,13 +206,13 @@ main(int argc, char *argv[]) {
|
|||
|
||||
dispatch = NULL;
|
||||
RUNTIME_CHECK(dns_dispatch_create(mctx, s, task1, 4096, 1000, 1000,
|
||||
17, 19, &dispatch) == DNS_R_SUCCESS);
|
||||
17, 19, &dispatch) == ISC_R_SUCCESS);
|
||||
|
||||
#ifdef notyet
|
||||
res = NULL;
|
||||
RUNTIME_CHECK(dns_resolver_create(mctx, view, taskmgr, 10, timermgr,
|
||||
dispatch, &res) ==
|
||||
DNS_R_SUCCESS);
|
||||
ISC_R_SUCCESS);
|
||||
|
||||
dns_view_setresolver(view, res);
|
||||
dns_view_freeze(view);
|
||||
|
|
|
|||
|
|
@ -266,9 +266,9 @@ expecttofindkey(dns_name_t *name, dns_db_t *db, dns_dbversion_t *version) {
|
|||
result = dns_db_find(db, name, version, dns_rdatatype_key, options,
|
||||
0, NULL, dns_fixedname_name(&fname), NULL, NULL);
|
||||
switch (result) {
|
||||
case DNS_R_SUCCESS:
|
||||
case ISC_R_SUCCESS:
|
||||
case DNS_R_NXDOMAIN:
|
||||
case DNS_R_NXRDATASET:
|
||||
case DNS_R_NXRRSET:
|
||||
return ISC_TRUE;
|
||||
case DNS_R_DELEGATION:
|
||||
case DNS_R_CNAME:
|
||||
|
|
@ -470,7 +470,7 @@ signset(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node,
|
|||
dns_rdata_freestruct(&sig);
|
||||
result = dns_rdataset_next(&oldsigset);
|
||||
}
|
||||
if (result == DNS_R_NOMORE)
|
||||
if (result == ISC_R_NOMORE)
|
||||
result = ISC_R_SUCCESS;
|
||||
check_result(result, "dns_db_dns_rdataset_first()/next()");
|
||||
dns_rdataset_disassociate(&oldsigset);
|
||||
|
|
@ -569,7 +569,7 @@ hasnullkey(dns_rdataset_t rdataset) {
|
|||
return (ISC_TRUE);
|
||||
result = dns_rdataset_next(&rdataset);
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
check_result(result, "iteration over keys");
|
||||
return (ISC_FALSE);
|
||||
}
|
||||
|
|
@ -669,7 +669,7 @@ signname(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node,
|
|||
dns_rdataset_disassociate(&rdataset);
|
||||
result = dns_rdatasetiter_next(rdsiter);
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
fatal("rdataset iteration failed");
|
||||
dns_rdatasetiter_destroy(&rdsiter);
|
||||
}
|
||||
|
|
@ -694,9 +694,9 @@ active_node(dns_db_t *db, dns_dbversion_t *version, dns_dbnode_t *node) {
|
|||
if (!active)
|
||||
result = dns_rdatasetiter_next(rdsiter);
|
||||
else
|
||||
result = DNS_R_NOMORE;
|
||||
result = ISC_R_NOMORE;
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
fatal("rdataset iteration failed");
|
||||
dns_rdatasetiter_destroy(&rdsiter);
|
||||
|
||||
|
|
@ -850,7 +850,7 @@ signzone(dns_db_t *db, dns_dbversion_t *version) {
|
|||
&nextnode, origin, lastcut);
|
||||
if (result == ISC_R_SUCCESS)
|
||||
target = nextname;
|
||||
else if (result == DNS_R_NOMORE)
|
||||
else if (result == ISC_R_NOMORE)
|
||||
target = origin;
|
||||
else {
|
||||
target = NULL; /* Make compiler happy. */
|
||||
|
|
@ -864,7 +864,7 @@ signzone(dns_db_t *db, dns_dbversion_t *version) {
|
|||
dns_db_detachnode(db, &curnode);
|
||||
node = nextnode;
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
fatal("db iteration failed");
|
||||
if (lastcut != NULL) {
|
||||
dns_name_free(lastcut, mctx);
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
static inline void
|
||||
CHECKRESULT(isc_result_t result, char *msg)
|
||||
{
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
printf("%s: %s\n", msg, dns_result_totext(result));
|
||||
|
||||
exit(1);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
#define ERRRET(result, function) \
|
||||
do { \
|
||||
if (result != DNS_R_SUCCESS) { \
|
||||
if (result != ISC_R_SUCCESS) { \
|
||||
fprintf(stdout, "%s() returned %s\n", \
|
||||
function, dns_result_totext(result)); \
|
||||
return; \
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
} while (0)
|
||||
|
||||
#define ERRCONT(result, function) \
|
||||
if (result != DNS_R_SUCCESS) { \
|
||||
if (result != ISC_R_SUCCESS) { \
|
||||
fprintf(stdout, "%s() returned %s\n", \
|
||||
function, dns_result_totext(result)); \
|
||||
continue; \
|
||||
|
|
@ -58,7 +58,7 @@ print_rdataset(dns_name_t *name, dns_rdataset_t *rdataset) {
|
|||
result = dns_rdataset_totext(rdataset, name, ISC_FALSE, ISC_FALSE,
|
||||
&text);
|
||||
isc_buffer_used(&text, &r);
|
||||
if (result == DNS_R_SUCCESS)
|
||||
if (result == ISC_R_SUCCESS)
|
||||
printf("%.*s", (int)r.length, (char *)r.base);
|
||||
else
|
||||
printf("%s\n", dns_result_totext(result));
|
||||
|
|
@ -128,7 +128,7 @@ query(dns_view_t *view) {
|
|||
result = dns_zt_find(view->zonetable,
|
||||
dns_fixedname_name(&name), NULL,
|
||||
&zone);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
if (result == DNS_R_PARTIALMATCH)
|
||||
dns_zone_detach(&zone);
|
||||
reload = 0;
|
||||
|
|
@ -148,7 +148,7 @@ query(dns_view_t *view) {
|
|||
"dns_view_simplefind",
|
||||
dns_result_totext(result));
|
||||
switch (result) {
|
||||
case DNS_R_SUCCESS:
|
||||
case ISC_R_SUCCESS:
|
||||
print_rdataset(dns_fixedname_name(&name),
|
||||
&rdataset);
|
||||
break;
|
||||
|
|
@ -201,9 +201,9 @@ main(int argc, char **argv) {
|
|||
|
||||
/*
|
||||
RUNTIME_CHECK(dns_view_create(mctx, dns_rdataclass_in,
|
||||
"default/IN", &view1) == DNS_R_SUCCESS);
|
||||
"default/IN", &view1) == ISC_R_SUCCESS);
|
||||
RUNTIME_CHECK(dns_view_create(mctx, dns_rdataclass_in,
|
||||
"default/IN", &view2) == DNS_R_SUCCESS);
|
||||
"default/IN", &view2) == ISC_R_SUCCESS);
|
||||
*/
|
||||
|
||||
cba.mctx = mctx;
|
||||
|
|
@ -246,9 +246,9 @@ main(int argc, char **argv) {
|
|||
result = dns_c_parse_namedconf(NULL, conf, mctx, &configctx, &cbks);
|
||||
fprintf(stdout, "%s() returned %s\n", "dns_c_parse_namedconf",
|
||||
dns_result_totext(result));
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
result = dns_c_ctx_getdirectory(NULL, configctx, &dir);
|
||||
if (result == DNS_R_SUCCESS)
|
||||
if (result == ISC_R_SUCCESS)
|
||||
chdir(dir);
|
||||
view = ISC_LIST_HEAD(cba.newviews);
|
||||
while (view != NULL) {
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ isc_sockaddr_t addr;
|
|||
|
||||
#define ERRRET(result, function) \
|
||||
do { \
|
||||
if (result != DNS_R_SUCCESS) { \
|
||||
if (result != ISC_R_SUCCESS) { \
|
||||
fprintf(stderr, "%s() returned %s\n", \
|
||||
function, dns_result_totext(result)); \
|
||||
return; \
|
||||
|
|
@ -52,7 +52,7 @@ isc_sockaddr_t addr;
|
|||
} while (0)
|
||||
|
||||
#define ERRCONT(result, function) \
|
||||
if (result != DNS_R_SUCCESS) { \
|
||||
if (result != ISC_R_SUCCESS) { \
|
||||
fprintf(stderr, "%s() returned %s\n", \
|
||||
function, dns_result_totext(result)); \
|
||||
continue; \
|
||||
|
|
@ -129,7 +129,7 @@ print_rdataset(dns_name_t *name, dns_rdataset_t *rdataset) {
|
|||
result = dns_rdataset_totext(rdataset, name, ISC_FALSE, ISC_FALSE,
|
||||
&text);
|
||||
isc_buffer_used(&text, &r);
|
||||
if (result == DNS_R_SUCCESS)
|
||||
if (result == ISC_R_SUCCESS)
|
||||
printf("%.*s", (int)r.length, (char *)r.base);
|
||||
else
|
||||
printf("%s\n", dns_result_totext(result));
|
||||
|
|
@ -150,7 +150,7 @@ query(void) {
|
|||
|
||||
db = NULL;
|
||||
result = dns_zone_getdb(zone, &db);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stderr, "%s() returned %s\n", "dns_zone_getdb",
|
||||
dns_result_totext(result));
|
||||
return;
|
||||
|
|
@ -206,7 +206,7 @@ query(void) {
|
|||
case DNS_R_DELEGATION:
|
||||
print_rdataset(dns_fixedname_name(&found), &rdataset);
|
||||
break;
|
||||
case DNS_R_SUCCESS:
|
||||
case ISC_R_SUCCESS:
|
||||
print_rdataset(dns_fixedname_name(&name), &rdataset);
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ foreach(dns_a6context_t *a6ctx, dns_rdataset_t *parent, unsigned int depth,
|
|||
maybe_disassociate(&childsig);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
break;
|
||||
} else if (result == DNS_R_NOTFOUND &&
|
||||
} else if (result == ISC_R_NOTFOUND &&
|
||||
a6ctx->missing != NULL) {
|
||||
/*
|
||||
* We can't follow this chain, because
|
||||
|
|
@ -163,7 +163,7 @@ foreach(dns_a6context_t *a6ctx, dns_rdataset_t *parent, unsigned int depth,
|
|||
return (ISC_R_QUOTA);
|
||||
}
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
return (result);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,14 +65,14 @@ convert_named_acl(char *aclname, dns_c_ctx_t *cctx,
|
|||
}
|
||||
/* Not yet converted. Convert now. */
|
||||
result = dns_c_acltable_getacl(cctx->acls, aclname, &cacl);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_SECURITY,
|
||||
DNS_LOGMODULE_ACL, ISC_LOG_WARNING,
|
||||
"undefined ACL '%s'", aclname);
|
||||
return (result);
|
||||
}
|
||||
result = dns_acl_fromconfig(cacl->ipml, cctx, ctx, mctx, &dacl);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
dacl->name = aclname;
|
||||
ISC_LIST_APPEND(ctx->named_acl_cache, dacl, nextincache);
|
||||
|
|
|
|||
|
|
@ -3141,7 +3141,7 @@ dbfind_name(dns_adbname_t *adbname, isc_stdtime_t now,
|
|||
switch (result) {
|
||||
case DNS_R_GLUE:
|
||||
case DNS_R_HINT:
|
||||
case DNS_R_SUCCESS:
|
||||
case ISC_R_SUCCESS:
|
||||
/*
|
||||
* Found in the database. Even if we can't copy out
|
||||
* any information, return success, or else a fetch
|
||||
|
|
@ -3247,7 +3247,7 @@ dbfind_a6(dns_adbname_t *adbname, isc_stdtime_t now)
|
|||
switch (result) {
|
||||
case DNS_R_GLUE:
|
||||
case DNS_R_HINT:
|
||||
case DNS_R_SUCCESS:
|
||||
case ISC_R_SUCCESS:
|
||||
/*
|
||||
* Start a6 chain follower. There is no need to poke people
|
||||
* who might be waiting, since this is call requires there
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ address_to_ptr_name(dns_byaddr_t *byaddr, isc_netaddr_t *address) {
|
|||
strcpy(cp, "].ip6.int.");
|
||||
}
|
||||
} else
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
|
||||
len = (unsigned int)strlen(textname);
|
||||
isc_buffer_init(&buffer, textname, len, ISC_BUFFERTYPE_TEXT);
|
||||
|
|
@ -165,7 +165,7 @@ copy_ptr_targets(dns_byaddr_t *byaddr) {
|
|||
ISC_LIST_APPEND(byaddr->event->names, name, link);
|
||||
result = dns_rdataset_next(&byaddr->rdataset);
|
||||
}
|
||||
if (result == DNS_R_NOMORE)
|
||||
if (result == ISC_R_NOMORE)
|
||||
result = ISC_R_SUCCESS;
|
||||
|
||||
return (result);
|
||||
|
|
@ -240,7 +240,7 @@ byaddr_find(dns_byaddr_t *byaddr, dns_fetchevent_t *event) {
|
|||
dns_rdatatype_ptr, 0, 0,
|
||||
ISC_FALSE, fname,
|
||||
&byaddr->rdataset, NULL);
|
||||
if (result == DNS_R_NOTFOUND) {
|
||||
if (result == ISC_R_NOTFOUND) {
|
||||
/*
|
||||
* We don't know anything about the name.
|
||||
* Launch a fetch.
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: cache.c,v 1.14 2000/03/17 17:45:00 gson Exp $ */
|
||||
/* $Id: cache.c,v 1.15 2000/04/06 22:01:49 explorer Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
#include <limits.h>
|
||||
|
|
@ -159,7 +159,7 @@ dns_cache_create(isc_mem_t *mctx, isc_taskmgr_t *taskmgr,
|
|||
|
||||
result = cache_cleaner_init(cache, taskmgr, timermgr,
|
||||
&cache->cleaner);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_db;
|
||||
|
||||
*cachep = cache;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: compress.c,v 1.22 2000/03/23 05:18:41 tale Exp $ */
|
||||
/* $Id: compress.c,v 1.23 2000/04/06 22:01:50 explorer Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
#include <string.h>
|
||||
|
|
@ -60,11 +60,11 @@ dns_compress_init(dns_compress_t *cctx, int edns, isc_mem_t *mctx)
|
|||
cctx->edns = edns;
|
||||
cctx->global = NULL;
|
||||
result = dns_rbt_create(mctx, free_offset, mctx, &cctx->global);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
cctx->mctx = mctx;
|
||||
cctx->magic = CCTX_MAGIC;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -154,11 +154,11 @@ dns_compress_rollback(dns_compress_t *cctx, isc_uint16_t offset) {
|
|||
result = dns_rbtnodechain_first(&chain, cctx->global, foundname,
|
||||
origin);
|
||||
|
||||
while (result == DNS_R_NEWORIGIN || result == DNS_R_SUCCESS) {
|
||||
while (result == DNS_R_NEWORIGIN || result == ISC_R_SUCCESS) {
|
||||
result = dns_rbtnodechain_current(&chain, foundname,
|
||||
origin, &node);
|
||||
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
break;
|
||||
|
||||
if (node->data != NULL &&
|
||||
|
|
@ -168,12 +168,12 @@ dns_compress_rollback(dns_compress_t *cctx, isc_uint16_t offset) {
|
|||
NULL : origin,
|
||||
fullname, NULL);
|
||||
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
break;
|
||||
|
||||
result = dns_rbt_deletename(cctx->global, fullname,
|
||||
ISC_FALSE);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
break;
|
||||
/*
|
||||
* If the delete is successful the chain is broken.
|
||||
|
|
@ -287,14 +287,14 @@ compress_add(dns_rbt_t *root, dns_name_t *prefix, dns_name_t *suffix,
|
|||
isc_buffer_init(&target, buffer, sizeof buffer,
|
||||
ISC_BUFFERTYPE_BINARY);
|
||||
result = dns_name_concatenate(&name, suffix, &full, &target);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return;
|
||||
data = isc_mem_get(mctx, sizeof *data);
|
||||
if (data == NULL)
|
||||
return;
|
||||
*data = offset;
|
||||
result = dns_rbt_addname(root, &full, data);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_mem_put(mctx, data, sizeof *data);
|
||||
return;
|
||||
}
|
||||
|
|
@ -339,7 +339,7 @@ compress_find(dns_rbt_t *root, dns_name_t *name, dns_name_t *prefix,
|
|||
dns_fixedname_init(&found);
|
||||
foundname = dns_fixedname_name(&found);
|
||||
result = dns_rbt_findname(root, name, foundname, (void *)&data);
|
||||
if (result != DNS_R_SUCCESS && result != DNS_R_PARTIALMATCH)
|
||||
if (result != ISC_R_SUCCESS && result != DNS_R_PARTIALMATCH)
|
||||
return (ISC_FALSE);
|
||||
if (data == NULL) /* root label */
|
||||
return (ISC_FALSE);
|
||||
|
|
@ -368,7 +368,7 @@ compress_find(dns_rbt_t *root, dns_name_t *name, dns_name_t *prefix,
|
|||
dns_name_getlabelsequence(name, 0, prefixlen, prefix);
|
||||
result = dns_name_concatenate(NULL, foundname, suffix,
|
||||
workspace);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (ISC_FALSE);
|
||||
*offset = *data;
|
||||
return (ISC_TRUE);
|
||||
|
|
@ -380,7 +380,7 @@ compress_find(dns_rbt_t *root, dns_name_t *name, dns_name_t *prefix,
|
|||
*/
|
||||
INSIST(result == DNS_R_PARTIALMATCH);
|
||||
result = dns_name_concatenate(NULL, foundname, suffix, workspace);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (ISC_FALSE);
|
||||
prefixlen = namelabels - foundlabels;
|
||||
dns_name_init(&tmpprefix, NULL);
|
||||
|
|
@ -409,7 +409,7 @@ compress_find(dns_rbt_t *root, dns_name_t *name, dns_name_t *prefix,
|
|||
dns_name_fromregion(&tmpsuffix, ®ion);
|
||||
result = dns_name_concatenate(&tmpprefix, &tmpsuffix, prefix,
|
||||
workspace);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (ISC_FALSE);
|
||||
*offset = *data;
|
||||
return (ISC_TRUE);
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ dns_db_create(isc_mem_t *mctx, char *db_type, dns_name_t *origin,
|
|||
return ((impinfo->create)(mctx, origin, cache, rdclass,
|
||||
argc, argv, dbp));
|
||||
|
||||
return (DNS_R_NOTFOUND);
|
||||
return (ISC_R_NOTFOUND);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -238,7 +238,7 @@ dns_db_load(dns_db_t *db, const char *filename) {
|
|||
dns_rdatacallbacks_init(&callbacks);
|
||||
|
||||
result = dns_db_beginload(db, &callbacks.add, &callbacks.add_private);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
result = dns_master_loadfile(filename, &db->origin, &db->origin,
|
||||
db->rdclass, age_ttl, &soacount, &nscount,
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* $Id: dbtable.c,v 1.13 2000/02/03 23:43:46 halley Exp $
|
||||
* $Id: dbtable.c,v 1.14 2000/04/06 22:01:53 explorer Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
@ -73,11 +73,11 @@ dns_dbtable_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
|
|||
|
||||
dbtable = (dns_dbtable_t *)isc_mem_get(mctx, sizeof(*dbtable));
|
||||
if (dbtable == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
dbtable->rbt = NULL;
|
||||
result = dns_rbt_create(mctx, dbdetach, NULL, &dbtable->rbt);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto clean1;
|
||||
|
||||
iresult = isc_mutex_init(&dbtable->lock);
|
||||
|
|
@ -85,7 +85,7 @@ dns_dbtable_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
|
|||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_lock_init() failed: %s",
|
||||
isc_result_totext(result));
|
||||
result = DNS_R_UNEXPECTED;
|
||||
result = ISC_R_UNEXPECTED;
|
||||
goto clean2;
|
||||
}
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ dns_dbtable_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
|
|||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_rwlock_init() failed: %s",
|
||||
isc_result_totext(result));
|
||||
result = DNS_R_UNEXPECTED;
|
||||
result = ISC_R_UNEXPECTED;
|
||||
goto clean3;
|
||||
}
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ dns_dbtable_create(isc_mem_t *mctx, dns_rdataclass_t rdclass,
|
|||
|
||||
*dbtablep = dbtable;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
clean3:
|
||||
(void)isc_mutex_destroy(&dbtable->lock);
|
||||
|
|
@ -223,7 +223,7 @@ dns_dbtable_remove(dns_dbtable_t *dbtable, dns_db_t *db) {
|
|||
result = dns_rbt_findname(dbtable->rbt, name, NULL,
|
||||
(void **)&stored_data);
|
||||
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
INSIST(stored_data == db);
|
||||
|
||||
dns_rbt_deletename(dbtable->rbt, name, ISC_FALSE);
|
||||
|
|
@ -281,13 +281,13 @@ dns_dbtable_find(dns_dbtable_t *dbtable, dns_name_t *name, dns_db_t **dbp) {
|
|||
result = dns_rbt_findname(dbtable->rbt, name, NULL,
|
||||
(void **)&stored_data);
|
||||
|
||||
if (result == DNS_R_SUCCESS || result == DNS_R_PARTIALMATCH)
|
||||
if (result == ISC_R_SUCCESS || result == DNS_R_PARTIALMATCH)
|
||||
dns_db_attach(stored_data, dbp);
|
||||
else if (dbtable->default_db != NULL) {
|
||||
dns_db_attach(dbtable->default_db, dbp);
|
||||
result = DNS_R_PARTIALMATCH;
|
||||
} else
|
||||
result = DNS_R_NOTFOUND;
|
||||
result = ISC_R_NOTFOUND;
|
||||
|
||||
RWUNLOCK(&dbtable->tree_lock, isc_rwlocktype_read);
|
||||
|
||||
|
|
|
|||
|
|
@ -459,7 +459,7 @@ udp_recv(isc_task_t *task, isc_event_t *ev_in)
|
|||
ISC_BUFFERTYPE_BINARY);
|
||||
isc_buffer_add(&source, ev->n);
|
||||
dres = dns_message_peekheader(&source, &id, &flags);
|
||||
if (dres != DNS_R_SUCCESS) {
|
||||
if (dres != ISC_R_SUCCESS) {
|
||||
free_buffer(disp, ev->region.base, ev->region.length);
|
||||
XDEBUG(("dns_message_peekheader(): %s\n",
|
||||
isc_result_totext(dres)));
|
||||
|
|
@ -518,7 +518,7 @@ udp_recv(isc_task_t *task, isc_event_t *ev_in)
|
|||
isc_buffer_init(&rev->buffer, ev->region.base, ev->region.length,
|
||||
ISC_BUFFERTYPE_BINARY);
|
||||
isc_buffer_add(&rev->buffer, ev->n);
|
||||
rev->result = DNS_R_SUCCESS;
|
||||
rev->result = ISC_R_SUCCESS;
|
||||
rev->id = id;
|
||||
rev->addr = ev->address;
|
||||
attributes = 0;
|
||||
|
|
@ -658,7 +658,7 @@ tcp_recv(isc_task_t *task, isc_event_t *ev_in)
|
|||
* Peek into the buffer to see what we can see.
|
||||
*/
|
||||
dres = dns_message_peekheader(&tcpmsg->buffer, &id, &flags);
|
||||
if (dres != DNS_R_SUCCESS) {
|
||||
if (dres != ISC_R_SUCCESS) {
|
||||
XDEBUG(("dns_message_peekheader(): %s\n",
|
||||
isc_result_totext(dres)));
|
||||
/* XXXMLG log something here... */
|
||||
|
|
@ -714,7 +714,7 @@ tcp_recv(isc_task_t *task, isc_event_t *ev_in)
|
|||
*/
|
||||
dns_tcpmsg_keepbuffer(tcpmsg, &rev->buffer);
|
||||
disp->buffers++;
|
||||
rev->result = DNS_R_SUCCESS;
|
||||
rev->result = ISC_R_SUCCESS;
|
||||
rev->id = id;
|
||||
rev->addr = tcpmsg->address;
|
||||
if (queue_request) {
|
||||
|
|
@ -838,11 +838,11 @@ dns_dispatch_create(isc_mem_t *mctx, isc_socket_t *sock, isc_task_t *task,
|
|||
REQUIRE(socktype == isc_sockettype_udp ||
|
||||
socktype == isc_sockettype_tcp);
|
||||
|
||||
res = DNS_R_SUCCESS;
|
||||
res = ISC_R_SUCCESS;
|
||||
|
||||
disp = isc_mem_get(mctx, sizeof(dns_dispatch_t));
|
||||
if (disp == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
disp->magic = 0;
|
||||
disp->mctx = mctx;
|
||||
|
|
@ -872,7 +872,7 @@ dns_dispatch_create(isc_mem_t *mctx, isc_socket_t *sock, isc_task_t *task,
|
|||
disp->qid_table = isc_mem_get(disp->mctx,
|
||||
buckets * sizeof(dns_displist_t));
|
||||
if (disp->qid_table == NULL) {
|
||||
res = DNS_R_NOMEMORY;
|
||||
res = ISC_R_NOMEMORY;
|
||||
goto out1;
|
||||
}
|
||||
|
||||
|
|
@ -883,7 +883,7 @@ dns_dispatch_create(isc_mem_t *mctx, isc_socket_t *sock, isc_task_t *task,
|
|||
disp->qid_increment = increment;
|
||||
|
||||
if (isc_mutex_init(&disp->lock) != ISC_R_SUCCESS) {
|
||||
res = DNS_R_UNEXPECTED;
|
||||
res = ISC_R_UNEXPECTED;
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__, "isc_mutex_init failed");
|
||||
goto out2;
|
||||
}
|
||||
|
|
@ -891,7 +891,7 @@ dns_dispatch_create(isc_mem_t *mctx, isc_socket_t *sock, isc_task_t *task,
|
|||
disp->epool = NULL;
|
||||
if (isc_mempool_create(mctx, sizeof(dns_dispatchevent_t),
|
||||
&disp->epool) != ISC_R_SUCCESS) {
|
||||
res = DNS_R_NOMEMORY;
|
||||
res = ISC_R_NOMEMORY;
|
||||
goto out3;
|
||||
}
|
||||
isc_mempool_setname(disp->epool, "disp_epool");
|
||||
|
|
@ -899,7 +899,7 @@ dns_dispatch_create(isc_mem_t *mctx, isc_socket_t *sock, isc_task_t *task,
|
|||
disp->bpool = NULL;
|
||||
if (isc_mempool_create(mctx, maxbuffersize,
|
||||
&disp->bpool) != ISC_R_SUCCESS) {
|
||||
res = DNS_R_NOMEMORY;
|
||||
res = ISC_R_NOMEMORY;
|
||||
goto out4;
|
||||
}
|
||||
isc_mempool_setmaxalloc(disp->bpool, maxbuffers);
|
||||
|
|
@ -908,7 +908,7 @@ dns_dispatch_create(isc_mem_t *mctx, isc_socket_t *sock, isc_task_t *task,
|
|||
disp->rpool = NULL;
|
||||
if (isc_mempool_create(mctx, sizeof(dns_dispentry_t),
|
||||
&disp->rpool) != ISC_R_SUCCESS) {
|
||||
res = DNS_R_NOMEMORY;
|
||||
res = ISC_R_NOMEMORY;
|
||||
goto out5;
|
||||
}
|
||||
isc_mempool_setname(disp->rpool, "disp_rpool");
|
||||
|
|
@ -931,7 +931,7 @@ dns_dispatch_create(isc_mem_t *mctx, isc_socket_t *sock, isc_task_t *task,
|
|||
|
||||
disp->failsafe_ev = allocate_event(disp);
|
||||
if (disp->failsafe_ev == NULL) {
|
||||
res = DNS_R_NOMEMORY;
|
||||
res = ISC_R_NOMEMORY;
|
||||
goto out6;
|
||||
}
|
||||
|
||||
|
|
@ -964,7 +964,7 @@ dns_dispatch_create(isc_mem_t *mctx, isc_socket_t *sock, isc_task_t *task,
|
|||
|
||||
*dispp = disp;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
/*
|
||||
* error returns
|
||||
|
|
@ -1076,13 +1076,13 @@ dns_dispatch_addresponse(dns_dispatch_t *disp, isc_sockaddr_t *dest,
|
|||
|
||||
if (!ok) {
|
||||
UNLOCK(&disp->lock);
|
||||
return (DNS_R_NOMORE);
|
||||
return (ISC_R_NOMORE);
|
||||
}
|
||||
|
||||
res = isc_mempool_get(disp->rpool);
|
||||
if (res == NULL) {
|
||||
UNLOCK(&disp->lock);
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
|
||||
disp->refcount++;
|
||||
|
|
@ -1112,7 +1112,7 @@ dns_dispatch_addresponse(dns_dispatch_t *disp, isc_sockaddr_t *dest,
|
|||
*idp = id;
|
||||
*resp = res;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1237,7 +1237,7 @@ dns_dispatch_addrequest(dns_dispatch_t *disp,
|
|||
res = isc_mempool_get(disp->rpool);
|
||||
if (res == NULL) {
|
||||
UNLOCK(&disp->lock);
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
|
||||
disp->refcount++;
|
||||
|
|
@ -1268,7 +1268,7 @@ dns_dispatch_addrequest(dns_dispatch_t *disp,
|
|||
|
||||
*resp = res;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* $Id: dnssec.c,v 1.25 2000/03/29 01:32:20 bwelling Exp $
|
||||
* $Id: dnssec.c,v 1.26 2000/04/06 22:01:55 explorer Exp $
|
||||
* Principal Author: Brian Wellington
|
||||
*/
|
||||
|
||||
|
|
@ -313,7 +313,7 @@ dns_dnssec_sign(dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
|
|||
goto cleanup_array;
|
||||
isc_buffer_used(&sigbuf, &r);
|
||||
if (r.length != sig.siglen) {
|
||||
ret = DNS_R_NOSPACE;
|
||||
ret = ISC_R_NOSPACE;
|
||||
goto cleanup_array;
|
||||
}
|
||||
memcpy(sig.signature, r.base, sig.siglen);
|
||||
|
|
@ -503,7 +503,7 @@ dns_dnssec_findzonekeys(dns_db_t *db, dns_dbversion_t *ver,
|
|||
pubkey = NULL;
|
||||
result = dns_rdataset_next(&rdataset);
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
goto failure;
|
||||
if (count == 0)
|
||||
result = ISC_R_NOTFOUND;
|
||||
|
|
|
|||
|
|
@ -26,22 +26,6 @@
|
|||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
/*
|
||||
* XXXRTH Legacy result codes, to be eliminated before public release.
|
||||
*/
|
||||
#define DNS_R_SUCCESS ISC_R_SUCCESS
|
||||
#define DNS_R_NOMEMORY ISC_R_NOMEMORY
|
||||
#define DNS_R_NOSPACE ISC_R_NOSPACE
|
||||
#define DNS_R_NOTIMPLEMENTED ISC_R_NOTIMPLEMENTED
|
||||
#define DNS_R_NOMORE ISC_R_NOMORE
|
||||
#define DNS_R_EXISTS ISC_R_EXISTS
|
||||
#define DNS_R_NOTFOUND ISC_R_NOTFOUND
|
||||
#define DNS_R_BADBASE64 ISC_R_BADBASE64
|
||||
#define DNS_R_TIMEDOUT ISC_R_TIMEDOUT
|
||||
#define DNS_R_CANCELED ISC_R_CANCELED
|
||||
#define DNS_R_UNEXPECTED ISC_R_UNEXPECTED
|
||||
#define DNS_R_NXRDATASET DNS_R_NXRRSET
|
||||
|
||||
/*
|
||||
* DNS library result codes
|
||||
*/
|
||||
|
|
@ -51,7 +35,7 @@ ISC_LANG_BEGINDECLS
|
|||
#define DNS_R_BITSTRINGTOOLONG (ISC_RESULTCLASS_DNS + 3)
|
||||
#define DNS_R_EMPTYLABEL (ISC_RESULTCLASS_DNS + 4)
|
||||
#define DNS_R_BADDOTTEDQUAD (ISC_RESULTCLASS_DNS + 5)
|
||||
#define DNS_R_UNEXPECTEDEND (ISC_RESULTCLASS_DNS + 6)
|
||||
/* 6 is unused */
|
||||
#define DNS_R_UNKNOWN (ISC_RESULTCLASS_DNS + 7)
|
||||
#define DNS_R_BADLABELTYPE (ISC_RESULTCLASS_DNS + 8)
|
||||
#define DNS_R_BADPOINTER (ISC_RESULTCLASS_DNS + 9)
|
||||
|
|
@ -67,7 +51,7 @@ ISC_LANG_BEGINDECLS
|
|||
#define DNS_R_NOOWNER (ISC_RESULTCLASS_DNS + 19)
|
||||
#define DNS_R_NOTTL (ISC_RESULTCLASS_DNS + 20)
|
||||
#define DNS_R_BADCLASS (ISC_RESULTCLASS_DNS + 21)
|
||||
#define DNS_R_UNEXPECTEDTOKEN (ISC_RESULTCLASS_DNS + 22)
|
||||
/* 22 is unused */
|
||||
#define DNS_R_PARTIALMATCH (ISC_RESULTCLASS_DNS + 23)
|
||||
#define DNS_R_NEWORIGIN (ISC_RESULTCLASS_DNS + 24)
|
||||
#define DNS_R_UNCHANGED (ISC_RESULTCLASS_DNS + 25)
|
||||
|
|
|
|||
|
|
@ -134,22 +134,22 @@ dns_db_getsoaserial(dns_db_t *db, dns_dbversion_t *ver, isc_uint32_t *serialp)
|
|||
REQUIRE(dns_db_iszone(db));
|
||||
|
||||
result = dns_db_findnode(db, dns_db_origin(db), ISC_FALSE, &node);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
dns_rdataset_init(&rdataset);
|
||||
result = dns_db_findrdataset(db, node, ver, dns_rdatatype_soa, 0,
|
||||
(isc_stdtime_t) 0, &rdataset, NULL);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto freenode;
|
||||
|
||||
result = dns_rdataset_first(&rdataset);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto freerdataset;
|
||||
dns_rdataset_current(&rdataset, &rdata);
|
||||
|
||||
*serialp = dns_soa_getserial(&rdata);
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
|
||||
freerdataset:
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
|
|
@ -175,17 +175,17 @@ dns_db_createsoatuple(dns_db_t *db, dns_dbversion_t *ver, isc_mem_t *mctx,
|
|||
|
||||
node = NULL;
|
||||
result = dns_db_findnode(db, zonename, ISC_FALSE, &node);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto nonode;
|
||||
|
||||
dns_rdataset_init(&rdataset);
|
||||
result = dns_db_findrdataset(db, node, ver, dns_rdatatype_soa, 0,
|
||||
(isc_stdtime_t) 0, &rdataset, NULL);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto freenode;
|
||||
|
||||
result = dns_rdataset_first(&rdataset);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto freenode;
|
||||
|
||||
dns_rdataset_current(&rdataset, &rdata);
|
||||
|
|
@ -228,7 +228,7 @@ dns_difftuple_create(isc_mem_t *mctx,
|
|||
size = sizeof(*t) + name->length + rdata->length;
|
||||
t = isc_mem_allocate(mctx, size);
|
||||
if (t == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
t->mctx = mctx;
|
||||
t->op = op;
|
||||
|
||||
|
|
@ -255,7 +255,7 @@ dns_difftuple_create(isc_mem_t *mctx,
|
|||
INSIST(datap == (unsigned char *) t + size);
|
||||
|
||||
*tp = t;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -457,8 +457,8 @@ dns_diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver)
|
|||
isc_log_write(JOURNAL_COMMON_LOGARGS,
|
||||
ISC_LOG_WARNING,
|
||||
"update with no effect");
|
||||
} else if (result == DNS_R_SUCCESS ||
|
||||
result == DNS_R_NXRDATASET) {
|
||||
} else if (result == ISC_R_SUCCESS ||
|
||||
result == DNS_R_NXRRSET) {
|
||||
/* OK */
|
||||
} else {
|
||||
CHECK(result);
|
||||
|
|
@ -466,7 +466,7 @@ dns_diff_apply(dns_diff_t *diff, dns_db_t *db, dns_dbversion_t *ver)
|
|||
}
|
||||
dns_db_detachnode(db, &node);
|
||||
}
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
failure:
|
||||
if (node != NULL)
|
||||
|
|
@ -525,15 +525,15 @@ dns_diff_load(dns_diff_t *diff, dns_addrdatasetfunc_t addfunc,
|
|||
isc_log_write(JOURNAL_COMMON_LOGARGS,
|
||||
ISC_LOG_WARNING,
|
||||
"update with no effect");
|
||||
} else if (result == DNS_R_SUCCESS ||
|
||||
result == DNS_R_NXRDATASET) {
|
||||
} else if (result == ISC_R_SUCCESS ||
|
||||
result == DNS_R_NXRRSET) {
|
||||
/* OK */
|
||||
} else {
|
||||
CHECK(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
failure:
|
||||
return (result);
|
||||
}
|
||||
|
|
@ -558,7 +558,7 @@ dns_diff_sort(dns_diff_t *diff, dns_diff_compare_func *compare) {
|
|||
return (ISC_R_SUCCESS);
|
||||
v = isc_mem_get(diff->mctx, length * sizeof(dns_difftuple_t *));
|
||||
if (v == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
i = 0;
|
||||
for (i = 0; i < length; i++) {
|
||||
p = ISC_LIST_HEAD(diff->tuples);
|
||||
|
|
@ -610,7 +610,7 @@ dns_diff_print(dns_diff_t *diff, FILE *file) {
|
|||
|
||||
mem = isc_mem_get(diff->mctx, size);
|
||||
if (mem == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
for (t = ISC_LIST_HEAD(diff->tuples); t != NULL;
|
||||
t = ISC_LIST_NEXT(t, link))
|
||||
|
|
@ -622,11 +622,11 @@ dns_diff_print(dns_diff_t *diff, FILE *file) {
|
|||
dns_rdataset_t rds;
|
||||
|
||||
result = diff_tuple_tordataset(t, &rdl, &rds);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"diff_tuple_tordataset failed: %s",
|
||||
dns_result_totext(result));
|
||||
result = DNS_R_UNEXPECTED;
|
||||
result = ISC_R_UNEXPECTED;
|
||||
goto cleanup;
|
||||
}
|
||||
again:
|
||||
|
|
@ -638,17 +638,17 @@ dns_diff_print(dns_diff_t *diff, FILE *file) {
|
|||
INSIST(buf.used >= 1 && ((char *) buf.base)[buf.used-1] == '\n');
|
||||
buf.used--;
|
||||
|
||||
if (result == DNS_R_NOSPACE) {
|
||||
if (result == ISC_R_NOSPACE) {
|
||||
isc_mem_put(diff->mctx, mem, size);
|
||||
size += 1024;
|
||||
mem = isc_mem_get(diff->mctx, size);
|
||||
if (mem == NULL) {
|
||||
result = DNS_R_NOMEMORY;
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
goto again;
|
||||
}
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
isc_buffer_used(&buf, &r);
|
||||
if (file != NULL)
|
||||
fprintf(file, "%s %.*s\n",
|
||||
|
|
@ -665,7 +665,7 @@ dns_diff_print(dns_diff_t *diff, FILE *file) {
|
|||
} else
|
||||
goto cleanup;
|
||||
}
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
cleanup:
|
||||
if (mem != NULL)
|
||||
isc_mem_put(diff->mctx, mem, size);
|
||||
|
|
@ -929,10 +929,10 @@ journal_seek(dns_journal_t *j, isc_uint32_t offset) {
|
|||
isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
|
||||
"%s: seek: %s",
|
||||
j->filename, strerror(errno));
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
j->offset = offset;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -943,14 +943,14 @@ journal_read(dns_journal_t *j, void *mem, size_t nbytes) {
|
|||
nread = fread(mem, 1, nbytes, j->fp);
|
||||
if (nread != nbytes) {
|
||||
if (feof(j->fp))
|
||||
return (DNS_R_NOMORE);
|
||||
return (ISC_R_NOMORE);
|
||||
isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
|
||||
"%s: read: %s",
|
||||
j->filename, strerror(errno));
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
j->offset += nbytes;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -963,10 +963,10 @@ journal_write(dns_journal_t *j, void *mem, size_t nbytes) {
|
|||
isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
|
||||
"%s: write: %s",
|
||||
j->filename, strerror(errno));
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
j->offset += nbytes;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -978,7 +978,7 @@ journal_fsync(dns_journal_t *j) {
|
|||
"%s: fflush: %s",
|
||||
j->filename,
|
||||
strerror(errno));
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
r = fsync(fileno(j->fp));
|
||||
if (r < 0) {
|
||||
|
|
@ -986,9 +986,9 @@ journal_fsync(dns_journal_t *j) {
|
|||
"%s: fsync: %s",
|
||||
j->filename,
|
||||
strerror(errno));
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/* Read/write a transaction header at the current file position. */
|
||||
|
|
@ -998,12 +998,12 @@ journal_read_xhdr(dns_journal_t *j, journal_xhdr_t *xhdr) {
|
|||
journal_rawxhdr_t raw;
|
||||
isc_result_t result;
|
||||
result = journal_read(j, &raw, sizeof(raw));
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
xhdr->size = decode_uint32(raw.size);
|
||||
xhdr->serial0 = decode_uint32(raw.serial0);
|
||||
xhdr->serial1 = decode_uint32(raw.serial1);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -1025,10 +1025,10 @@ journal_read_rrhdr(dns_journal_t *j, journal_rrhdr_t *rrhdr) {
|
|||
journal_rawrrhdr_t raw;
|
||||
isc_result_t result;
|
||||
result = journal_read(j, &raw, sizeof(raw));
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
rrhdr->size = decode_uint32(raw.size);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -1049,7 +1049,7 @@ journal_file_create(isc_mem_t *mctx, const char *filename) {
|
|||
isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
|
||||
"%s: create: %s",
|
||||
filename, strerror(errno));
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
|
||||
header = initial_journal_header;
|
||||
|
|
@ -1063,7 +1063,7 @@ journal_file_create(isc_mem_t *mctx, const char *filename) {
|
|||
if (mem == NULL) {
|
||||
(void) fclose(fp);
|
||||
(void) unlink(filename);
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
memset(mem, 0, size);
|
||||
memcpy(mem, &rawheader, sizeof(rawheader));
|
||||
|
|
@ -1076,7 +1076,7 @@ journal_file_create(isc_mem_t *mctx, const char *filename) {
|
|||
(void) fclose(fp);
|
||||
(void) unlink(filename);
|
||||
isc_mem_put(mctx, mem, size);
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
isc_mem_put(mctx, mem, size);
|
||||
|
||||
|
|
@ -1086,10 +1086,10 @@ journal_file_create(isc_mem_t *mctx, const char *filename) {
|
|||
"%s: close: %s",
|
||||
filename, strerror(errno));
|
||||
(void) unlink(filename);
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1132,7 +1132,7 @@ dns_journal_open(isc_mem_t *mctx, const char *filename, isc_boolean_t write,
|
|||
isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
|
||||
"%s: open: %s",
|
||||
j->filename, strerror(errno));
|
||||
FAIL(DNS_R_UNEXPECTED);
|
||||
FAIL(ISC_R_UNEXPECTED);
|
||||
}
|
||||
|
||||
j->fp = fp;
|
||||
|
|
@ -1148,7 +1148,7 @@ dns_journal_open(isc_mem_t *mctx, const char *filename, isc_boolean_t write,
|
|||
isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
|
||||
"%s: journal format not recognized",
|
||||
j->filename);
|
||||
FAIL(DNS_R_UNEXPECTED);
|
||||
FAIL(ISC_R_UNEXPECTED);
|
||||
}
|
||||
journal_header_decode(&rawheader, &j->header);
|
||||
|
||||
|
|
@ -1161,7 +1161,7 @@ dns_journal_open(isc_mem_t *mctx, const char *filename, isc_boolean_t write,
|
|||
isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
|
||||
"%s: journal unexpectedly empty",
|
||||
j->filename);
|
||||
FAIL(DNS_R_UNEXPECTED);
|
||||
FAIL(ISC_R_UNEXPECTED);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1203,7 +1203,7 @@ dns_journal_open(isc_mem_t *mctx, const char *filename, isc_boolean_t write,
|
|||
write ? JOURNAL_STATE_WRITE : JOURNAL_STATE_READ;
|
||||
|
||||
*journalp = j;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
failure:
|
||||
j->magic = 0;
|
||||
|
|
@ -1259,13 +1259,13 @@ ixfr_order(const void *av, const void *bv)
|
|||
* *pos refers to a valid journal transaction.
|
||||
*
|
||||
* Ensures:
|
||||
* When DNS_R_SUCCESS is returned,
|
||||
* When ISC_R_SUCCESS is returned,
|
||||
* *pos refers to the next journal transaction.
|
||||
*
|
||||
* Returns one of:
|
||||
*
|
||||
* DNS_R_SUCCESS
|
||||
* DNS_R_NOMORE *pos pointed at the last transaction
|
||||
* ISC_R_SUCCESS
|
||||
* ISC_R_NOMORE *pos pointed at the last transaction
|
||||
* Other results due to file errors are possible.
|
||||
*/
|
||||
static isc_result_t
|
||||
|
|
@ -1275,15 +1275,15 @@ journal_next(dns_journal_t *j, journal_pos_t *pos) {
|
|||
REQUIRE(DNS_JOURNAL_VALID(j));
|
||||
|
||||
result = journal_seek(j, pos->offset);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
/*
|
||||
* Read the header of the current transaction.
|
||||
* This will return DNS_R_NOMORE if we are at EOF.
|
||||
* This will return ISC_R_NOMORE if we are at EOF.
|
||||
*/
|
||||
result = journal_read_xhdr(j, &xhdr);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
/* Check serial number consistency. */
|
||||
|
|
@ -1293,7 +1293,7 @@ journal_next(dns_journal_t *j, journal_pos_t *pos) {
|
|||
"expected serial %u, got %u",
|
||||
j->filename,
|
||||
pos->serial, xhdr.serial0);
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
|
||||
/* Check for offset wraparound. */
|
||||
|
|
@ -1301,12 +1301,12 @@ journal_next(dns_journal_t *j, journal_pos_t *pos) {
|
|||
isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
|
||||
"%s: offset too large",
|
||||
j->filename);
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
|
||||
pos->offset += sizeof(journal_rawxhdr_t) + xhdr.size;
|
||||
pos->serial = xhdr.serial1;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1388,16 +1388,16 @@ index_invalidate(dns_journal_t *j, isc_uint32_t serial)
|
|||
* Try to find a transaction with initial serial number 'serial'
|
||||
* in the journal 'j'.
|
||||
*
|
||||
* If found, store its position at '*pos' and return DNS_R_SUCCESS.
|
||||
* If found, store its position at '*pos' and return ISC_R_SUCCESS.
|
||||
*
|
||||
* If 'serial' is current (= the ending serial number of the
|
||||
* last transaction in the journal), set '*pos' to
|
||||
* the position immediately following the last transaction and
|
||||
* return DNS_R_SUCCESS.
|
||||
* return ISC_R_SUCCESS.
|
||||
*
|
||||
* If 'serial' is within the range of addressable serial numbers
|
||||
* covered by the journal but that particular serial number is missing
|
||||
* (from the journal, not just from the index), return DNS_R_NOTFOUND.
|
||||
* (from the journal, not just from the index), return ISC_R_NOTFOUND.
|
||||
*
|
||||
* If 'serial' is outside the range of addressable serial numbers
|
||||
* covered by the journal, return DNS_R_RANGE.
|
||||
|
|
@ -1415,7 +1415,7 @@ journal_find(dns_journal_t *j, isc_uint32_t serial, journal_pos_t *pos) {
|
|||
return (DNS_R_RANGE);
|
||||
if (serial == j->header.end.serial) {
|
||||
*pos = j->header.end;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
current_pos = j->header.begin;
|
||||
|
|
@ -1423,13 +1423,13 @@ journal_find(dns_journal_t *j, isc_uint32_t serial, journal_pos_t *pos) {
|
|||
|
||||
while (current_pos.serial != serial) {
|
||||
if (DNS_SERIAL_GT(current_pos.serial, serial))
|
||||
return (DNS_R_NOTFOUND);
|
||||
return (ISC_R_NOTFOUND);
|
||||
result = journal_next(j, ¤t_pos);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
*pos = current_pos;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -1467,7 +1467,7 @@ dns_journal_begin_transaction(dns_journal_t *j) {
|
|||
j->x.pos[1].offset = j->offset;
|
||||
|
||||
j->state = JOURNAL_STATE_TRANSACTION;
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
failure:
|
||||
return (result);
|
||||
}
|
||||
|
|
@ -1509,7 +1509,7 @@ dns_journal_writediff(dns_journal_t *j, dns_diff_t *diff) {
|
|||
|
||||
mem = isc_mem_get(j->mctx, size);
|
||||
if (mem == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
isc_buffer_init(&buffer, mem, size, ISC_BUFFERTYPE_BINARY);
|
||||
|
||||
|
|
@ -1542,7 +1542,7 @@ dns_journal_writediff(dns_journal_t *j, dns_diff_t *diff) {
|
|||
/* Write the buffer contents to the journal file. */
|
||||
CHECK(journal_write(j, used.base, used.length));
|
||||
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
|
||||
failure:
|
||||
if (mem != NULL)
|
||||
|
|
@ -1585,7 +1585,7 @@ dns_journal_commit(dns_journal_t *j) {
|
|||
j->filename,
|
||||
j->header.end.serial,
|
||||
j->x.pos[0].serial);
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1650,7 +1650,7 @@ dns_journal_commit(dns_journal_t *j) {
|
|||
/* We no longer have a transaction open. */
|
||||
j->state = JOURNAL_STATE_WRITE;
|
||||
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
|
||||
failure:
|
||||
return (result);
|
||||
|
|
@ -1663,7 +1663,7 @@ dns_journal_write_transaction(dns_journal_t *j, dns_diff_t *diff) {
|
|||
CHECK(dns_journal_begin_transaction(j));
|
||||
CHECK(dns_journal_writediff(j, diff));
|
||||
CHECK(dns_journal_commit(j));
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
failure:
|
||||
return (result);
|
||||
}
|
||||
|
|
@ -1749,7 +1749,7 @@ roll_forward(dns_journal_t *j, dns_db_t *db) {
|
|||
CHECK(dns_journal_iter_init(j, db_serial, end_serial));
|
||||
|
||||
for (result = dns_journal_first_rr(j);
|
||||
result == DNS_R_SUCCESS;
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_journal_next_rr(j))
|
||||
{
|
||||
dns_name_t *name;
|
||||
|
|
@ -1770,7 +1770,7 @@ roll_forward(dns_journal_t *j, dns_db_t *db) {
|
|||
isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
|
||||
"%s: journal file corrupt: missing "
|
||||
"initial SOA", j->filename);
|
||||
FAIL(DNS_R_UNEXPECTED);
|
||||
FAIL(ISC_R_UNEXPECTED);
|
||||
}
|
||||
CHECK(dns_difftuple_create(diff.mctx, n_soa == 1 ?
|
||||
DNS_DIFFOP_DEL : DNS_DIFFOP_ADD,
|
||||
|
|
@ -1786,8 +1786,8 @@ roll_forward(dns_journal_t *j, dns_db_t *db) {
|
|||
n_put = 0;
|
||||
}
|
||||
}
|
||||
if (result == DNS_R_NOMORE)
|
||||
result = DNS_R_SUCCESS;
|
||||
if (result == ISC_R_NOMORE)
|
||||
result = ISC_R_SUCCESS;
|
||||
CHECK(result);
|
||||
|
||||
if (n_put != 0) {
|
||||
|
|
@ -1800,7 +1800,7 @@ roll_forward(dns_journal_t *j, dns_db_t *db) {
|
|||
|
||||
failure:
|
||||
if (ver != NULL)
|
||||
dns_db_closeversion(db, &ver, result == DNS_R_SUCCESS ?
|
||||
dns_db_closeversion(db, &ver, result == ISC_R_SUCCESS ?
|
||||
ISC_TRUE : ISC_FALSE);
|
||||
|
||||
if (source.base != NULL)
|
||||
|
|
@ -1823,12 +1823,12 @@ dns_journal_rollforward(isc_mem_t *mctx, dns_db_t *db, const char *filename) {
|
|||
|
||||
j = NULL;
|
||||
result = dns_journal_open(mctx, filename, ISC_FALSE, &j);
|
||||
if (result == DNS_R_NOTFOUND) {
|
||||
if (result == ISC_R_NOTFOUND) {
|
||||
isc_log_write(JOURNAL_DEBUG_LOGARGS(3),
|
||||
"no journal file, but that's OK");
|
||||
return (DNS_R_NOJOURNAL);
|
||||
}
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
result = roll_forward(j, db);
|
||||
|
||||
|
|
@ -1853,12 +1853,12 @@ dns_journal_print(isc_mem_t *mctx, const char *filename, FILE *file) {
|
|||
|
||||
j = NULL;
|
||||
result = dns_journal_open(mctx, filename, ISC_FALSE, &j);
|
||||
if (result == DNS_R_NOTFOUND) {
|
||||
if (result == ISC_R_NOTFOUND) {
|
||||
isc_log_write(JOURNAL_DEBUG_LOGARGS(3), "no journal file");
|
||||
return (DNS_R_NOJOURNAL);
|
||||
}
|
||||
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
|
||||
"journal open failure");
|
||||
return (result);
|
||||
|
|
@ -1880,7 +1880,7 @@ dns_journal_print(isc_mem_t *mctx, const char *filename, FILE *file) {
|
|||
CHECK(dns_journal_iter_init(j, start_serial, end_serial));
|
||||
|
||||
for (result = dns_journal_first_rr(j);
|
||||
result == DNS_R_SUCCESS;
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_journal_next_rr(j))
|
||||
{
|
||||
dns_name_t *name;
|
||||
|
|
@ -1901,7 +1901,7 @@ dns_journal_print(isc_mem_t *mctx, const char *filename, FILE *file) {
|
|||
isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
|
||||
"%s: journal file corrupt: missing "
|
||||
"initial SOA", j->filename);
|
||||
FAIL(DNS_R_UNEXPECTED);
|
||||
FAIL(ISC_R_UNEXPECTED);
|
||||
}
|
||||
CHECK(dns_difftuple_create(diff.mctx, n_soa == 1 ?
|
||||
DNS_DIFFOP_DEL : DNS_DIFFOP_ADD,
|
||||
|
|
@ -1912,12 +1912,12 @@ dns_journal_print(isc_mem_t *mctx, const char *filename, FILE *file) {
|
|||
result = dns_diff_print(&diff, file);
|
||||
dns_diff_clear(&diff);
|
||||
n_put = 0;
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (result == DNS_R_NOMORE)
|
||||
result = DNS_R_SUCCESS;
|
||||
if (result == ISC_R_NOMORE)
|
||||
result = ISC_R_SUCCESS;
|
||||
CHECK(result);
|
||||
|
||||
if (n_put != 0) {
|
||||
|
|
@ -1982,14 +1982,14 @@ size_buffer(isc_mem_t *mctx, isc_buffer_t *b, unsigned size) {
|
|||
if (b->length < size) {
|
||||
void *mem = isc_mem_get(mctx, size);
|
||||
if (mem == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
if (b->base != NULL)
|
||||
isc_mem_put(mctx, b->base, b->length);
|
||||
b->base = mem;
|
||||
b->length = size;
|
||||
}
|
||||
isc_buffer_clear(b);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -2004,7 +2004,7 @@ dns_journal_iter_init(dns_journal_t *j,
|
|||
CHECK(journal_find(j, end_serial, &j->it.epos));
|
||||
INSIST(j->it.epos.serial == end_serial);
|
||||
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
failure:
|
||||
j->it.result = result;
|
||||
return (j->it.result);
|
||||
|
|
@ -2051,7 +2051,7 @@ read_one_rr(dns_journal_t *j) {
|
|||
*/
|
||||
INSIST(j->offset <= j->it.epos.offset);
|
||||
if (j->offset == j->it.epos.offset)
|
||||
return (DNS_R_NOMORE);
|
||||
return (ISC_R_NOMORE);
|
||||
if (j->it.xpos == j->it.xsize) {
|
||||
/*
|
||||
* We are at a transaction boundary.
|
||||
|
|
@ -2061,7 +2061,7 @@ read_one_rr(dns_journal_t *j) {
|
|||
if (xhdr.size == 0) {
|
||||
isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
|
||||
"journal corrupt: empty transaction");
|
||||
FAIL(DNS_R_UNEXPECTED);
|
||||
FAIL(ISC_R_UNEXPECTED);
|
||||
}
|
||||
if (xhdr.serial0 != j->it.current_serial) {
|
||||
isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
|
||||
|
|
@ -2069,7 +2069,7 @@ read_one_rr(dns_journal_t *j) {
|
|||
"expected serial %u, got %u",
|
||||
j->filename,
|
||||
j->it.current_serial, xhdr.serial0);
|
||||
FAIL(DNS_R_UNEXPECTED);
|
||||
FAIL(ISC_R_UNEXPECTED);
|
||||
}
|
||||
j->it.xsize = xhdr.size;
|
||||
j->it.xpos = 0;
|
||||
|
|
@ -2087,7 +2087,7 @@ read_one_rr(dns_journal_t *j) {
|
|||
isc_log_write(JOURNAL_COMMON_LOGARGS, ISC_LOG_ERROR,
|
||||
"%s: journal corrupt: impossible RR size "
|
||||
"(%d bytes)", j->filename, rrhdr.size);
|
||||
FAIL(DNS_R_UNEXPECTED);
|
||||
FAIL(ISC_R_UNEXPECTED);
|
||||
}
|
||||
|
||||
CHECK(size_buffer(j->mctx, &j->it.source, rrhdr.size));
|
||||
|
|
@ -2135,7 +2135,7 @@ read_one_rr(dns_journal_t *j) {
|
|||
j->it.current_serial = dns_soa_getserial(&j->it.rdata);
|
||||
}
|
||||
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
|
||||
failure:
|
||||
j->it.result = result;
|
||||
|
|
@ -2152,7 +2152,7 @@ void
|
|||
dns_journal_current_rr(dns_journal_t *j, dns_name_t **name, isc_uint32_t *ttl,
|
||||
dns_rdata_t **rdata)
|
||||
{
|
||||
REQUIRE(j->it.result == DNS_R_SUCCESS);
|
||||
REQUIRE(j->it.result == ISC_R_SUCCESS);
|
||||
*name = &j->it.name;
|
||||
*ttl = j->it.ttl;
|
||||
*rdata = &j->it.rdata;
|
||||
|
|
@ -2183,15 +2183,15 @@ get_name_diff(dns_db_t *db, dns_dbversion_t *ver, isc_stdtime_t now,
|
|||
dns_difftuple_t *tuple = NULL;
|
||||
|
||||
result = dns_dbiterator_current(dbit, &node, name);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
result = dns_db_allrdatasets(db, node, ver, now, &rdsiter);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_node;
|
||||
|
||||
for (result = dns_rdatasetiter_first(rdsiter);
|
||||
result == DNS_R_SUCCESS;
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_rdatasetiter_next(rdsiter))
|
||||
{
|
||||
dns_rdataset_t rdataset;
|
||||
|
|
@ -2200,7 +2200,7 @@ get_name_diff(dns_db_t *db, dns_dbversion_t *ver, isc_stdtime_t now,
|
|||
dns_rdatasetiter_current(rdsiter, &rdataset);
|
||||
|
||||
for (result = dns_rdataset_first(&rdataset);
|
||||
result == DNS_R_SUCCESS;
|
||||
result == ISC_R_SUCCESS;
|
||||
result = dns_rdataset_next(&rdataset))
|
||||
{
|
||||
dns_rdata_t rdata;
|
||||
|
|
@ -2208,20 +2208,20 @@ get_name_diff(dns_db_t *db, dns_dbversion_t *ver, isc_stdtime_t now,
|
|||
result = dns_difftuple_create(diff->mctx, op, name,
|
||||
rdataset.ttl, &rdata,
|
||||
&tuple);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
goto cleanup_iterator;
|
||||
}
|
||||
dns_diff_append(diff, &tuple);
|
||||
}
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
goto cleanup_iterator;
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
goto cleanup_iterator;
|
||||
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
|
||||
cleanup_iterator:
|
||||
dns_rdatasetiter_destroy(&rdsiter);
|
||||
|
|
@ -2341,7 +2341,7 @@ dns_db_diff(isc_mem_t *mctx,
|
|||
|
||||
for (;;) {
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (! have[i] && itresult[i] == DNS_R_SUCCESS) {
|
||||
if (! have[i] && itresult[i] == ISC_R_SUCCESS) {
|
||||
CHECK(get_name_diff(db[i], ver[i], 0, dbit[i],
|
||||
dns_fixedname_name(&fixname[i]),
|
||||
i == 0 ?
|
||||
|
|
@ -2392,9 +2392,9 @@ dns_db_diff(isc_mem_t *mctx,
|
|||
have[0] = have[1] = ISC_FALSE;
|
||||
next: ;
|
||||
}
|
||||
if (itresult[0] != DNS_R_NOMORE)
|
||||
if (itresult[0] != ISC_R_NOMORE)
|
||||
FAIL(itresult[0]);
|
||||
if (itresult[1] != DNS_R_NOMORE)
|
||||
if (itresult[1] != ISC_R_NOMORE)
|
||||
FAIL(itresult[1]);
|
||||
|
||||
if (ISC_LIST_EMPTY(resultdiff.tuples)) {
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ dns_keytable_create(isc_mem_t *mctx, dns_keytable_t **keytablep) {
|
|||
|
||||
keytable = isc_mem_get(mctx, sizeof *keytable);
|
||||
if (keytable == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
keytable->table = NULL;
|
||||
result = dns_rbt_create(mctx, free_keynode, mctx, &keytable->table);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: master.c,v 1.46 2000/03/29 21:01:29 halley Exp $ */
|
||||
/* $Id: master.c,v 1.47 2000/04/06 22:02:00 explorer Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -114,9 +114,9 @@ static isc_boolean_t on_list(dns_rdatalist_t *this, dns_rdata_t *rdata);
|
|||
do { \
|
||||
result = gettoken(lexer, options, token, eol, callbacks); \
|
||||
switch (result) { \
|
||||
case DNS_R_SUCCESS: \
|
||||
case ISC_R_SUCCESS: \
|
||||
break; \
|
||||
case DNS_R_UNEXPECTED: \
|
||||
case ISC_R_UNEXPECTED: \
|
||||
goto cleanup; \
|
||||
default: \
|
||||
goto error_cleanup; \
|
||||
|
|
@ -135,12 +135,12 @@ gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *token,
|
|||
if (result != ISC_R_SUCCESS) {
|
||||
switch (result) {
|
||||
case ISC_R_NOMEMORY:
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
default:
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_lex_gettoken() failed: %s",
|
||||
isc_result_totext(result));
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
|
@ -154,9 +154,9 @@ gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *token,
|
|||
(token->type ==
|
||||
isc_tokentype_eol) ?
|
||||
"line" : "file");
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
}
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -190,7 +190,7 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
|||
isc_boolean_t read_till_eol = ISC_FALSE;
|
||||
char *include_file = NULL;
|
||||
isc_token_t token;
|
||||
isc_result_t result = DNS_R_UNEXPECTED;
|
||||
isc_result_t result = ISC_R_UNEXPECTED;
|
||||
rdatalist_head_t glue_list;
|
||||
rdatalist_head_t current_list;
|
||||
dns_rdatalist_t *this;
|
||||
|
|
@ -248,7 +248,7 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
|||
*/
|
||||
target_mem = isc_mem_get(mctx, target_size);
|
||||
if (target_mem == NULL) {
|
||||
result = DNS_R_NOMEMORY;
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto error_cleanup;
|
||||
}
|
||||
isc_buffer_init(&target, target_mem, target_size,
|
||||
|
|
@ -305,7 +305,7 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
|||
result =
|
||||
dns_ttl_fromtext(&token.value.as_textregion,
|
||||
&ctx->ttl);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
if (ctx->ttl > 0x7fffffffUL) {
|
||||
(callbacks->warn)(callbacks,
|
||||
|
|
@ -335,7 +335,7 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
|||
include_file = isc_mem_strdup(mctx,
|
||||
token.value.as_pointer);
|
||||
if (include_file == NULL) {
|
||||
result = DNS_R_NOMEMORY;
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto error_cleanup;
|
||||
}
|
||||
GETTOKEN(lex, 0, &token, ISC_TRUE);
|
||||
|
|
@ -354,7 +354,7 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
|||
callbacks,
|
||||
ctx,
|
||||
mctx);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
isc_lex_ungettoken(lex, &token);
|
||||
continue;
|
||||
|
|
@ -427,7 +427,7 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
|||
token.value.as_region.length);
|
||||
result = dns_name_fromtext(&new_name, &buffer,
|
||||
&origin_name, ISC_FALSE, &name);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto error_cleanup;
|
||||
|
||||
/*
|
||||
|
|
@ -453,7 +453,7 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
|||
callbacks,
|
||||
ctx,
|
||||
mctx);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
finish_include = ISC_FALSE;
|
||||
continue;
|
||||
|
|
@ -473,7 +473,7 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
|||
&new_name) != 0) {
|
||||
result = commit(callbacks, &glue_list,
|
||||
&glue_name, top);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
if (glue_in_use != -1)
|
||||
name_in_use[glue_in_use] = ISC_FALSE;
|
||||
|
|
@ -507,7 +507,7 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
|||
result = commit(callbacks,
|
||||
¤t_list,
|
||||
¤t_name, top);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
rdcount = 0;
|
||||
rdlcount = 0;
|
||||
|
|
@ -530,7 +530,7 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
|||
isc_lex_getsourcename(lex),
|
||||
isc_lex_getsourceline(lex),
|
||||
token.type);
|
||||
result = DNS_R_UNEXPECTED;
|
||||
result = ISC_R_UNEXPECTED;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
|
@ -550,11 +550,11 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
|||
|
||||
if (dns_rdataclass_fromtext(&rdclass,
|
||||
&token.value.as_textregion)
|
||||
== DNS_R_SUCCESS)
|
||||
== ISC_R_SUCCESS)
|
||||
GETTOKEN(lex, 0, &token, ISC_FALSE);
|
||||
|
||||
if (dns_ttl_fromtext(&token.value.as_textregion, &ctx->ttl)
|
||||
== DNS_R_SUCCESS) {
|
||||
== ISC_R_SUCCESS) {
|
||||
if (ctx->ttl > 0x7fffffffUL) {
|
||||
(callbacks->warn)(callbacks,
|
||||
"dns_master_load: %s:%d: TTL %lu > MAXTTL, setting TTL to 0",
|
||||
|
|
@ -590,26 +590,26 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
|||
if (token.type != isc_tokentype_string) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_lex_gettoken() returned unexpected token type");
|
||||
result = DNS_R_UNEXPECTED;
|
||||
result = ISC_R_UNEXPECTED;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (rdclass == 0 &&
|
||||
dns_rdataclass_fromtext(&rdclass,
|
||||
&token.value.as_textregion)
|
||||
== DNS_R_SUCCESS)
|
||||
== ISC_R_SUCCESS)
|
||||
GETTOKEN(lex, 0, &token, ISC_FALSE);
|
||||
|
||||
if (token.type != isc_tokentype_string) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_lex_gettoken() returned unexpected token type");
|
||||
result = DNS_R_UNEXPECTED;
|
||||
result = ISC_R_UNEXPECTED;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
result = dns_rdatatype_fromtext(&type,
|
||||
&token.value.as_textregion);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
|
||||
/*
|
||||
|
|
@ -626,11 +626,11 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
|||
isc_buffer_init(&buffer, buf1, sizeof buf1,
|
||||
ISC_BUFFERTYPE_TEXT);
|
||||
result = dns_rdataclass_totext(rdclass, &buffer);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"dns_rdataclass_totext() failed: %s",
|
||||
dns_result_totext(result));
|
||||
result = DNS_R_UNEXPECTED;
|
||||
result = ISC_R_UNEXPECTED;
|
||||
goto cleanup;
|
||||
}
|
||||
isc_buffer_used(&buffer, ®ion);
|
||||
|
|
@ -638,11 +638,11 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
|||
isc_buffer_init(&buffer, buf2, sizeof buf2,
|
||||
ISC_BUFFERTYPE_TEXT);
|
||||
result = dns_rdataclass_totext(zclass, &buffer);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"dns_rdataclass_totext() failed: %s",
|
||||
dns_result_totext(result));
|
||||
result = DNS_R_UNEXPECTED;
|
||||
result = ISC_R_UNEXPECTED;
|
||||
goto cleanup;
|
||||
}
|
||||
isc_buffer_used(&buffer, ®ion);
|
||||
|
|
@ -682,7 +682,7 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
|||
rdata_size, ¤t_list,
|
||||
&glue_list, mctx);
|
||||
if (new_rdata == NULL) {
|
||||
result = DNS_R_NOMEMORY;
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto error_cleanup;
|
||||
}
|
||||
rdata_size += RDSZ;
|
||||
|
|
@ -695,7 +695,7 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
|||
result = dns_rdata_fromtext(&rdata[rdcount], zclass, type,
|
||||
lex, &origin_name, ISC_FALSE, &target,
|
||||
callbacks);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
if (type == dns_rdatatype_sig)
|
||||
covers = dns_rdata_covers(&rdata[rdcount]);
|
||||
|
|
@ -729,7 +729,7 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
|||
&glue_list,
|
||||
mctx);
|
||||
if (new_rdatalist == NULL) {
|
||||
result = DNS_R_NOMEMORY;
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto error_cleanup;
|
||||
}
|
||||
rdatalist = new_rdatalist;
|
||||
|
|
@ -777,11 +777,11 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
|||
if ((target.length - target.used) < MINTSIZ) {
|
||||
result = commit(callbacks, ¤t_list,
|
||||
¤t_name, top);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
result = commit(callbacks, &glue_list, &glue_name,
|
||||
top);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
rdcount = 0;
|
||||
rdlcount = 0;
|
||||
|
|
@ -798,13 +798,13 @@ load(isc_lex_t *lex, dns_name_t *top, dns_name_t *origin,
|
|||
* Commit what has not yet been committed.
|
||||
*/
|
||||
result = commit(callbacks, ¤t_list, ¤t_name, top);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
result = commit(callbacks, &glue_list, &glue_name, top);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
else
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
goto cleanup;
|
||||
|
||||
error_cleanup:
|
||||
|
|
@ -1062,7 +1062,7 @@ commit(dns_rdatacallbacks_t *callbacks, rdatalist_head_t *head,
|
|||
|
||||
this = ISC_LIST_HEAD(*head);
|
||||
if (this == NULL)
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
if (!dns_name_issubdomain(owner, top)) {
|
||||
/*
|
||||
* Ignore out-of-zone data.
|
||||
|
|
@ -1076,13 +1076,13 @@ commit(dns_rdatacallbacks_t *callbacks, rdatalist_head_t *head,
|
|||
result = ((*callbacks->add)(callbacks->add_private,
|
||||
owner,
|
||||
&dataset));
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
ISC_LIST_UNLINK(*head, this, link);
|
||||
this = ISC_LIST_HEAD(*head);
|
||||
} while (this != NULL);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
#define RETERR(x) do { \
|
||||
isc_result_t __r = (x); \
|
||||
if (__r != DNS_R_SUCCESS) \
|
||||
if (__r != ISC_R_SUCCESS) \
|
||||
return (__r); \
|
||||
} while (0)
|
||||
|
||||
|
|
@ -188,7 +188,7 @@ indent(unsigned int *current, unsigned int to, int tabwidth,
|
|||
if (ntabs > 0) {
|
||||
isc_buffer_available(target, &r);
|
||||
if (r.length < (unsigned) ntabs)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
p = r.base;
|
||||
|
||||
t = ntabs;
|
||||
|
|
@ -209,7 +209,7 @@ indent(unsigned int *current, unsigned int to, int tabwidth,
|
|||
|
||||
isc_buffer_available(target, &r);
|
||||
if (r.length < (unsigned) nspaces)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
p = r.base;
|
||||
|
||||
t = nspaces;
|
||||
|
|
@ -224,7 +224,7 @@ indent(unsigned int *current, unsigned int to, int tabwidth,
|
|||
isc_buffer_add(target, nspaces);
|
||||
|
||||
*current = to;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -255,15 +255,15 @@ totext_ctx_init(const dns_master_style_t *style, dns_totext_ctx_t *ctx)
|
|||
result = indent(&col, ctx->style.rdata_column,
|
||||
ctx->style.tab_width, &buf);
|
||||
/*
|
||||
* Do not return DNS_R_NOSPACE if the line break string
|
||||
* Do not return ISC_R_NOSPACE if the line break string
|
||||
* buffer is too small, because that would just make
|
||||
* dump_rdataset() retry indenfinitely with ever
|
||||
* bigger target buffers. That's a different buffer,
|
||||
* so it won't help. Use DNS_R_TEXTTOOLONG as a substitute.
|
||||
*/
|
||||
if (result == DNS_R_NOSPACE)
|
||||
if (result == ISC_R_NOSPACE)
|
||||
return (DNS_R_TEXTTOOLONG);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
isc_buffer_available(&buf, &r);
|
||||
|
|
@ -279,14 +279,14 @@ totext_ctx_init(const dns_master_style_t *style, dns_totext_ctx_t *ctx)
|
|||
ctx->class_printed = ISC_FALSE;
|
||||
ctx->origin = NULL;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
#define INDENT_TO(col) \
|
||||
do { \
|
||||
if ((result = indent(&column, ctx->style.col, \
|
||||
ctx->style.tab_width, target)) \
|
||||
!= DNS_R_SUCCESS) \
|
||||
!= ISC_R_SUCCESS) \
|
||||
return (result); \
|
||||
} while (0)
|
||||
|
||||
|
|
@ -314,7 +314,7 @@ rdataset_totext(dns_rdataset_t *rdataset,
|
|||
REQUIRE(DNS_RDATASET_VALID(rdataset));
|
||||
|
||||
result = dns_rdataset_first(rdataset);
|
||||
REQUIRE(result == DNS_R_SUCCESS);
|
||||
REQUIRE(result == ISC_R_SUCCESS);
|
||||
|
||||
current_ttl = ctx->current_ttl;
|
||||
current_ttl_valid = ctx->current_ttl_valid;
|
||||
|
|
@ -348,7 +348,7 @@ rdataset_totext(dns_rdataset_t *rdataset,
|
|||
INSIST(length <= sizeof ttlbuf);
|
||||
isc_buffer_available(target, &r);
|
||||
if (r.length < length)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
memcpy(r.base, ttlbuf, length);
|
||||
isc_buffer_add(target, length);
|
||||
column += length;
|
||||
|
|
@ -372,7 +372,7 @@ rdataset_totext(dns_rdataset_t *rdataset,
|
|||
class_start = target->used;
|
||||
result = dns_rdataclass_totext(rdataset->rdclass,
|
||||
target);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
column += (target->used - class_start);
|
||||
}
|
||||
|
|
@ -383,7 +383,7 @@ rdataset_totext(dns_rdataset_t *rdataset,
|
|||
INDENT_TO(type_column);
|
||||
type_start = target->used;
|
||||
result = dns_rdatatype_totext(rdataset->type, target);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
column += (target->used - type_start);
|
||||
}
|
||||
|
|
@ -406,16 +406,16 @@ rdataset_totext(dns_rdataset_t *rdataset,
|
|||
|
||||
isc_buffer_available(target, &r);
|
||||
if (r.length < 1)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
r.base[0] = '\n';
|
||||
isc_buffer_add(target, 1);
|
||||
}
|
||||
|
||||
first = ISC_FALSE;
|
||||
result = dns_rdataset_next(rdataset);
|
||||
} while (result == DNS_R_SUCCESS);
|
||||
} while (result == ISC_R_SUCCESS);
|
||||
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
return (result);
|
||||
|
||||
/*
|
||||
|
|
@ -429,7 +429,7 @@ rdataset_totext(dns_rdataset_t *rdataset,
|
|||
ctx->current_ttl= current_ttl;
|
||||
ctx->current_ttl_valid = current_ttl_valid;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -450,7 +450,7 @@ question_totext(dns_rdataset_t *rdataset,
|
|||
|
||||
REQUIRE(DNS_RDATASET_VALID(rdataset));
|
||||
result = dns_rdataset_first(rdataset);
|
||||
REQUIRE(result == DNS_R_NOMORE);
|
||||
REQUIRE(result == ISC_R_NOMORE);
|
||||
|
||||
column = 0;
|
||||
|
||||
|
|
@ -469,7 +469,7 @@ question_totext(dns_rdataset_t *rdataset,
|
|||
INDENT_TO(class_column);
|
||||
class_start = target->used;
|
||||
result = dns_rdataclass_totext(rdataset->rdclass, target);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
column += (target->used - class_start);
|
||||
}
|
||||
|
|
@ -480,18 +480,18 @@ question_totext(dns_rdataset_t *rdataset,
|
|||
INDENT_TO(type_column);
|
||||
type_start = target->used;
|
||||
result = dns_rdatatype_totext(rdataset->type, target);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
column += (target->used - type_start);
|
||||
}
|
||||
|
||||
isc_buffer_available(target, &r);
|
||||
if (r.length < 1)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
r.base[0] = '\n';
|
||||
isc_buffer_add(target, 1);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -509,10 +509,10 @@ dns_rdataset_totext(dns_rdataset_t *rdataset,
|
|||
dns_totext_ctx_t ctx;
|
||||
isc_result_t result;
|
||||
result = totext_ctx_init(&dns_masterfile_style_debug, &ctx);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"could not set master file style");
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -561,7 +561,7 @@ dump_rdataset(isc_mem_t *mctx, dns_name_t *name, dns_rdataset_t *rdataset,
|
|||
isc_buffer_clear(buffer);
|
||||
result = dns_ttl_totext(rdataset->ttl,
|
||||
ISC_TRUE, buffer);
|
||||
INSIST(result == DNS_R_SUCCESS);
|
||||
INSIST(result == ISC_R_SUCCESS);
|
||||
isc_buffer_used(buffer, &r);
|
||||
fprintf(f, "$TTL %u\t; %.*s\n", rdataset->ttl,
|
||||
(int) r.length, (char *) r.base);
|
||||
|
|
@ -584,18 +584,18 @@ dump_rdataset(isc_mem_t *mctx, dns_name_t *name, dns_rdataset_t *rdataset,
|
|||
void *newmem;
|
||||
result = rdataset_totext(rdataset, name, ctx,
|
||||
ISC_FALSE, buffer);
|
||||
if (result != DNS_R_NOSPACE)
|
||||
if (result != ISC_R_NOSPACE)
|
||||
break;
|
||||
|
||||
isc_mem_put(mctx, buffer->base, buffer->length);
|
||||
newlength = buffer->length * 2;
|
||||
newmem = isc_mem_get(mctx, newlength);
|
||||
if (newmem == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
isc_buffer_init(buffer, newmem, newlength,
|
||||
ISC_BUFFERTYPE_TEXT);
|
||||
}
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
/* Write the buffer contents to the master file. */
|
||||
|
|
@ -606,10 +606,10 @@ dump_rdataset(isc_mem_t *mctx, dns_name_t *name, dns_rdataset_t *rdataset,
|
|||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"master file write failed: %s",
|
||||
strerror(errno));
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -625,7 +625,7 @@ dump_rdatasets(isc_mem_t *mctx, dns_name_t *name, dns_rdatasetiter_t *rdsiter,
|
|||
|
||||
dns_rdataset_init(&rdataset);
|
||||
result = dns_rdatasetiter_first(rdsiter);
|
||||
while (result == DNS_R_SUCCESS) {
|
||||
while (result == ISC_R_SUCCESS) {
|
||||
dns_rdatasetiter_current(rdsiter, &rdataset);
|
||||
if (rdataset.type != 0) {
|
||||
/*
|
||||
|
|
@ -637,17 +637,17 @@ dump_rdatasets(isc_mem_t *mctx, dns_name_t *name, dns_rdatasetiter_t *rdsiter,
|
|||
result = dump_rdataset(mctx, name, &rdataset, ctx,
|
||||
buffer, f);
|
||||
} else
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
dns_rdataset_disassociate(&rdataset);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
result = dns_rdatasetiter_next(rdsiter);
|
||||
if ((ctx->style.flags & DNS_STYLEFLAG_OMIT_OWNER) != 0)
|
||||
name = NULL;
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
return (result);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -683,10 +683,10 @@ dns_master_dumptostream(isc_mem_t *mctx, dns_db_t *db,
|
|||
dns_totext_ctx_t ctx;
|
||||
|
||||
result = totext_ctx_init(style, &ctx);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"could not set master file style");
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
|
||||
dns_fixedname_init(&fixname);
|
||||
|
|
@ -696,7 +696,7 @@ dns_master_dumptostream(isc_mem_t *mctx, dns_db_t *db,
|
|||
|
||||
bufmem = isc_mem_get(mctx, initial_buffer_length);
|
||||
if (bufmem == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
isc_buffer_init(&buffer, bufmem, initial_buffer_length,
|
||||
ISC_BUFFERTYPE_TEXT);
|
||||
|
|
@ -710,7 +710,7 @@ dns_master_dumptostream(isc_mem_t *mctx, dns_db_t *db,
|
|||
*/
|
||||
if (dns_db_iscache(db)) {
|
||||
result = dns_time32_totext(now, &buffer);
|
||||
RUNTIME_CHECK(result == DNS_R_SUCCESS);
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
isc_buffer_used(&buffer, &r);
|
||||
fprintf(f, "$DATE %.*s\n", (int) r.length, (char *) r.base);
|
||||
}
|
||||
|
|
@ -719,25 +719,25 @@ dns_master_dumptostream(isc_mem_t *mctx, dns_db_t *db,
|
|||
((ctx.style.flags & DNS_STYLEFLAG_REL_OWNER) != 0) ?
|
||||
ISC_TRUE : ISC_FALSE,
|
||||
&dbiter);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto create_iter_failure;
|
||||
|
||||
result = dns_dbiterator_first(dbiter);
|
||||
|
||||
while (result == DNS_R_SUCCESS) {
|
||||
while (result == ISC_R_SUCCESS) {
|
||||
dns_rdatasetiter_t *rdsiter = NULL;
|
||||
dns_dbnode_t *node = NULL;
|
||||
result = dns_dbiterator_current(dbiter, &node, name);
|
||||
if (result != DNS_R_SUCCESS && result != DNS_R_NEWORIGIN)
|
||||
if (result != ISC_R_SUCCESS && result != DNS_R_NEWORIGIN)
|
||||
break;
|
||||
if (result == DNS_R_NEWORIGIN) {
|
||||
dns_name_t *origin =
|
||||
dns_fixedname_name(&ctx.origin_fixname);
|
||||
result = dns_dbiterator_origin(dbiter, origin);
|
||||
RUNTIME_CHECK(result == DNS_R_SUCCESS);
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
isc_buffer_clear(&buffer);
|
||||
result = dns_name_totext(origin, ISC_FALSE, &buffer);
|
||||
RUNTIME_CHECK(result == DNS_R_SUCCESS);
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
isc_buffer_used(&buffer, &r);
|
||||
fprintf(f, "$ORIGIN %.*s\n", (int) r.length,
|
||||
(char *) r.base);
|
||||
|
|
@ -745,13 +745,13 @@ dns_master_dumptostream(isc_mem_t *mctx, dns_db_t *db,
|
|||
ctx.origin = origin;
|
||||
}
|
||||
result = dns_db_allrdatasets(db, node, version, now, &rdsiter);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
dns_db_detachnode(db, &node);
|
||||
goto iter_failure;
|
||||
}
|
||||
result = dump_rdatasets(mctx, name, rdsiter, &ctx,
|
||||
&buffer, f);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
dns_db_detachnode(db, &node);
|
||||
goto iter_failure;
|
||||
}
|
||||
|
|
@ -759,10 +759,10 @@ dns_master_dumptostream(isc_mem_t *mctx, dns_db_t *db,
|
|||
dns_db_detachnode(db, &node);
|
||||
result = dns_dbiterator_next(dbiter);
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
goto iter_failure;
|
||||
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
|
||||
iter_failure:
|
||||
dns_dbiterator_destroy(&dbiter);
|
||||
|
|
@ -785,7 +785,7 @@ dns_master_dump(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
|
|||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"could not open %s",
|
||||
filename);
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
|
||||
result = dns_master_dumptostream(mctx, db, version, style, f);
|
||||
|
|
@ -794,7 +794,7 @@ dns_master_dump(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
|
|||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"error closing %s",
|
||||
filename);
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
|
||||
return (result);
|
||||
|
|
|
|||
|
|
@ -172,10 +172,10 @@ newbuffer(dns_message_t *msg, unsigned int size)
|
|||
result = isc_buffer_allocate(msg->mctx, &dynbuf, size,
|
||||
ISC_BUFFERTYPE_BINARY);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
ISC_LIST_APPEND(msg->scratchpad, dynbuf, link);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_buffer_t *
|
||||
|
|
@ -532,7 +532,7 @@ dns_message_create(isc_mem_t *mctx, unsigned int intent, dns_message_t **msgp)
|
|||
|
||||
m = isc_mem_get(mctx, sizeof(dns_message_t));
|
||||
if (m == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
/*
|
||||
* No allocations until further notice. Just initialize all lists
|
||||
|
|
@ -597,7 +597,7 @@ dns_message_create(isc_mem_t *mctx, unsigned int intent, dns_message_t **msgp)
|
|||
}
|
||||
|
||||
*msgp = m;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
/*
|
||||
* Cleanup for error returns.
|
||||
|
|
@ -616,7 +616,7 @@ dns_message_create(isc_mem_t *mctx, unsigned int intent, dns_message_t **msgp)
|
|||
m->magic = 0;
|
||||
isc_mem_put(mctx, m, sizeof(dns_message_t));
|
||||
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -661,11 +661,11 @@ findname(dns_name_t **foundname, dns_name_t *target, unsigned int attributes,
|
|||
(curr->attributes & attributes) == attributes) {
|
||||
if (foundname != NULL)
|
||||
*foundname = curr;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
return (DNS_R_NOTFOUND);
|
||||
return (ISC_R_NOTFOUND);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -684,11 +684,11 @@ dns_message_findtype(dns_name_t *name, dns_rdatatype_t type,
|
|||
if (curr->type == type && curr->covers == covers) {
|
||||
if (rdataset != NULL)
|
||||
*rdataset = curr;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
return (DNS_R_NOTFOUND);
|
||||
return (ISC_R_NOTFOUND);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -714,11 +714,11 @@ getname(dns_name_t *name, isc_buffer_t *source, dns_message_t *msg,
|
|||
result = dns_name_fromwire(name, source, dctx, ISC_FALSE,
|
||||
scratch);
|
||||
|
||||
if (result == DNS_R_NOSPACE) {
|
||||
if (result == ISC_R_NOSPACE) {
|
||||
tries++;
|
||||
|
||||
result = newbuffer(msg, SCRATCHPAD_SIZE);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
scratch = currentbuffer(msg);
|
||||
|
|
@ -728,7 +728,7 @@ getname(dns_name_t *name, isc_buffer_t *source, dns_message_t *msg,
|
|||
}
|
||||
|
||||
INSIST(0); /* Cannot get here... */
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -753,7 +753,7 @@ getrdata(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
|
|||
rdata->length = 0;
|
||||
rdata->rdclass = rdclass;
|
||||
rdata->type = rdtype;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
scratch = currentbuffer(msg);
|
||||
|
|
@ -775,7 +775,7 @@ getrdata(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
|
|||
source, dctx, ISC_FALSE,
|
||||
scratch);
|
||||
|
||||
if (result == DNS_R_NOSPACE) {
|
||||
if (result == ISC_R_NOSPACE) {
|
||||
if (tries == 0) {
|
||||
trysize = 2 * rdatalen;
|
||||
if (trysize < SCRATCHPAD_SIZE)
|
||||
|
|
@ -789,7 +789,7 @@ getrdata(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
|
|||
}
|
||||
tries++;
|
||||
result = newbuffer(msg, trysize);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
scratch = currentbuffer(msg);
|
||||
|
|
@ -823,7 +823,7 @@ getquestions(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx)
|
|||
for (count = 0 ; count < msg->counts[DNS_SECTION_QUESTION] ; count++) {
|
||||
name = isc_mempool_get(msg->namepool);
|
||||
if (name == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
free_name = ISC_TRUE;
|
||||
|
||||
/*
|
||||
|
|
@ -832,7 +832,7 @@ getquestions(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx)
|
|||
isc_buffer_remaining(source, &r);
|
||||
isc_buffer_setactive(source, r.length);
|
||||
result = getname(name, source, msg, dctx);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
|
||||
/*
|
||||
|
|
@ -853,7 +853,7 @@ getquestions(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx)
|
|||
* this should be legal or not. In either case we no longer
|
||||
* need this name pointer.
|
||||
*/
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
if (ISC_LIST_EMPTY(*section)) {
|
||||
ISC_LIST_APPEND(*section, name, link);
|
||||
free_name = ISC_FALSE;
|
||||
|
|
@ -873,7 +873,7 @@ getquestions(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx)
|
|||
*/
|
||||
isc_buffer_remaining(source, &r);
|
||||
if (r.length < 4) {
|
||||
result = DNS_R_UNEXPECTEDEND;
|
||||
result = ISC_R_UNEXPECTEDEND;
|
||||
goto cleanup;
|
||||
}
|
||||
rdtype = isc_buffer_getuint16(source);
|
||||
|
|
@ -895,7 +895,7 @@ getquestions(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx)
|
|||
* Can't ask the same question twice.
|
||||
*/
|
||||
result = dns_message_findtype(name, rdtype, 0, NULL);
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
result = DNS_R_FORMERR;
|
||||
goto cleanup;
|
||||
}
|
||||
|
|
@ -905,12 +905,12 @@ getquestions(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx)
|
|||
*/
|
||||
rdatalist = newrdatalist(msg);
|
||||
if (rdatalist == NULL) {
|
||||
result = DNS_R_NOMEMORY;
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
rdataset = isc_mempool_get(msg->rdspool);
|
||||
if (rdataset == NULL) {
|
||||
result = DNS_R_NOMEMORY;
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
|
@ -926,7 +926,7 @@ getquestions(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx)
|
|||
|
||||
dns_rdataset_init(rdataset);
|
||||
result = dns_rdatalist_tordataset(rdatalist, rdataset);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
|
||||
rdataset->attributes |= DNS_RDATASETATTR_QUESTION;
|
||||
|
|
@ -934,7 +934,7 @@ getquestions(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx)
|
|||
ISC_LIST_APPEND(name->list, rdataset, link);
|
||||
}
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
cleanup:
|
||||
if (rdataset != NULL) {
|
||||
|
|
@ -982,7 +982,7 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
|
|||
|
||||
name = isc_mempool_get(msg->namepool);
|
||||
if (name == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
free_name = ISC_TRUE;
|
||||
|
||||
/*
|
||||
|
|
@ -991,7 +991,7 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
|
|||
isc_buffer_remaining(source, &r);
|
||||
isc_buffer_setactive(source, r.length);
|
||||
result = getname(name, source, msg, dctx);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
|
||||
/*
|
||||
|
|
@ -1001,7 +1001,7 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
|
|||
*/
|
||||
isc_buffer_remaining(source, &r);
|
||||
if (r.length < 2 + 2 + 4 + 2) {
|
||||
result = DNS_R_UNEXPECTEDEND;
|
||||
result = ISC_R_UNEXPECTEDEND;
|
||||
goto cleanup;
|
||||
}
|
||||
rdtype = isc_buffer_getuint16(source);
|
||||
|
|
@ -1094,7 +1094,7 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
|
|||
rdatalen = isc_buffer_getuint16(source);
|
||||
r.length -= (2 + 2 + 4 + 2);
|
||||
if (r.length < rdatalen) {
|
||||
result = DNS_R_UNEXPECTEDEND;
|
||||
result = ISC_R_UNEXPECTEDEND;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
|
@ -1106,7 +1106,7 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
|
|||
*/
|
||||
rdata = newrdata(msg);
|
||||
if (rdata == NULL) {
|
||||
result = DNS_R_NOMEMORY;
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
attributes = 0;
|
||||
|
|
@ -1125,7 +1125,7 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
|
|||
} else
|
||||
result = getrdata(source, msg, dctx, rdclass,
|
||||
rdtype, rdatalen, rdata);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
rdata->rdclass = rdclass;
|
||||
if (rdtype == dns_rdatatype_sig && rdata->length > 0) {
|
||||
|
|
@ -1169,7 +1169,7 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
|
|||
/*
|
||||
* If it is a new name, append to the section.
|
||||
*/
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
isc_mempool_put(msg->namepool, name);
|
||||
name = name2;
|
||||
} else {
|
||||
|
|
@ -1184,7 +1184,7 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
|
|||
*/
|
||||
if (preserve_order || msg->opcode == dns_opcode_update ||
|
||||
skip_type_search)
|
||||
result = DNS_R_NOTFOUND;
|
||||
result = ISC_R_NOTFOUND;
|
||||
else {
|
||||
rdataset = NULL;
|
||||
result = dns_message_findtype(name, rdtype, covers,
|
||||
|
|
@ -1201,17 +1201,17 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
|
|||
* XXXRTH Check for attempts to create multi-record RRsets
|
||||
* for singleton RR types.
|
||||
*/
|
||||
if (result == DNS_R_NOTFOUND) {
|
||||
if (result == ISC_R_NOTFOUND) {
|
||||
rdataset = isc_mempool_get(msg->rdspool);
|
||||
if (rdataset == NULL) {
|
||||
result = DNS_R_NOMEMORY;
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
free_rdataset = ISC_TRUE;
|
||||
|
||||
rdatalist = newrdatalist(msg);
|
||||
if (rdatalist == NULL) {
|
||||
result = DNS_R_NOMEMORY;
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
|
@ -1293,7 +1293,7 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
|
|||
INSIST(free_rdataset == ISC_FALSE);
|
||||
}
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
cleanup:
|
||||
if (free_name)
|
||||
|
|
@ -1325,7 +1325,7 @@ dns_message_parse(dns_message_t *msg, isc_buffer_t *source,
|
|||
|
||||
isc_buffer_remaining(source, &r);
|
||||
if (r.length < DNS_MESSAGE_HEADERLEN)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
|
||||
msg->id = isc_buffer_getuint16(source);
|
||||
tmpflags = isc_buffer_getuint16(source);
|
||||
|
|
@ -1352,23 +1352,23 @@ dns_message_parse(dns_message_t *msg, isc_buffer_t *source,
|
|||
|
||||
|
||||
ret = getquestions(source, msg, &dctx);
|
||||
if (ret != DNS_R_SUCCESS)
|
||||
if (ret != ISC_R_SUCCESS)
|
||||
return (ret);
|
||||
msg->question_ok = 1;
|
||||
|
||||
ret = getsection(source, msg, &dctx, DNS_SECTION_ANSWER,
|
||||
preserve_order);
|
||||
if (ret != DNS_R_SUCCESS)
|
||||
if (ret != ISC_R_SUCCESS)
|
||||
return (ret);
|
||||
|
||||
ret = getsection(source, msg, &dctx, DNS_SECTION_AUTHORITY,
|
||||
preserve_order);
|
||||
if (ret != DNS_R_SUCCESS)
|
||||
if (ret != ISC_R_SUCCESS)
|
||||
return (ret);
|
||||
|
||||
ret = getsection(source, msg, &dctx, DNS_SECTION_ADDITIONAL,
|
||||
preserve_order);
|
||||
if (ret != DNS_R_SUCCESS)
|
||||
if (ret != ISC_R_SUCCESS)
|
||||
return (ret);
|
||||
|
||||
isc_buffer_remaining(source, &r);
|
||||
|
|
@ -1391,7 +1391,7 @@ dns_message_parse(dns_message_t *msg, isc_buffer_t *source,
|
|||
memcpy(msg->saved->base, r.base, msg->saved->length);
|
||||
}
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -1418,7 +1418,7 @@ dns_message_renderbegin(dns_message_t *msg, isc_buffer_t *buffer)
|
|||
REQUIRE(r.length >= DNS_MESSAGE_HEADERLEN);
|
||||
|
||||
result = dns_compress_init(&msg->cctx, -1, msg->mctx);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
msg->need_cctx_cleanup = 1;
|
||||
|
||||
|
|
@ -1429,7 +1429,7 @@ dns_message_renderbegin(dns_message_t *msg, isc_buffer_t *buffer)
|
|||
|
||||
msg->buffer = buffer;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -1459,7 +1459,7 @@ dns_message_renderchangebuffer(dns_message_t *msg, isc_buffer_t *buffer)
|
|||
|
||||
msg->buffer = buffer;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1482,11 +1482,11 @@ dns_message_renderreserve(dns_message_t *msg, unsigned int space)
|
|||
|
||||
isc_buffer_available(msg->buffer, &r);
|
||||
if (r.length < (space + msg->reserved))
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
|
||||
msg->reserved += space;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_boolean_t
|
||||
|
|
@ -1554,7 +1554,7 @@ dns_message_rendersection(dns_message_t *msg, dns_section_t sectionid,
|
|||
do {
|
||||
name = ISC_LIST_HEAD(*section);
|
||||
if (name == NULL)
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
while (name != NULL) {
|
||||
next_name = ISC_LIST_NEXT(name, link);
|
||||
|
|
@ -1593,7 +1593,7 @@ dns_message_rendersection(dns_message_t *msg, dns_section_t sectionid,
|
|||
* (probably in the message struct)
|
||||
* to indicate where to continue from.
|
||||
*/
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
INSIST(st.used < 65536);
|
||||
dns_compress_rollback(&msg->cctx,
|
||||
(isc_uint16_t)st.used);
|
||||
|
|
@ -1625,7 +1625,7 @@ dns_message_rendersection(dns_message_t *msg, dns_section_t sectionid,
|
|||
msg->buffer->length += msg->reserved;
|
||||
msg->counts[sectionid] += total;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1707,7 +1707,7 @@ dns_message_renderend(dns_message_t *msg)
|
|||
if (msg->tsigkey != NULL) {
|
||||
REQUIRE(msg->tsig == NULL);
|
||||
result = dns_tsig_sign(msg);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
count = 0;
|
||||
result = dns_rdataset_towire(msg->tsigset, msg->tsigname,
|
||||
|
|
@ -1719,7 +1719,7 @@ dns_message_renderend(dns_message_t *msg)
|
|||
|
||||
else if (msg->sig0key != NULL) {
|
||||
result = dns_dnssec_signmessage(msg, msg->sig0key);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
count = 0;
|
||||
result = dns_rdataset_towire(msg->sig0, dns_rootname,
|
||||
|
|
@ -1739,7 +1739,7 @@ dns_message_renderend(dns_message_t *msg)
|
|||
dns_compress_invalidate(&msg->cctx);
|
||||
msg->need_cctx_cleanup = 0;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1782,9 +1782,9 @@ dns_message_firstname(dns_message_t *msg, dns_section_t section)
|
|||
msg->cursors[section] = ISC_LIST_HEAD(msg->sections[section]);
|
||||
|
||||
if (msg->cursors[section] == NULL)
|
||||
return (DNS_R_NOMORE);
|
||||
return (ISC_R_NOMORE);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -1797,9 +1797,9 @@ dns_message_nextname(dns_message_t *msg, dns_section_t section)
|
|||
msg->cursors[section] = ISC_LIST_NEXT(msg->cursors[section], link);
|
||||
|
||||
if (msg->cursors[section] == NULL)
|
||||
return (DNS_R_NOMORE);
|
||||
return (ISC_R_NOMORE);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1861,9 +1861,9 @@ dns_message_findname(dns_message_t *msg, dns_section_t section,
|
|||
*/
|
||||
result = findname(&foundname, target, attributes,
|
||||
&msg->sections[section]);
|
||||
if (result == DNS_R_NOTFOUND)
|
||||
if (result == ISC_R_NOTFOUND)
|
||||
return (DNS_R_NXDOMAIN);
|
||||
else if (result != DNS_R_SUCCESS)
|
||||
else if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
if (name != NULL)
|
||||
|
|
@ -1873,11 +1873,11 @@ dns_message_findname(dns_message_t *msg, dns_section_t section,
|
|||
* And now look for the type.
|
||||
*/
|
||||
if (type == dns_rdatatype_any)
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
result = dns_message_findtype(foundname, type, covers, rdataset);
|
||||
if (result == DNS_R_NOTFOUND)
|
||||
return (DNS_R_NXRDATASET);
|
||||
if (result == ISC_R_NOTFOUND)
|
||||
return (DNS_R_NXRRSET);
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
|
@ -1920,9 +1920,9 @@ dns_message_gettempname(dns_message_t *msg, dns_name_t **item)
|
|||
|
||||
*item = isc_mempool_get(msg->namepool);
|
||||
if (*item == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1943,9 +1943,9 @@ dns_message_gettemprdata(dns_message_t *msg, dns_rdata_t **item)
|
|||
|
||||
*item = newrdata(msg);
|
||||
if (*item == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -1956,11 +1956,11 @@ dns_message_gettemprdataset(dns_message_t *msg, dns_rdataset_t **item)
|
|||
|
||||
*item = isc_mempool_get(msg->rdspool);
|
||||
if (*item == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
dns_rdataset_init(*item);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -1971,9 +1971,9 @@ dns_message_gettemprdatalist(dns_message_t *msg, dns_rdatalist_t **item)
|
|||
|
||||
*item = newrdatalist(msg);
|
||||
if (*item == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -2022,7 +2022,7 @@ dns_message_peekheader(isc_buffer_t *source, dns_messageid_t *idp,
|
|||
|
||||
isc_buffer_remaining(&buffer, &r);
|
||||
if (r.length < DNS_MESSAGE_HEADERLEN)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
|
||||
id = isc_buffer_getuint16(&buffer);
|
||||
flags = isc_buffer_getuint16(&buffer);
|
||||
|
|
@ -2033,7 +2033,7 @@ dns_message_peekheader(isc_buffer_t *source, dns_messageid_t *idp,
|
|||
if (idp != NULL)
|
||||
*idp = id;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -2082,7 +2082,7 @@ dns_message_reply(dns_message_t *msg, isc_boolean_t want_question_section) {
|
|||
msg->saved = NULL;
|
||||
}
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
dns_rdataset_t *
|
||||
|
|
@ -2142,7 +2142,7 @@ dns_message_setopt(dns_message_t *msg, dns_rdataset_t *opt) {
|
|||
|
||||
msg->opt = opt;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
dns_rdataset_t *
|
||||
|
|
|
|||
|
|
@ -1543,7 +1543,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
|
|||
if (bitlength % 8 != 0)
|
||||
n1++;
|
||||
if (nrem < n1)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
for (n2 = 0; n2 < n1; n2++) {
|
||||
*ndata++ = dqchars[n2];
|
||||
nrem--;
|
||||
|
|
@ -1594,11 +1594,11 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
|
|||
|
||||
if (!done) {
|
||||
if (nrem == 0)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
INSIST(tlen == 0);
|
||||
if (state != ft_ordinary && state != ft_eatdot &&
|
||||
state != ft_at)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
if (state == ft_ordinary) {
|
||||
INSIST(count != 0);
|
||||
*label = count;
|
||||
|
|
@ -1608,7 +1608,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
|
|||
}
|
||||
if (origin != NULL) {
|
||||
if (nrem < origin->length)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
label = origin->ndata;
|
||||
n1 = origin->length;
|
||||
nrem -= n1;
|
||||
|
|
@ -1664,7 +1664,7 @@ dns_name_fromtext(dns_name_t *name, isc_buffer_t *source,
|
|||
isc_buffer_forward(source, tused);
|
||||
isc_buffer_add(target, name->length);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -1704,7 +1704,7 @@ dns_name_totext(dns_name_t *name, isc_boolean_t omit_final_dot,
|
|||
labels = 0;
|
||||
nlen = 0;
|
||||
if (trem == 0)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
*tdata++ = '.';
|
||||
trem--;
|
||||
}
|
||||
|
|
@ -1730,7 +1730,7 @@ dns_name_totext(dns_name_t *name, isc_boolean_t omit_final_dot,
|
|||
case 0x40: /* '@' */
|
||||
case 0x24: /* '$' */
|
||||
if (trem < 2)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
*tdata++ = '\\';
|
||||
CONVERTFROMASCII(c);
|
||||
*tdata++ = c;
|
||||
|
|
@ -1741,7 +1741,7 @@ dns_name_totext(dns_name_t *name, isc_boolean_t omit_final_dot,
|
|||
default:
|
||||
if (c > 0x20 && c < 0x7f) {
|
||||
if (trem == 0)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
CONVERTFROMASCII(c);
|
||||
*tdata++ = c;
|
||||
ndata++;
|
||||
|
|
@ -1749,7 +1749,7 @@ dns_name_totext(dns_name_t *name, isc_boolean_t omit_final_dot,
|
|||
nlen--;
|
||||
} else {
|
||||
if (trem < 4)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
sprintf(tdata, "\\%03u",
|
||||
c);
|
||||
tdata += 4;
|
||||
|
|
@ -1762,7 +1762,7 @@ dns_name_totext(dns_name_t *name, isc_boolean_t omit_final_dot,
|
|||
}
|
||||
} else if (count == DNS_LABELTYPE_BITSTRING) {
|
||||
if (trem < 3)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
*tdata++ = '\\';
|
||||
*tdata++ = '[';
|
||||
*tdata++ = 'x';
|
||||
|
|
@ -1782,7 +1782,7 @@ dns_name_totext(dns_name_t *name, isc_boolean_t omit_final_dot,
|
|||
if (count % 4 != 0)
|
||||
nibbles++;
|
||||
if (trem < nibbles)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
trem -= nibbles;
|
||||
nlen -= bytes;
|
||||
while (nibbles > 0) {
|
||||
|
|
@ -1796,7 +1796,7 @@ dns_name_totext(dns_name_t *name, isc_boolean_t omit_final_dot,
|
|||
}
|
||||
}
|
||||
if (trem < 2 + len)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
*tdata++ = '/';
|
||||
for (i = 0; i < len; i++)
|
||||
*tdata++ = num[i];
|
||||
|
|
@ -1815,20 +1815,20 @@ dns_name_totext(dns_name_t *name, isc_boolean_t omit_final_dot,
|
|||
* needed in the final output.
|
||||
*/
|
||||
if (trem == 0)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
*tdata++ = '.';
|
||||
trem--;
|
||||
}
|
||||
|
||||
if (nlen != 0 && trem == 0)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
INSIST(nlen == 0);
|
||||
if (!saw_root || omit_final_dot)
|
||||
trem++;
|
||||
|
||||
isc_buffer_add(target, tlen - trem);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -1867,7 +1867,7 @@ dns_name_downcase(dns_name_t *source, dns_name_t *name,
|
|||
|
||||
if (nlen > (target->length - target->used)) {
|
||||
MAKE_EMPTY(name);
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
}
|
||||
|
||||
while (labels > 0 && nlen > 0) {
|
||||
|
|
@ -2197,7 +2197,7 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
|
|||
if (c < 64) {
|
||||
labels++;
|
||||
if (nrem < c + 1)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
nrem -= c + 1;
|
||||
nused += c + 1;
|
||||
*ndata++ = c;
|
||||
|
|
@ -2225,7 +2225,7 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
|
|||
} else if (c == DNS_LABELTYPE_BITSTRING) {
|
||||
labels++;
|
||||
if (nrem == 0)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
nrem--;
|
||||
nused++;
|
||||
*ndata++ = c;
|
||||
|
|
@ -2262,7 +2262,7 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
|
|||
if ((c % 8) != 0)
|
||||
n++;
|
||||
if (nrem < n + 1)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
nrem -= n + 1;
|
||||
nused += n + 1;
|
||||
*ndata++ = c;
|
||||
|
|
@ -2293,7 +2293,7 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
|
|||
}
|
||||
|
||||
if (!done)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
|
||||
name->ndata = (unsigned char *)target->base + target->used;
|
||||
name->labels = labels;
|
||||
|
|
@ -2312,7 +2312,7 @@ dns_name_fromwire(dns_name_t *name, isc_buffer_t *source,
|
|||
isc_buffer_forward(source, cused);
|
||||
isc_buffer_add(target, name->length);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -2357,18 +2357,18 @@ dns_name_towire(dns_name_t *name, dns_compress_t *cctx,
|
|||
|
||||
if (gf) {
|
||||
if (target->length - target->used < gp.length)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
(void)memcpy((unsigned char *)target->base + target->used,
|
||||
gp.ndata, (size_t)gp.length);
|
||||
isc_buffer_add(target, gp.length);
|
||||
if (go < 16384) {
|
||||
go |= 0xc000;
|
||||
if (target->length - target->used < 2)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
isc_buffer_putuint16(target, go);
|
||||
} else {
|
||||
if (target->length - target->used < 3)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
*((unsigned char*)target->base + target->used) =
|
||||
DNS_LABELTYPE_GLOBALCOMP16;
|
||||
isc_buffer_add(target, 1);
|
||||
|
|
@ -2378,13 +2378,13 @@ dns_name_towire(dns_name_t *name, dns_compress_t *cctx,
|
|||
dns_compress_add(cctx, &gp, &gs, offset);
|
||||
} else {
|
||||
if (target->length - target->used < name->length)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
(void)memcpy((unsigned char *)target->base + target->used,
|
||||
name->ndata, (size_t)name->length);
|
||||
isc_buffer_add(target, name->length);
|
||||
dns_compress_add(cctx, name, NULL, offset);
|
||||
}
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -2467,7 +2467,7 @@ dns_name_concatenate(dns_name_t *prefix, dns_name_t *suffix, dns_name_t *name,
|
|||
}
|
||||
if (length > nrem) {
|
||||
MAKE_EMPTY(name);
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
}
|
||||
|
||||
if (copy_suffix) {
|
||||
|
|
@ -2535,7 +2535,7 @@ dns_name_concatenate(dns_name_t *prefix, dns_name_t *suffix, dns_name_t *name,
|
|||
|
||||
isc_buffer_add(target, name->length);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -2546,7 +2546,7 @@ dns_name_split(dns_name_t *name,
|
|||
{
|
||||
dns_offsets_t name_odata, split_odata;
|
||||
unsigned char *offsets, *splitoffsets;
|
||||
isc_result_t result = DNS_R_SUCCESS;
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
unsigned int splitlabel, bitbytes, mod, len;
|
||||
unsigned char *p, *src, *dst;
|
||||
|
||||
|
|
@ -2635,7 +2635,7 @@ dns_name_split(dns_name_t *name,
|
|||
|
||||
if (prefix->length > prefix->buffer->length ) {
|
||||
dns_name_invalidate(prefix);
|
||||
return(DNS_R_NOSPACE);
|
||||
return(ISC_R_NOSPACE);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -2701,7 +2701,7 @@ dns_name_split(dns_name_t *name,
|
|||
|
||||
}
|
||||
|
||||
if (suffix != NULL && result == DNS_R_SUCCESS) {
|
||||
if (suffix != NULL && result == ISC_R_SUCCESS) {
|
||||
if (nbits > 0) {
|
||||
bitbytes = (nbits - 1) / 8 + 1;
|
||||
|
||||
|
|
@ -2722,7 +2722,7 @@ dns_name_split(dns_name_t *name,
|
|||
INSIST(suffix->length > 0);
|
||||
if (suffix->length > suffix->buffer->length) {
|
||||
dns_name_invalidate(suffix);
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -2893,7 +2893,7 @@ dns_name_dup(dns_name_t *source, isc_mem_t *mctx, dns_name_t *target) {
|
|||
|
||||
target->ndata = isc_mem_get(mctx, source->length);
|
||||
if (target->ndata == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
memcpy(target->ndata, source->ndata, source->length);
|
||||
|
||||
|
|
@ -2911,7 +2911,7 @@ dns_name_dup(dns_name_t *source, isc_mem_t *mctx, dns_name_t *target) {
|
|||
ISC_FALSE, ISC_FALSE);
|
||||
}
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -2936,7 +2936,7 @@ dns_name_dupwithoffsets(dns_name_t *source, isc_mem_t *mctx,
|
|||
|
||||
target->ndata = isc_mem_get(mctx, source->length + source->labels);
|
||||
if (target->ndata == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
memcpy(target->ndata, source->ndata, source->length);
|
||||
|
||||
|
|
@ -2953,7 +2953,7 @@ dns_name_dupwithoffsets(dns_name_t *source, isc_mem_t *mctx,
|
|||
set_offsets(target, target->offsets, ISC_FALSE, ISC_FALSE,
|
||||
ISC_FALSE);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -2993,7 +2993,7 @@ dns_name_digest(dns_name_t *name, dns_digestfunc_t digest, void *arg) {
|
|||
isc_buffer_init(&buffer, data, sizeof data, ISC_BUFFERTYPE_BINARY);
|
||||
|
||||
result = dns_name_downcase(name, &downname, &buffer);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
isc_buffer_used(&buffer, &r);
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@ dns_ncache_towire(dns_rdataset_t *rdataset, dns_compress_t *cctx,
|
|||
* Write the name.
|
||||
*/
|
||||
result = dns_name_towire(&name, cctx, target);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto rollback;
|
||||
|
||||
/*
|
||||
|
|
@ -346,7 +346,7 @@ dns_ncache_towire(dns_rdataset_t *rdataset, dns_compress_t *cctx,
|
|||
* Write the rdata.
|
||||
*/
|
||||
result = dns_rdata_towire(&rdata, cctx, target);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto rollback;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
#define check_result(op, msg) \
|
||||
do { result = (op); \
|
||||
if (result != DNS_R_SUCCESS) { \
|
||||
if (result != ISC_R_SUCCESS) { \
|
||||
fprintf(stderr, "%s: %s\n", msg, \
|
||||
isc_result_totext(result)); \
|
||||
goto failure; \
|
||||
|
|
@ -88,7 +88,7 @@ dns_buildnxtrdata(dns_db_t *db, dns_dbversion_t *version,
|
|||
dns_rdataset_init(&rdataset);
|
||||
rdsiter = NULL;
|
||||
result = dns_db_allrdatasets(db, node, version, 0, &rdsiter);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
for (result = dns_rdatasetiter_first(rdsiter);
|
||||
result == ISC_R_SUCCESS;
|
||||
|
|
@ -116,7 +116,7 @@ dns_buildnxtrdata(dns_db_t *db, dns_dbversion_t *version,
|
|||
}
|
||||
|
||||
dns_rdatasetiter_destroy(&rdsiter);
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
return (result);
|
||||
|
||||
r.length += ((max_type + 7) / 8);
|
||||
|
|
@ -126,7 +126,7 @@ dns_buildnxtrdata(dns_db_t *db, dns_dbversion_t *version,
|
|||
dns_rdatatype_nxt,
|
||||
&r);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
224
lib/dns/rbtdb.c
224
lib/dns/rbtdb.c
|
|
@ -438,11 +438,11 @@ newversion(dns_db_t *db, dns_dbversion_t **versionp) {
|
|||
UNLOCK(&rbtdb->lock);
|
||||
|
||||
if (version == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
*versionp = version;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -954,11 +954,11 @@ findnode(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
|
|||
RWLOCK(&rbtdb->tree_lock, locktype);
|
||||
result = dns_rbt_findnode(rbtdb->tree, name, NULL, &node, NULL,
|
||||
ISC_TRUE, NULL, NULL);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
RWUNLOCK(&rbtdb->tree_lock, locktype);
|
||||
if (!create) {
|
||||
if (result == DNS_R_PARTIALMATCH)
|
||||
result = DNS_R_NOTFOUND;
|
||||
result = ISC_R_NOTFOUND;
|
||||
return (result);
|
||||
}
|
||||
/*
|
||||
|
|
@ -969,11 +969,11 @@ findnode(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
|
|||
RWLOCK(&rbtdb->tree_lock, locktype);
|
||||
node = NULL;
|
||||
result = dns_rbt_addnode(rbtdb->tree, name, &node);
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
dns_rbt_namefromnode(node, &nodename);
|
||||
node->locknum = dns_name_hash(&nodename, ISC_TRUE) %
|
||||
rbtdb->node_lock_count;
|
||||
} else if (result != DNS_R_EXISTS) {
|
||||
} else if (result != ISC_R_EXISTS) {
|
||||
RWUNLOCK(&rbtdb->tree_lock, locktype);
|
||||
return (result);
|
||||
}
|
||||
|
|
@ -986,7 +986,7 @@ findnode(dns_db_t *db, dns_name_t *name, isc_boolean_t create,
|
|||
|
||||
*nodep = (dns_dbnode_t *)node;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -1102,7 +1102,7 @@ zone_zonecut_callback(dns_rbtnode_t *node, dns_name_t *name, void *arg) {
|
|||
zcname = dns_fixedname_name(&search->zonecut_name);
|
||||
RUNTIME_CHECK(dns_name_concatenate(name, NULL, zcname,
|
||||
NULL) ==
|
||||
DNS_R_SUCCESS);
|
||||
ISC_R_SUCCESS);
|
||||
search->copy_name = ISC_TRUE;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -1194,7 +1194,7 @@ setup_delegation(rbtdb_search_t *search, dns_dbnode_t **nodep,
|
|||
if (foundname != NULL && search->copy_name) {
|
||||
zcname = dns_fixedname_name(&search->zonecut_name);
|
||||
result = dns_name_concatenate(zcname, NULL, foundname, NULL);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
if (nodep != NULL) {
|
||||
|
|
@ -1280,7 +1280,7 @@ find_wildcard(rbtdb_search_t *search, dns_rbtnode_t **nodep) {
|
|||
unsigned int i, j;
|
||||
dns_rbtnode_t *node, *level_node, *wnode;
|
||||
rdatasetheader_t *header;
|
||||
isc_result_t result = DNS_R_NOTFOUND;
|
||||
isc_result_t result = ISC_R_NOTFOUND;
|
||||
dns_name_t name;
|
||||
dns_name_t *wname;
|
||||
dns_fixedname_t fwname;
|
||||
|
|
@ -1345,7 +1345,7 @@ find_wildcard(rbtdb_search_t *search, dns_rbtnode_t **nodep) {
|
|||
result = dns_name_concatenate(dns_wildcardname, &name,
|
||||
wname, NULL);
|
||||
j = i;
|
||||
while (result == DNS_R_SUCCESS && j != 0) {
|
||||
while (result == ISC_R_SUCCESS && j != 0) {
|
||||
j--;
|
||||
level_node = search->chain.levels[j];
|
||||
dns_name_init(&name, NULL);
|
||||
|
|
@ -1355,14 +1355,14 @@ find_wildcard(rbtdb_search_t *search, dns_rbtnode_t **nodep) {
|
|||
wname,
|
||||
NULL);
|
||||
}
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
break;
|
||||
|
||||
wnode = NULL;
|
||||
result = dns_rbt_findnode(rbtdb->tree, wname,
|
||||
NULL, &wnode, NULL,
|
||||
ISC_TRUE, NULL, NULL);
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
/*
|
||||
* We have found the wildcard node. If it
|
||||
* is active in the search's version, we're
|
||||
|
|
@ -1381,13 +1381,13 @@ find_wildcard(rbtdb_search_t *search, dns_rbtnode_t **nodep) {
|
|||
/*
|
||||
* The wildcard node is active!
|
||||
*
|
||||
* Note: result is still DNS_R_SUCCESS
|
||||
* Note: result is still ISC_R_SUCCESS
|
||||
* so we don't have to set it.
|
||||
*/
|
||||
*nodep = wnode;
|
||||
break;
|
||||
}
|
||||
} else if (result != DNS_R_NOTFOUND &&
|
||||
} else if (result != ISC_R_NOTFOUND &&
|
||||
result != DNS_R_PARTIALMATCH) {
|
||||
/*
|
||||
* An error has occurred. Bail out.
|
||||
|
|
@ -1402,7 +1402,7 @@ find_wildcard(rbtdb_search_t *search, dns_rbtnode_t **nodep) {
|
|||
* present at higher levels has no
|
||||
* effect and we're done.
|
||||
*/
|
||||
result = DNS_R_NOTFOUND;
|
||||
result = ISC_R_NOTFOUND;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -1556,11 +1556,11 @@ find_closest_nxt(rbtdb_search_t *search, dns_dbnode_t **nodep,
|
|||
} while (empty_node && result == ISC_R_SUCCESS);
|
||||
|
||||
/*
|
||||
* If the result is DNS_R_NOMORE, then we got to the beginning of
|
||||
* If the result is ISC_R_NOMORE, then we got to the beginning of
|
||||
* the database and didn't find a NXT record. This shouldn't
|
||||
* happen.
|
||||
*/
|
||||
if (result == DNS_R_NOMORE)
|
||||
if (result == ISC_R_NOMORE)
|
||||
result = DNS_R_BADDB;
|
||||
|
||||
return (result);
|
||||
|
|
@ -1647,10 +1647,10 @@ zone_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
|
|||
* in the current version.
|
||||
*/
|
||||
result = find_wildcard(&search, &node);
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
result = dns_name_concatenate(name, NULL,
|
||||
foundname, NULL);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto tree_exit;
|
||||
wild = ISC_TRUE;
|
||||
goto found;
|
||||
|
|
@ -1671,7 +1671,7 @@ zone_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
|
|||
} else
|
||||
result = DNS_R_NXDOMAIN;
|
||||
goto tree_exit;
|
||||
} else if (result != DNS_R_SUCCESS)
|
||||
} else if (result != ISC_R_SUCCESS)
|
||||
goto tree_exit;
|
||||
|
||||
found:
|
||||
|
|
@ -1879,7 +1879,7 @@ zone_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
|
|||
/*
|
||||
* The desired type doesn't exist.
|
||||
*/
|
||||
result = DNS_R_NXRDATASET;
|
||||
result = DNS_R_NXRRSET;
|
||||
if (search.rbtdb->secure &&
|
||||
(nxtheader == NULL || nxtsig == NULL)) {
|
||||
/*
|
||||
|
|
@ -1925,7 +1925,7 @@ zone_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
|
|||
if (search.zonecut == node) {
|
||||
if (type == dns_rdatatype_nxt ||
|
||||
type == dns_rdatatype_key)
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
else if (type == dns_rdatatype_any)
|
||||
result = DNS_R_ZONECUT;
|
||||
else
|
||||
|
|
@ -1951,7 +1951,7 @@ zone_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
|
|||
/*
|
||||
* An ordinary successful query!
|
||||
*/
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
if (nodep != NULL) {
|
||||
|
|
@ -2015,7 +2015,7 @@ zone_findzonecut(dns_db_t *db, dns_name_t *name, unsigned int options,
|
|||
|
||||
FATAL_ERROR(__FILE__, __LINE__, "zone_findzonecut() called!");
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -2099,7 +2099,7 @@ find_deepest_zonecut(rbtdb_search_t *search, dns_rbtnode_t *node,
|
|||
dns_rbtnode_t *level_node;
|
||||
rdatasetheader_t *header, *header_prev, *header_next;
|
||||
rdatasetheader_t *found, *foundsig;
|
||||
isc_result_t result = DNS_R_NOTFOUND;
|
||||
isc_result_t result = ISC_R_NOTFOUND;
|
||||
dns_name_t name;
|
||||
dns_rbtdb_t *rbtdb;
|
||||
isc_boolean_t done;
|
||||
|
|
@ -2182,7 +2182,7 @@ find_deepest_zonecut(rbtdb_search_t *search, dns_rbtnode_t *node,
|
|||
dns_rbt_namefromnode(node, &name);
|
||||
result = dns_name_concatenate(&name, NULL,
|
||||
foundname, NULL);
|
||||
while (result == DNS_R_SUCCESS && i > 0) {
|
||||
while (result == ISC_R_SUCCESS && i > 0) {
|
||||
i--;
|
||||
level_node = search->chain.levels[i];
|
||||
dns_name_init(&name, NULL);
|
||||
|
|
@ -2194,7 +2194,7 @@ find_deepest_zonecut(rbtdb_search_t *search, dns_rbtnode_t *node,
|
|||
foundname,
|
||||
NULL);
|
||||
}
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
*nodep = NULL;
|
||||
goto node_exit;
|
||||
}
|
||||
|
|
@ -2283,7 +2283,7 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
|
|||
sigrdataset);
|
||||
goto tree_exit;
|
||||
}
|
||||
} else if (result != DNS_R_SUCCESS)
|
||||
} else if (result != ISC_R_SUCCESS)
|
||||
goto tree_exit;
|
||||
|
||||
/*
|
||||
|
|
@ -2480,7 +2480,7 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
|
|||
/*
|
||||
* An ordinary successful query!
|
||||
*/
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
if (type != dns_rdatatype_any || result == DNS_R_NCACHENXDOMAIN) {
|
||||
|
|
@ -2547,7 +2547,7 @@ cache_findzonecut(dns_db_t *db, dns_name_t *name, unsigned int options,
|
|||
result = find_deepest_zonecut(&search, node, nodep, foundname,
|
||||
rdataset, sigrdataset);
|
||||
goto tree_exit;
|
||||
} else if (result != DNS_R_SUCCESS)
|
||||
} else if (result != ISC_R_SUCCESS)
|
||||
goto tree_exit;
|
||||
|
||||
/*
|
||||
|
|
@ -2634,7 +2634,7 @@ cache_findzonecut(dns_db_t *db, dns_name_t *name, unsigned int options,
|
|||
dns_rbtnodechain_reset(&search.chain);
|
||||
|
||||
if (result == DNS_R_DELEGATION)
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
|
@ -2713,7 +2713,7 @@ expirenode(dns_db_t *db, dns_dbnode_t *node, isc_stdtime_t now) {
|
|||
|
||||
UNLOCK(&rbtdb->node_locks[rbtnode->locknum].lock);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -2767,7 +2767,7 @@ createiterator(dns_db_t *db, isc_boolean_t relative_names,
|
|||
|
||||
rbtdbiter = isc_mem_get(rbtdb->common.mctx, sizeof *rbtdbiter);
|
||||
if (rbtdbiter == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
rbtdbiter->common.methods = &dbiterator_methods;
|
||||
dns_db_attach(db, &rbtdbiter->common.db);
|
||||
|
|
@ -2775,7 +2775,7 @@ createiterator(dns_db_t *db, isc_boolean_t relative_names,
|
|||
rbtdbiter->common.magic = DNS_DBITERATOR_MAGIC;
|
||||
rbtdbiter->paused = ISC_FALSE;
|
||||
rbtdbiter->tree_locked = ISC_FALSE;
|
||||
rbtdbiter->result = DNS_R_SUCCESS;
|
||||
rbtdbiter->result = ISC_R_SUCCESS;
|
||||
dns_fixedname_init(&rbtdbiter->name);
|
||||
dns_fixedname_init(&rbtdbiter->origin);
|
||||
rbtdbiter->node = NULL;
|
||||
|
|
@ -2783,7 +2783,7 @@ createiterator(dns_db_t *db, isc_boolean_t relative_names,
|
|||
|
||||
*iteratorp = (dns_dbiterator_t *)rbtdbiter;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -2865,9 +2865,9 @@ zone_findrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
|||
closeversion(db, (dns_dbversion_t **)(&rbtversion), ISC_FALSE);
|
||||
|
||||
if (found == NULL)
|
||||
return (DNS_R_NOTFOUND);
|
||||
return (ISC_R_NOTFOUND);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -2935,7 +2935,7 @@ cache_findrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
|||
UNLOCK(&rbtdb->node_locks[rbtnode->locknum].lock);
|
||||
|
||||
if (found == NULL)
|
||||
return (DNS_R_NOTFOUND);
|
||||
return (ISC_R_NOTFOUND);
|
||||
|
||||
if (RBTDB_RDATATYPE_BASE(found->type) == 0) {
|
||||
/*
|
||||
|
|
@ -2963,7 +2963,7 @@ allrdatasets(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
|||
|
||||
iterator = isc_mem_get(rbtdb->common.mctx, sizeof *iterator);
|
||||
if (iterator == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
if ((db->attributes & DNS_DBATTR_CACHE) == 0) {
|
||||
now = 0;
|
||||
|
|
@ -3000,7 +3000,7 @@ allrdatasets(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
|||
|
||||
*iteratorp = (dns_rdatasetiter_t *)iterator;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -3046,7 +3046,7 @@ add(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
|
|||
changed = add_changed(rbtdb, rbtversion, rbtnode);
|
||||
if (changed == NULL) {
|
||||
free_rdataset(rbtdb->common.mctx, newheader);
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3200,7 +3200,7 @@ add(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
|
|||
(dns_rdatatype_t)header->type,
|
||||
force,
|
||||
&merged);
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
/*
|
||||
* If 'header' has the same serial number as
|
||||
* we do, we could clean it up now if we knew
|
||||
|
|
@ -3288,7 +3288,7 @@ add(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
|
|||
if (addedrdataset != NULL)
|
||||
bind_rdataset(rbtdb, rbtnode, newheader, now, addedrdataset);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_boolean_t
|
||||
|
|
@ -3330,7 +3330,7 @@ addrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
|||
result = dns_rdataslab_fromrdataset(rdataset, rbtdb->common.mctx,
|
||||
®ion,
|
||||
sizeof (rdatasetheader_t));
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
newheader = (rdatasetheader_t *)region.base;
|
||||
|
|
@ -3363,7 +3363,7 @@ addrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
|||
|
||||
result = add(rbtdb, rbtnode, rbtversion, newheader, options, ISC_FALSE,
|
||||
addedrdataset, now);
|
||||
if (result == DNS_R_SUCCESS && delegating)
|
||||
if (result == ISC_R_SUCCESS && delegating)
|
||||
rbtnode->find_callback = 1;
|
||||
|
||||
UNLOCK(&rbtdb->node_locks[rbtnode->locknum].lock);
|
||||
|
|
@ -3392,7 +3392,7 @@ subtractrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
|||
result = dns_rdataslab_fromrdataset(rdataset, rbtdb->common.mctx,
|
||||
®ion,
|
||||
sizeof (rdatasetheader_t));
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
newheader = (rdatasetheader_t *)region.base;
|
||||
newheader->ttl = 0;
|
||||
|
|
@ -3407,7 +3407,7 @@ subtractrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
|||
changed = add_changed(rbtdb, rbtversion, rbtnode);
|
||||
if (changed == NULL) {
|
||||
free_rdataset(rbtdb->common.mctx, newheader);
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
|
||||
topheader_prev = NULL;
|
||||
|
|
@ -3436,7 +3436,7 @@ subtractrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
|||
rbtdb->common.rdclass,
|
||||
(dns_rdatatype_t)header->type,
|
||||
&subresult);
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
free_rdataset(rbtdb->common.mctx, newheader);
|
||||
newheader = (rdatasetheader_t *)subresult;
|
||||
/*
|
||||
|
|
@ -3445,7 +3445,7 @@ subtractrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
|||
* header, not newheader.
|
||||
*/
|
||||
newheader->serial = rbtversion->serial;
|
||||
} else if (result == DNS_R_NXRDATASET) {
|
||||
} else if (result == DNS_R_NXRRSET) {
|
||||
/*
|
||||
* This subtraction would remove all of the rdata;
|
||||
* add a nonexistent header instead.
|
||||
|
|
@ -3454,7 +3454,7 @@ subtractrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
|||
newheader = isc_mem_get(rbtdb->common.mctx,
|
||||
sizeof *newheader);
|
||||
if (newheader == NULL) {
|
||||
result = DNS_R_NOMEMORY;
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto unlock;
|
||||
}
|
||||
newheader->ttl = 0;
|
||||
|
|
@ -3490,7 +3490,7 @@ subtractrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
|||
result = DNS_R_UNCHANGED;
|
||||
}
|
||||
|
||||
if (result == DNS_R_SUCCESS && newrdataset != NULL)
|
||||
if (result == ISC_R_SUCCESS && newrdataset != NULL)
|
||||
bind_rdataset(rbtdb, rbtnode, newheader, 0, newrdataset);
|
||||
|
||||
unlock:
|
||||
|
|
@ -3512,13 +3512,13 @@ deleterdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
|||
REQUIRE(VALID_RBTDB(rbtdb));
|
||||
|
||||
if (type == dns_rdatatype_any)
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
if (type == dns_rdatatype_sig && covers == 0)
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
|
||||
newheader = isc_mem_get(rbtdb->common.mctx, sizeof *newheader);
|
||||
if (newheader == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
newheader->ttl = 0;
|
||||
newheader->type = RBTDB_RDATATYPE_VALUE(type, covers);
|
||||
newheader->attributes = RDATASET_ATTR_NONEXISTENT;
|
||||
|
|
@ -3574,7 +3574,7 @@ loading_addrdataset(void *arg, dns_name_t *name, dns_rdataset_t *rdataset) {
|
|||
dns_name_getlabelsequence(name, 1, n, &foundname);
|
||||
node = NULL;
|
||||
result = dns_rbt_addnode(rbtdb->tree, &foundname, &node);
|
||||
if (result != DNS_R_SUCCESS && result != DNS_R_EXISTS)
|
||||
if (result != ISC_R_SUCCESS && result != ISC_R_EXISTS)
|
||||
return (result);
|
||||
node->find_callback = 1;
|
||||
node->wild = 1;
|
||||
|
|
@ -3582,9 +3582,9 @@ loading_addrdataset(void *arg, dns_name_t *name, dns_rdataset_t *rdataset) {
|
|||
|
||||
node = NULL;
|
||||
result = dns_rbt_addnode(rbtdb->tree, name, &node);
|
||||
if (result != DNS_R_SUCCESS && result != DNS_R_EXISTS)
|
||||
if (result != ISC_R_SUCCESS && result != ISC_R_EXISTS)
|
||||
return (result);
|
||||
if (result != DNS_R_EXISTS) {
|
||||
if (result != ISC_R_EXISTS) {
|
||||
dns_name_init(&foundname, NULL);
|
||||
dns_rbt_namefromnode(node, &foundname);
|
||||
node->locknum = dns_name_hash(&foundname, ISC_TRUE) %
|
||||
|
|
@ -3594,7 +3594,7 @@ loading_addrdataset(void *arg, dns_name_t *name, dns_rdataset_t *rdataset) {
|
|||
result = dns_rdataslab_fromrdataset(rdataset, rbtdb->common.mctx,
|
||||
®ion,
|
||||
sizeof (rdatasetheader_t));
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
newheader = (rdatasetheader_t *)region.base;
|
||||
newheader->ttl = rdataset->ttl + loadctx->now; /* XXX overflow check */
|
||||
|
|
@ -3606,11 +3606,11 @@ loading_addrdataset(void *arg, dns_name_t *name, dns_rdataset_t *rdataset) {
|
|||
|
||||
result = add(rbtdb, node, rbtdb->current_version, newheader,
|
||||
DNS_DBADD_MERGE, ISC_TRUE, NULL, 0);
|
||||
if (result == DNS_R_SUCCESS &&
|
||||
if (result == ISC_R_SUCCESS &&
|
||||
delegating_type(rbtdb, node, rdataset->type))
|
||||
node->find_callback = 1;
|
||||
else if (result == DNS_R_UNCHANGED)
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
|
@ -3626,7 +3626,7 @@ beginload(dns_db_t *db, dns_addrdatasetfunc_t *addp, dns_dbload_t **dbloadp) {
|
|||
|
||||
loadctx = isc_mem_get(rbtdb->common.mctx, sizeof *loadctx);
|
||||
if (loadctx == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
loadctx->rbtdb = rbtdb;
|
||||
if ((rbtdb->common.attributes & DNS_DBATTR_CACHE) != 0)
|
||||
|
|
@ -3645,7 +3645,7 @@ beginload(dns_db_t *db, dns_addrdatasetfunc_t *addp, dns_dbload_t **dbloadp) {
|
|||
*addp = loading_addrdataset;
|
||||
*dbloadp = loadctx;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -3690,7 +3690,7 @@ endload(dns_db_t *db, dns_dbload_t **dbloadp) {
|
|||
|
||||
isc_mem_put(rbtdb->common.mctx, loadctx, sizeof *loadctx);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -3806,7 +3806,7 @@ dns_rbtdb_create
|
|||
|
||||
rbtdb = isc_mem_get(mctx, sizeof *rbtdb);
|
||||
if (rbtdb == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
memset(rbtdb, '\0', sizeof *rbtdb);
|
||||
dns_name_init(&rbtdb->common.origin, NULL);
|
||||
rbtdb->common.attributes = 0;
|
||||
|
|
@ -3824,7 +3824,7 @@ dns_rbtdb_create
|
|||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_mutex_init() failed: %s",
|
||||
isc_result_totext(result));
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
|
||||
result = isc_rwlock_init(&rbtdb->tree_lock, 0, 0);
|
||||
|
|
@ -3834,7 +3834,7 @@ dns_rbtdb_create
|
|||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_rwlock_init() failed: %s",
|
||||
isc_result_totext(result));
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
|
||||
INSIST(rbtdb->node_lock_count < (1 << DNS_RBT_LOCKLENGTH));
|
||||
|
|
@ -3860,7 +3860,7 @@ dns_rbtdb_create
|
|||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_mutex_init() failed: %s",
|
||||
isc_result_totext(result));
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
rbtdb->node_locks[i].references = 0;
|
||||
rbtdb->node_locks[i].exiting = ISC_FALSE;
|
||||
|
|
@ -3879,7 +3879,7 @@ dns_rbtdb_create
|
|||
* Make the Red-Black Tree.
|
||||
*/
|
||||
result = dns_rbt_create(mctx, delete_callback, rbtdb, &rbtdb->tree);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
free_rbtdb(rbtdb);
|
||||
return (result);
|
||||
}
|
||||
|
|
@ -3900,8 +3900,8 @@ dns_rbtdb_create
|
|||
rbtdb->origin_node = NULL;
|
||||
result = dns_rbt_addnode(rbtdb->tree, &rbtdb->common.origin,
|
||||
&rbtdb->origin_node);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
INSIST(result != DNS_R_EXISTS);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
INSIST(result != ISC_R_EXISTS);
|
||||
free_rbtdb(rbtdb);
|
||||
return (result);
|
||||
}
|
||||
|
|
@ -3931,7 +3931,7 @@ dns_rbtdb_create
|
|||
rbtdb->current_version = allocate_version(mctx, 1, 0, ISC_FALSE);
|
||||
if (rbtdb->current_version == NULL) {
|
||||
free_rbtdb(rbtdb);
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
}
|
||||
rbtdb->future_version = NULL;
|
||||
ISC_LIST_INIT(rbtdb->open_versions);
|
||||
|
|
@ -3943,7 +3943,7 @@ dns_rbtdb_create
|
|||
|
||||
*dbp = (dns_db_t *)rbtdb;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -3967,7 +3967,7 @@ rdataset_first(dns_rdataset_t *rdataset) {
|
|||
count = raw[0] * 256 + raw[1];
|
||||
if (count == 0) {
|
||||
rdataset->private5 = NULL;
|
||||
return (DNS_R_NOMORE);
|
||||
return (ISC_R_NOMORE);
|
||||
}
|
||||
raw += 2;
|
||||
/*
|
||||
|
|
@ -3979,7 +3979,7 @@ rdataset_first(dns_rdataset_t *rdataset) {
|
|||
rdataset->private4 = (void *)count;
|
||||
rdataset->private5 = raw;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -3990,7 +3990,7 @@ rdataset_next(dns_rdataset_t *rdataset) {
|
|||
|
||||
count = (unsigned int)rdataset->private4;
|
||||
if (count == 0)
|
||||
return (DNS_R_NOMORE);
|
||||
return (ISC_R_NOMORE);
|
||||
count--;
|
||||
rdataset->private4 = (void *)count;
|
||||
raw = rdataset->private5;
|
||||
|
|
@ -3998,7 +3998,7 @@ rdataset_next(dns_rdataset_t *rdataset) {
|
|||
raw += length + 2;
|
||||
rdataset->private5 = raw;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -4106,9 +4106,9 @@ rdatasetiter_first(dns_rdatasetiter_t *iterator) {
|
|||
rbtiterator->current = header;
|
||||
|
||||
if (header == NULL)
|
||||
return (DNS_R_NOMORE);
|
||||
return (ISC_R_NOMORE);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -4124,7 +4124,7 @@ rdatasetiter_next(dns_rdatasetiter_t *iterator) {
|
|||
|
||||
header = rbtiterator->current;
|
||||
if (header == NULL)
|
||||
return (DNS_R_NOMORE);
|
||||
return (ISC_R_NOMORE);
|
||||
|
||||
if ((rbtdb->common.attributes & DNS_DBATTR_CACHE) == 0) {
|
||||
serial = rbtversion->serial;
|
||||
|
|
@ -4165,9 +4165,9 @@ rdatasetiter_next(dns_rdatasetiter_t *iterator) {
|
|||
rbtiterator->current = header;
|
||||
|
||||
if (header == NULL)
|
||||
return (DNS_R_NOMORE);
|
||||
return (ISC_R_NOMORE);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -4247,8 +4247,8 @@ dbiterator_first(dns_dbiterator_t *iterator) {
|
|||
dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)iterator->db;
|
||||
dns_name_t *name, *origin;
|
||||
|
||||
if (rbtdbiter->result != DNS_R_SUCCESS &&
|
||||
rbtdbiter->result != DNS_R_NOMORE)
|
||||
if (rbtdbiter->result != ISC_R_SUCCESS &&
|
||||
rbtdbiter->result != ISC_R_NOMORE)
|
||||
return (rbtdbiter->result);
|
||||
|
||||
unpause(rbtdbiter);
|
||||
|
|
@ -4264,18 +4264,18 @@ dbiterator_first(dns_dbiterator_t *iterator) {
|
|||
result = dns_rbtnodechain_first(&rbtdbiter->chain, rbtdb->tree, name,
|
||||
origin);
|
||||
if (result != DNS_R_NEWORIGIN) {
|
||||
INSIST(result != DNS_R_SUCCESS);
|
||||
if (result == DNS_R_NOTFOUND) {
|
||||
INSIST(result != ISC_R_SUCCESS);
|
||||
if (result == ISC_R_NOTFOUND) {
|
||||
/*
|
||||
* The tree is empty.
|
||||
*/
|
||||
result = DNS_R_NOMORE;
|
||||
result = ISC_R_NOMORE;
|
||||
}
|
||||
rbtdbiter->node = NULL;
|
||||
} else {
|
||||
result = dns_rbtnodechain_current(&rbtdbiter->chain, NULL,
|
||||
NULL, &rbtdbiter->node);
|
||||
if (result == DNS_R_SUCCESS)
|
||||
if (result == ISC_R_SUCCESS)
|
||||
rbtdbiter->new_origin = ISC_TRUE;
|
||||
else
|
||||
rbtdbiter->node = NULL;
|
||||
|
|
@ -4292,8 +4292,8 @@ dbiterator_last(dns_dbiterator_t *iterator) {
|
|||
dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)iterator->db;
|
||||
dns_name_t *name, *origin;
|
||||
|
||||
if (rbtdbiter->result != DNS_R_SUCCESS &&
|
||||
rbtdbiter->result != DNS_R_NOMORE)
|
||||
if (rbtdbiter->result != ISC_R_SUCCESS &&
|
||||
rbtdbiter->result != ISC_R_NOMORE)
|
||||
return (rbtdbiter->result);
|
||||
|
||||
unpause(rbtdbiter);
|
||||
|
|
@ -4309,18 +4309,18 @@ dbiterator_last(dns_dbiterator_t *iterator) {
|
|||
result = dns_rbtnodechain_last(&rbtdbiter->chain, rbtdb->tree, name,
|
||||
origin);
|
||||
if (result != DNS_R_NEWORIGIN) {
|
||||
INSIST(result != DNS_R_SUCCESS);
|
||||
if (result == DNS_R_NOTFOUND) {
|
||||
INSIST(result != ISC_R_SUCCESS);
|
||||
if (result == ISC_R_NOTFOUND) {
|
||||
/*
|
||||
* The tree is empty.
|
||||
*/
|
||||
result = DNS_R_NOMORE;
|
||||
result = ISC_R_NOMORE;
|
||||
}
|
||||
rbtdbiter->node = NULL;
|
||||
} else {
|
||||
result = dns_rbtnodechain_current(&rbtdbiter->chain, NULL,
|
||||
NULL, &rbtdbiter->node);
|
||||
if (result == DNS_R_SUCCESS)
|
||||
if (result == ISC_R_SUCCESS)
|
||||
rbtdbiter->new_origin = ISC_TRUE;
|
||||
else
|
||||
rbtdbiter->node = NULL;
|
||||
|
|
@ -4337,8 +4337,8 @@ dbiterator_seek(dns_dbiterator_t *iterator, dns_name_t *name) {
|
|||
dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)iterator->db;
|
||||
dns_name_t *iname, *origin;
|
||||
|
||||
if (rbtdbiter->result != DNS_R_SUCCESS &&
|
||||
rbtdbiter->result != DNS_R_NOMORE)
|
||||
if (rbtdbiter->result != ISC_R_SUCCESS &&
|
||||
rbtdbiter->result != ISC_R_NOMORE)
|
||||
return (rbtdbiter->result);
|
||||
|
||||
unpause(rbtdbiter);
|
||||
|
|
@ -4354,14 +4354,14 @@ dbiterator_seek(dns_dbiterator_t *iterator, dns_name_t *name) {
|
|||
rbtdbiter->node = NULL;
|
||||
result = dns_rbt_findnode(rbtdb->tree, name, NULL, &rbtdbiter->node,
|
||||
&rbtdbiter->chain, ISC_TRUE, NULL, NULL);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
if (result == DNS_R_PARTIALMATCH)
|
||||
result = DNS_R_NOTFOUND;
|
||||
result = ISC_R_NOTFOUND;
|
||||
rbtdbiter->node = NULL;
|
||||
} else {
|
||||
result = dns_rbtnodechain_current(&rbtdbiter->chain, iname,
|
||||
origin, NULL);
|
||||
if (result == DNS_R_SUCCESS)
|
||||
if (result == ISC_R_SUCCESS)
|
||||
rbtdbiter->new_origin = ISC_TRUE;
|
||||
else
|
||||
rbtdbiter->node = NULL;
|
||||
|
|
@ -4379,7 +4379,7 @@ dbiterator_prev(dns_dbiterator_t *iterator) {
|
|||
|
||||
REQUIRE(rbtdbiter->node != NULL);
|
||||
|
||||
if (rbtdbiter->result != DNS_R_SUCCESS)
|
||||
if (rbtdbiter->result != ISC_R_SUCCESS)
|
||||
return (rbtdbiter->result);
|
||||
|
||||
if (rbtdbiter->paused)
|
||||
|
|
@ -4388,14 +4388,14 @@ dbiterator_prev(dns_dbiterator_t *iterator) {
|
|||
name = dns_fixedname_name(&rbtdbiter->name);
|
||||
origin = dns_fixedname_name(&rbtdbiter->origin);
|
||||
result = dns_rbtnodechain_prev(&rbtdbiter->chain, name, origin);
|
||||
if (result == DNS_R_NEWORIGIN || result == DNS_R_SUCCESS) {
|
||||
if (result == DNS_R_NEWORIGIN || result == ISC_R_SUCCESS) {
|
||||
if (result == DNS_R_NEWORIGIN)
|
||||
rbtdbiter->new_origin = ISC_TRUE;
|
||||
else
|
||||
rbtdbiter->new_origin = ISC_FALSE;
|
||||
result = dns_rbtnodechain_current(&rbtdbiter->chain, NULL,
|
||||
NULL, &rbtdbiter->node);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
rbtdbiter->result = result;
|
||||
rbtdbiter->node = NULL;
|
||||
}
|
||||
|
|
@ -4413,7 +4413,7 @@ dbiterator_next(dns_dbiterator_t *iterator) {
|
|||
|
||||
REQUIRE(rbtdbiter->node != NULL);
|
||||
|
||||
if (rbtdbiter->result != DNS_R_SUCCESS)
|
||||
if (rbtdbiter->result != ISC_R_SUCCESS)
|
||||
return (rbtdbiter->result);
|
||||
|
||||
if (rbtdbiter->paused)
|
||||
|
|
@ -4422,14 +4422,14 @@ dbiterator_next(dns_dbiterator_t *iterator) {
|
|||
name = dns_fixedname_name(&rbtdbiter->name);
|
||||
origin = dns_fixedname_name(&rbtdbiter->origin);
|
||||
result = dns_rbtnodechain_next(&rbtdbiter->chain, name, origin);
|
||||
if (result == DNS_R_NEWORIGIN || result == DNS_R_SUCCESS) {
|
||||
if (result == DNS_R_NEWORIGIN || result == ISC_R_SUCCESS) {
|
||||
if (result == DNS_R_NEWORIGIN)
|
||||
rbtdbiter->new_origin = ISC_TRUE;
|
||||
else
|
||||
rbtdbiter->new_origin = ISC_FALSE;
|
||||
result = dns_rbtnodechain_current(&rbtdbiter->chain, NULL,
|
||||
NULL, &rbtdbiter->node);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
rbtdbiter->result = result;
|
||||
rbtdbiter->node = NULL;
|
||||
}
|
||||
|
|
@ -4457,7 +4457,7 @@ dbiterator_current(dns_dbiterator_t *iterator, dns_dbnode_t **nodep,
|
|||
dns_name_t *nodename = dns_fixedname_name(&rbtdbiter->name);
|
||||
dns_name_t *origin = dns_fixedname_name(&rbtdbiter->origin);
|
||||
|
||||
REQUIRE(rbtdbiter->result == DNS_R_SUCCESS);
|
||||
REQUIRE(rbtdbiter->result == ISC_R_SUCCESS);
|
||||
REQUIRE(rbtdbiter->node != NULL);
|
||||
|
||||
if (rbtdbiter->paused)
|
||||
|
|
@ -4467,12 +4467,12 @@ dbiterator_current(dns_dbiterator_t *iterator, dns_dbnode_t **nodep,
|
|||
if (rbtdbiter->common.relative_names || rootname(nodename))
|
||||
origin = NULL;
|
||||
result = dns_name_concatenate(nodename, origin, name, NULL);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
if (rbtdbiter->common.relative_names && rbtdbiter->new_origin)
|
||||
result = DNS_R_NEWORIGIN;
|
||||
} else
|
||||
result = DNS_R_SUCCESS;
|
||||
result = ISC_R_SUCCESS;
|
||||
|
||||
LOCK(&rbtdb->node_locks[node->locknum].lock);
|
||||
new_reference(rbtdb, node);
|
||||
|
|
@ -4489,8 +4489,8 @@ dbiterator_pause(dns_dbiterator_t *iterator) {
|
|||
rbtdb_dbiterator_t *rbtdbiter = (rbtdb_dbiterator_t *)iterator;
|
||||
dns_rbtnode_t *node = rbtdbiter->node;
|
||||
|
||||
if (rbtdbiter->result != DNS_R_SUCCESS &&
|
||||
rbtdbiter->result != DNS_R_NOMORE)
|
||||
if (rbtdbiter->result != ISC_R_SUCCESS &&
|
||||
rbtdbiter->result != ISC_R_NOMORE)
|
||||
return (rbtdbiter->result);
|
||||
|
||||
REQUIRE(!rbtdbiter->paused);
|
||||
|
|
@ -4507,7 +4507,7 @@ dbiterator_pause(dns_dbiterator_t *iterator) {
|
|||
RWUNLOCK(&rbtdb->tree_lock, isc_rwlocktype_read);
|
||||
rbtdbiter->tree_locked = ISC_FALSE;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -4515,7 +4515,7 @@ dbiterator_origin(dns_dbiterator_t *iterator, dns_name_t *name) {
|
|||
rbtdb_dbiterator_t *rbtdbiter = (rbtdb_dbiterator_t *)iterator;
|
||||
dns_name_t *origin = dns_fixedname_name(&rbtdbiter->origin);
|
||||
|
||||
if (rbtdbiter->result != DNS_R_SUCCESS)
|
||||
if (rbtdbiter->result != ISC_R_SUCCESS)
|
||||
return (rbtdbiter->result);
|
||||
|
||||
return (dns_name_concatenate(origin, NULL, name, NULL));
|
||||
|
|
|
|||
154
lib/dns/rdata.c
154
lib/dns/rdata.c
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rdata.c,v 1.72 2000/03/22 17:28:57 gson Exp $ */
|
||||
/* $Id: rdata.c,v 1.73 2000/04/06 22:02:10 explorer Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
#define RETERR(x) do { \
|
||||
isc_result_t __r = (x); \
|
||||
if (__r != DNS_R_SUCCESS) \
|
||||
if (__r != ISC_R_SUCCESS) \
|
||||
return (__r); \
|
||||
} while (0)
|
||||
|
||||
|
|
@ -328,7 +328,7 @@ dns_rdata_fromwire(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
|
|||
dns_decompress_t *dctx, isc_boolean_t downcase,
|
||||
isc_buffer_t *target)
|
||||
{
|
||||
isc_result_t result = DNS_R_NOTIMPLEMENTED;
|
||||
isc_result_t result = ISC_R_NOTIMPLEMENTED;
|
||||
isc_region_t region;
|
||||
isc_buffer_t ss;
|
||||
isc_buffer_t st;
|
||||
|
|
@ -349,15 +349,15 @@ dns_rdata_fromwire(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
|
|||
(void)NULL;
|
||||
|
||||
/* We should have consumed all of our buffer. */
|
||||
if (result == DNS_R_SUCCESS && !buffer_empty(source))
|
||||
if (result == ISC_R_SUCCESS && !buffer_empty(source))
|
||||
result = DNS_R_EXTRADATA;
|
||||
|
||||
if (rdata && result == DNS_R_SUCCESS) {
|
||||
if (rdata && result == ISC_R_SUCCESS) {
|
||||
region.length = target->used - st.used;
|
||||
dns_rdata_fromregion(rdata, rdclass, type, ®ion);
|
||||
}
|
||||
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
*source = ss;
|
||||
*target = st;
|
||||
}
|
||||
|
|
@ -368,7 +368,7 @@ isc_result_t
|
|||
dns_rdata_towire(dns_rdata_t *rdata, dns_compress_t *cctx,
|
||||
isc_buffer_t *target)
|
||||
{
|
||||
isc_result_t result = DNS_R_NOTIMPLEMENTED;
|
||||
isc_result_t result = ISC_R_NOTIMPLEMENTED;
|
||||
isc_boolean_t use_default = ISC_FALSE;
|
||||
isc_region_t tr;
|
||||
isc_buffer_t st;
|
||||
|
|
@ -382,12 +382,12 @@ dns_rdata_towire(dns_rdata_t *rdata, dns_compress_t *cctx,
|
|||
if (use_default) {
|
||||
isc_buffer_available(target, &tr);
|
||||
if (tr.length < rdata->length)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
memcpy(tr.base, rdata->data, rdata->length);
|
||||
isc_buffer_add(target, rdata->length);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
*target = st;
|
||||
INSIST(target->used < 65536);
|
||||
dns_compress_rollback(cctx, (isc_uint16_t)target->used);
|
||||
|
|
@ -401,7 +401,7 @@ dns_rdata_fromtext(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
|
|||
dns_name_t *origin, isc_boolean_t downcase,
|
||||
isc_buffer_t *target, dns_rdatacallbacks_t *callbacks)
|
||||
{
|
||||
isc_result_t result = DNS_R_NOTIMPLEMENTED;
|
||||
isc_result_t result = ISC_R_NOTIMPLEMENTED;
|
||||
isc_region_t region;
|
||||
isc_buffer_t st;
|
||||
isc_boolean_t use_default = ISC_FALSE;
|
||||
|
|
@ -442,19 +442,19 @@ dns_rdata_fromtext(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
|
|||
line = isc_lex_getsourceline(lexer);
|
||||
iresult = isc_lex_gettoken(lexer, options, &token);
|
||||
if (iresult != ISC_R_SUCCESS) {
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
switch (iresult) {
|
||||
case ISC_R_NOMEMORY:
|
||||
result = DNS_R_NOMEMORY;
|
||||
result = ISC_R_NOMEMORY;
|
||||
break;
|
||||
case ISC_R_NOSPACE:
|
||||
result = DNS_R_NOSPACE;
|
||||
result = ISC_R_NOSPACE;
|
||||
break;
|
||||
default:
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_lex_gettoken() failed: %s",
|
||||
isc_result_totext(result));
|
||||
result = DNS_R_UNEXPECTED;
|
||||
result = ISC_R_UNEXPECTED;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -464,14 +464,14 @@ dns_rdata_fromtext(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
|
|||
break;
|
||||
} else if (token.type != isc_tokentype_eol &&
|
||||
token.type != isc_tokentype_eof) {
|
||||
if (result == DNS_R_SUCCESS)
|
||||
if (result == ISC_R_SUCCESS)
|
||||
result = DNS_R_EXTRATOKEN;
|
||||
if (callback != NULL) {
|
||||
fromtext_error(callback, callbacks, name,
|
||||
line, &token, result);
|
||||
callback = NULL;
|
||||
}
|
||||
} else if (result != DNS_R_SUCCESS && callback != NULL) {
|
||||
} else if (result != ISC_R_SUCCESS && callback != NULL) {
|
||||
fromtext_error(callback, callbacks, name, line,
|
||||
&token, result);
|
||||
break;
|
||||
|
|
@ -479,11 +479,11 @@ dns_rdata_fromtext(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
|
|||
break;
|
||||
} while (1);
|
||||
|
||||
if (rdata != NULL && result == DNS_R_SUCCESS) {
|
||||
if (rdata != NULL && result == ISC_R_SUCCESS) {
|
||||
region.length = target->used - st.used;
|
||||
dns_rdata_fromregion(rdata, rdclass, type, ®ion);
|
||||
}
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
*target = st;
|
||||
}
|
||||
return (result);
|
||||
|
|
@ -493,7 +493,7 @@ static isc_result_t
|
|||
rdata_totext(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
||||
isc_buffer_t *target)
|
||||
{
|
||||
isc_result_t result = DNS_R_NOTIMPLEMENTED;
|
||||
isc_result_t result = ISC_R_NOTIMPLEMENTED;
|
||||
isc_boolean_t use_default = ISC_FALSE;
|
||||
|
||||
REQUIRE(rdata != NULL);
|
||||
|
|
@ -503,7 +503,7 @@ rdata_totext(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
|||
|
||||
/* Some DynDNS meta-RRs have empty rdata. */
|
||||
if (rdata->length == 0)
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
TOTEXTSWITCH
|
||||
|
||||
|
|
@ -550,7 +550,7 @@ dns_rdata_fromstruct(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
|
|||
dns_rdatatype_t type, void *source,
|
||||
isc_buffer_t *target)
|
||||
{
|
||||
isc_result_t result = DNS_R_NOTIMPLEMENTED;
|
||||
isc_result_t result = ISC_R_NOTIMPLEMENTED;
|
||||
isc_buffer_t st;
|
||||
isc_region_t region;
|
||||
isc_boolean_t use_default = ISC_FALSE;
|
||||
|
|
@ -566,18 +566,18 @@ dns_rdata_fromstruct(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
|
|||
if (use_default)
|
||||
(void)NULL;
|
||||
|
||||
if (rdata != NULL && result == DNS_R_SUCCESS) {
|
||||
if (rdata != NULL && result == ISC_R_SUCCESS) {
|
||||
region.length = target->used - st.used;
|
||||
dns_rdata_fromregion(rdata, rdclass, type, ®ion);
|
||||
}
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
*target = st;
|
||||
return (result);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
dns_rdata_tostruct(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
||||
isc_result_t result = DNS_R_NOTIMPLEMENTED;
|
||||
isc_result_t result = ISC_R_NOTIMPLEMENTED;
|
||||
isc_boolean_t use_default = ISC_FALSE;
|
||||
|
||||
REQUIRE(rdata != NULL);
|
||||
|
|
@ -602,7 +602,7 @@ isc_result_t
|
|||
dns_rdata_additionaldata(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
||||
void *arg)
|
||||
{
|
||||
isc_result_t result = DNS_R_NOTIMPLEMENTED;
|
||||
isc_result_t result = ISC_R_NOTIMPLEMENTED;
|
||||
isc_boolean_t use_default = ISC_FALSE;
|
||||
|
||||
/*
|
||||
|
|
@ -623,7 +623,7 @@ dns_rdata_additionaldata(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
|
||||
isc_result_t
|
||||
dns_rdata_digest(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg) {
|
||||
isc_result_t result = DNS_R_NOTIMPLEMENTED;
|
||||
isc_result_t result = ISC_R_NOTIMPLEMENTED;
|
||||
isc_boolean_t use_default = ISC_FALSE;
|
||||
|
||||
/*
|
||||
|
|
@ -667,7 +667,7 @@ dns_mnemonic_fromtext(unsigned int *valuep, isc_textregion_t *source,
|
|||
if (n > max)
|
||||
return (DNS_R_RANGE);
|
||||
*valuep = n;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
/* It was not a number after all; fall through. */
|
||||
}
|
||||
|
|
@ -678,7 +678,7 @@ dns_mnemonic_fromtext(unsigned int *valuep, isc_textregion_t *source,
|
|||
if (n == source->length &&
|
||||
strncasecmp(source->base, table[i].name, n) == 0) {
|
||||
*valuep = table[i].value;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
}
|
||||
return (DNS_R_UNKNOWN);
|
||||
|
|
@ -711,8 +711,8 @@ dns_rdataclass_fromtext(dns_rdataclass_t *classp, isc_textregion_t *source) {
|
|||
strncasecmp(source->base, classes[i].name, n) == 0) {
|
||||
*classp = classes[i].value;
|
||||
if ((classes[i].flags & RESERVED) != 0)
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
|
@ -739,8 +739,8 @@ dns_rdatatype_fromtext(dns_rdatatype_t *typep, isc_textregion_t *source) {
|
|||
strncasecmp(source->base, types[i].name, n) == 0) {
|
||||
*typep = types[i].value;
|
||||
if ((types[i].flags & RESERVED) != 0)
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
|
@ -766,7 +766,7 @@ dns_rcode_fromtext(dns_rcode_t *rcodep, isc_textregion_t *source) {
|
|||
if (n == source->length &&
|
||||
strncasecmp(source->base, rcodes[i].name, n) == 0) {
|
||||
*rcodep = rcodes[i].value;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
|
@ -783,7 +783,7 @@ dns_cert_fromtext(dns_cert_t *certp, isc_textregion_t *source) {
|
|||
unsigned int value;
|
||||
RETERR(dns_mnemonic_fromtext(&value, source, certs, 0xffff));
|
||||
*certp = value;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -796,7 +796,7 @@ dns_secalg_fromtext(dns_secalg_t *secalgp, isc_textregion_t *source) {
|
|||
unsigned int value;
|
||||
RETERR(dns_mnemonic_fromtext(&value, source, secalgs, 0xff));
|
||||
*secalgp = value;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -809,7 +809,7 @@ dns_secproto_fromtext(dns_secproto_t *secprotop, isc_textregion_t *source) {
|
|||
unsigned int value;
|
||||
RETERR(dns_mnemonic_fromtext(&value, source, secprotos, 0xff));
|
||||
*secprotop = value;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -841,7 +841,7 @@ dns_keyflags_fromtext(dns_keyflags_t *flagsp, isc_textregion_t *source)
|
|||
if (n > 0xffff)
|
||||
return (DNS_R_RANGE);
|
||||
*flagsp = n;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
/* It was not a number after all; fall through. */
|
||||
}
|
||||
|
|
@ -875,7 +875,7 @@ dns_keyflags_fromtext(dns_keyflags_t *flagsp, isc_textregion_t *source)
|
|||
text++; /* Skip "|" */
|
||||
}
|
||||
*flagsp = value;
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/* Private function */
|
||||
|
|
@ -903,13 +903,13 @@ txt_totext(isc_region_t *source, isc_buffer_t *target) {
|
|||
REQUIRE(n + 1 <= source->length);
|
||||
|
||||
if (tl < 1)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
*tp++ = '"';
|
||||
tl--;
|
||||
while (n--) {
|
||||
if (*sp < 0x20 || *sp > 0x7f) {
|
||||
if (tl < 4)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
sprintf(tp, "\\%03u", *sp++);
|
||||
tp += 4;
|
||||
tl -= 4;
|
||||
|
|
@ -917,22 +917,22 @@ txt_totext(isc_region_t *source, isc_buffer_t *target) {
|
|||
}
|
||||
if (*sp == 0x22 || *sp == 0x3b || *sp == 0x5c) {
|
||||
if (tl < 2)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
*tp++ = '\\';
|
||||
tl--;
|
||||
}
|
||||
if (tl < 1)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
*tp++ = *sp++;
|
||||
tl--;
|
||||
}
|
||||
if (tl < 1)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
*tp++ = '"';
|
||||
tl--;
|
||||
isc_buffer_add(target, tp - (char *)region.base);
|
||||
isc_region_consume(source, *source->base + 1);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -952,7 +952,7 @@ txt_fromtext(isc_textregion_t *source, isc_buffer_t *target) {
|
|||
nrem = tregion.length;
|
||||
escape = ISC_FALSE;
|
||||
if (nrem < 1)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
/* Length byte. */
|
||||
nrem--;
|
||||
t++;
|
||||
|
|
@ -985,7 +985,7 @@ txt_fromtext(isc_textregion_t *source, isc_buffer_t *target) {
|
|||
}
|
||||
escape = ISC_FALSE;
|
||||
if (nrem == 0)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
*t++ = c;
|
||||
nrem--;
|
||||
}
|
||||
|
|
@ -993,7 +993,7 @@ txt_fromtext(isc_textregion_t *source, isc_buffer_t *target) {
|
|||
return (DNS_R_SYNTAX);
|
||||
*tregion.base = t - tregion.base - 1;
|
||||
isc_buffer_add(target, *tregion.base + 1);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -1004,19 +1004,19 @@ txt_fromwire(isc_buffer_t *source, isc_buffer_t *target) {
|
|||
|
||||
isc_buffer_active(source, &sregion);
|
||||
if (sregion.length == 0)
|
||||
return(DNS_R_UNEXPECTEDEND);
|
||||
return(ISC_R_UNEXPECTEDEND);
|
||||
n = *sregion.base + 1;
|
||||
if (n > sregion.length)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
|
||||
isc_buffer_available(target, &tregion);
|
||||
if (n > tregion.length)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
|
||||
memcpy(tregion.base, sregion.base, n);
|
||||
isc_buffer_forward(source, n);
|
||||
isc_buffer_add(target, n);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_boolean_t
|
||||
|
|
@ -1055,11 +1055,11 @@ str_totext(char *source, isc_buffer_t *target) {
|
|||
l = strlen(source);
|
||||
|
||||
if (l > region.length)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
|
||||
memcpy(region.base, source, l);
|
||||
isc_buffer_add(target, l);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_boolean_t
|
||||
|
|
@ -1082,9 +1082,9 @@ uint32_tobuffer(isc_uint32_t value, isc_buffer_t *target) {
|
|||
|
||||
isc_buffer_available(target, ®ion);
|
||||
if (region.length < 4)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
isc_buffer_putuint32(target, value);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -1095,9 +1095,9 @@ uint16_tobuffer(isc_uint32_t value, isc_buffer_t *target) {
|
|||
return (DNS_R_RANGE);
|
||||
isc_buffer_available(target, ®ion);
|
||||
if (region.length < 2)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
isc_buffer_putuint16(target, (isc_uint16_t)value);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -1108,9 +1108,9 @@ uint8_tobuffer(isc_uint32_t value, isc_buffer_t *target) {
|
|||
return (DNS_R_RANGE);
|
||||
isc_buffer_available(target, ®ion);
|
||||
if (region.length < 1)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
isc_buffer_putuint8(target, (isc_uint8_t)value);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_uint32_t
|
||||
|
|
@ -1158,29 +1158,29 @@ gettoken(isc_lex_t *lexer, isc_token_t *token, isc_tokentype_t expect,
|
|||
case ISC_R_SUCCESS:
|
||||
break;
|
||||
case ISC_R_NOMEMORY:
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
case ISC_R_NOSPACE:
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
default:
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_lex_gettoken() failed: %s",
|
||||
isc_result_totext(result));
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
}
|
||||
if (eol && ((token->type == isc_tokentype_eol) ||
|
||||
(token->type == isc_tokentype_eof)))
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
if (token->type == isc_tokentype_string &&
|
||||
expect == isc_tokentype_qstring)
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
if (token->type != expect) {
|
||||
isc_lex_ungettoken(lexer, token);
|
||||
if (token->type == isc_tokentype_eol ||
|
||||
token->type == isc_tokentype_eof)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (DNS_R_UNEXPECTEDTOKEN);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDTOKEN);
|
||||
}
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -1189,10 +1189,10 @@ mem_tobuffer(isc_buffer_t *target, void *base, unsigned int length) {
|
|||
|
||||
isc_buffer_available(target, &tr);
|
||||
if (length > tr.length)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
memcpy(tr.base, base, length);
|
||||
isc_buffer_add(target, length);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
@ -1304,7 +1304,7 @@ byte_atob(int c, isc_buffer_t *target, struct state *state) {
|
|||
}
|
||||
} else
|
||||
return(DNS_R_SYNTAX);
|
||||
return(DNS_R_SUCCESS);
|
||||
return(ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/* Compute checksum info and place c into target */
|
||||
|
|
@ -1324,10 +1324,10 @@ putbyte(int c, isc_buffer_t *target, struct state *state) {
|
|||
Crot += c;
|
||||
isc_buffer_available(target, &tr);
|
||||
if (tr.length < 1)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
tr.base[0] = c;
|
||||
isc_buffer_add(target, 1);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/* Read the ASCII-encoded data from inbuf, of length inbuflen, and convert
|
||||
|
|
@ -1385,7 +1385,7 @@ atob_tobuffer(isc_lex_t *lexer, isc_buffer_t *target) {
|
|||
|
||||
if ((oeor != Ceor) || (osum != Csum) || (orot != Crot))
|
||||
return(DNS_R_BADCKSUM);
|
||||
return(DNS_R_SUCCESS);
|
||||
return(ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
/* Encode binary byte c into ASCII representation and place into *bufp,
|
||||
|
|
@ -1411,7 +1411,7 @@ byte_btoa(int c, isc_buffer_t *target, struct state *state) {
|
|||
if (bcount == 3) {
|
||||
if (word == 0) {
|
||||
if (tr.length < 1)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
tr.base[0] = 'z';
|
||||
isc_buffer_add(target, 1);
|
||||
} else {
|
||||
|
|
@ -1428,7 +1428,7 @@ byte_btoa(int c, isc_buffer_t *target, struct state *state) {
|
|||
tmpword -= (isc_int32_t)(85 * 85 * 85 * 85 * 32);
|
||||
}
|
||||
if (tr.length < 5)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
tr.base[0] = atob_digits[(tmpword /
|
||||
(isc_int32_t)(85 * 85 * 85 * 85))
|
||||
+ tmp];
|
||||
|
|
@ -1446,7 +1446,7 @@ byte_btoa(int c, isc_buffer_t *target, struct state *state) {
|
|||
} else {
|
||||
bcount += 1;
|
||||
}
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: tsig_250.c,v 1.25 2000/03/20 22:44:33 gson Exp $ */
|
||||
/* $Id: tsig_250.c,v 1.26 2000/04/06 22:02:40 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Thu Mar 16 13:39:43 PST 2000 by gson */
|
||||
|
||||
|
|
@ -211,34 +211,34 @@ fromwire_any_tsig(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
isc_buffer_active(source, &sr);
|
||||
/* Time Signed + Fudge */
|
||||
if (sr.length < 8)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
RETERR(mem_tobuffer(target, sr.base, 8));
|
||||
isc_region_consume(&sr, 8);
|
||||
isc_buffer_forward(source, 8);
|
||||
|
||||
/* Signature Length + Signature */
|
||||
if (sr.length < 2)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
n = uint16_fromregion(&sr);
|
||||
if (sr.length < n + 2)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
RETERR(mem_tobuffer(target, sr.base, n + 2));
|
||||
isc_region_consume(&sr, n + 2);
|
||||
isc_buffer_forward(source, n + 2);
|
||||
|
||||
/* Original ID + Error */
|
||||
if (sr.length < 4)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
RETERR(mem_tobuffer(target, sr.base, 4));
|
||||
isc_region_consume(&sr, 4);
|
||||
isc_buffer_forward(source, 4);
|
||||
|
||||
/* Other Length + Other */
|
||||
if (sr.length < 2)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
n = uint16_fromregion(&sr);
|
||||
if (sr.length < n + 2)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
isc_buffer_forward(source, n + 2);
|
||||
return (mem_tobuffer(target, sr.base, n + 2));
|
||||
}
|
||||
|
|
@ -313,7 +313,7 @@ fromstruct_any_tsig(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
|
||||
isc_buffer_available(target, &tr);
|
||||
if (tr.length < 6 + 2 + 2)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
|
||||
/* Time Signed: 48 bits */
|
||||
RETERR(uint16_tobuffer((isc_uint16_t)(tsig->timesigned >> 32), target));
|
||||
|
|
@ -330,14 +330,14 @@ fromstruct_any_tsig(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
if (tsig->siglen > 0) {
|
||||
isc_buffer_available(target, &tr);
|
||||
if (tr.length < tsig->siglen)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
memcpy(tr.base, tsig->signature, tsig->siglen);
|
||||
isc_buffer_add(target, tsig->siglen);
|
||||
}
|
||||
|
||||
isc_buffer_available(target, &tr);
|
||||
if (tr.length < 2 + 2 + 2)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
|
||||
/* Original ID */
|
||||
RETERR(uint16_tobuffer(tsig->originalid, target));
|
||||
|
|
@ -352,12 +352,12 @@ fromstruct_any_tsig(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
if (tsig->otherlen > 0) {
|
||||
isc_buffer_available(target, &tr);
|
||||
if (tr.length < tsig->otherlen)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
memcpy(tr.base, tsig->other, tsig->otherlen);
|
||||
isc_buffer_add(target, tsig->otherlen);
|
||||
}
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -410,7 +410,7 @@ tostruct_any_tsig(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
return (ISC_R_UNEXPECTEDEND);
|
||||
tsig->signature = isc_mem_get(mctx, tsig->siglen);
|
||||
if (tsig->signature == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
memcpy(tsig->signature, sr.base, tsig->siglen);
|
||||
isc_region_consume(&sr, tsig->siglen);
|
||||
|
||||
|
|
@ -437,11 +437,11 @@ tostruct_any_tsig(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
return (ISC_R_UNEXPECTEDEND);
|
||||
tsig->other = isc_mem_get(mctx, tsig->otherlen);
|
||||
if (tsig->other == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
memcpy(tsig->other, sr.base, tsig->otherlen);
|
||||
isc_region_consume(&sr, tsig->otherlen);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -469,7 +469,7 @@ additionaldata_any_tsig(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
UNUSED(add);
|
||||
UNUSED(arg);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -481,7 +481,7 @@ digest_any_tsig(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg) {
|
|||
UNUSED(digest);
|
||||
UNUSED(arg);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
#endif /* RDATA_ANY_255_TSIG_250_C */
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: afsdb_18.c,v 1.19 2000/03/18 01:46:15 tale Exp $ */
|
||||
/* $Id: afsdb_18.c,v 1.20 2000/04/06 22:02:41 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Wed Mar 15 14:59:00 PST 2000 by explorer */
|
||||
|
||||
|
|
@ -99,9 +99,9 @@ fromwire_afsdb(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
isc_buffer_active(source, &sr);
|
||||
isc_buffer_available(target, &tr);
|
||||
if (tr.length < 2)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
if (sr.length < 2)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
memcpy(tr.base, sr.base, 2);
|
||||
isc_buffer_forward(source, 2);
|
||||
isc_buffer_add(target, 2);
|
||||
|
|
@ -125,7 +125,7 @@ towire_afsdb(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target)
|
|||
isc_buffer_available(target, &tr);
|
||||
dns_rdata_toregion(rdata, &sr);
|
||||
if (tr.length < 2)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
memcpy(tr.base, sr.base, 2);
|
||||
isc_region_consume(&sr, 2);
|
||||
isc_buffer_add(target, 2);
|
||||
|
|
@ -178,7 +178,7 @@ fromstruct_afsdb(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
|
||||
REQUIRE(type == 18);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -190,7 +190,7 @@ tostruct_afsdb(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
|
|||
REQUIRE(rdata->type == 18);
|
||||
REQUIRE(target != NULL);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: cert_37.c,v 1.20 2000/03/16 02:15:52 tale Exp $ */
|
||||
/* $Id: cert_37.c,v 1.21 2000/04/06 22:02:42 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Wed Mar 15 21:14:32 EST 2000 by tale */
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ totext_cert(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
|||
tctx->linebreak, target));
|
||||
if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
|
||||
RETERR(str_totext(" )", target));
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -112,7 +112,7 @@ fromwire_cert(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
|
||||
isc_buffer_active(source, &sr);
|
||||
if (sr.length < 5)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
|
||||
isc_buffer_forward(source, sr.length);
|
||||
return (mem_tobuffer(target, sr.base, sr.length));
|
||||
|
|
@ -155,7 +155,7 @@ fromstruct_cert(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
UNUSED(source);
|
||||
UNUSED(target);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -167,7 +167,7 @@ tostruct_cert(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
UNUSED(target);
|
||||
UNUSED(mctx);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -185,7 +185,7 @@ additionaldata_cert(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
UNUSED(add);
|
||||
UNUSED(arg);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: cname_5.c,v 1.22 2000/03/16 02:00:31 brister Exp $ */
|
||||
/* $Id: cname_5.c,v 1.23 2000/04/06 22:02:43 explorer Exp $ */
|
||||
|
||||
/* reviewed: Wed Mar 15 16:48:45 PST 2000 by brister */
|
||||
|
||||
|
|
@ -142,7 +142,7 @@ fromstruct_cname(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
UNUSED(source);
|
||||
UNUSED(target);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -155,7 +155,7 @@ tostruct_cname(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
|
|||
UNUSED(target);
|
||||
UNUSED(mctx);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -174,7 +174,7 @@ additionaldata_cname(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
(void)add;
|
||||
(void)arg;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: dname_39.c,v 1.15 2000/03/16 02:18:13 explorer Exp $ */
|
||||
/* $Id: dname_39.c,v 1.16 2000/04/06 22:02:45 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Wed Mar 15 16:52:38 PST 2000 by explorer */
|
||||
|
||||
|
|
@ -142,7 +142,7 @@ fromstruct_dname(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
|
||||
REQUIRE(type == 39);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -154,7 +154,7 @@ tostruct_dname(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
|
|||
REQUIRE(rdata->type == 39);
|
||||
REQUIRE(target != NULL);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -173,7 +173,7 @@ additionaldata_dname(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
|
||||
REQUIRE(rdata->type == 39);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: gpos_27.c,v 1.14 2000/03/21 23:48:20 gson Exp $ */
|
||||
/* $Id: gpos_27.c,v 1.15 2000/04/06 22:02:46 explorer Exp $ */
|
||||
|
||||
/* reviewed: Wed Mar 15 16:48:45 PST 2000 by brister */
|
||||
|
||||
|
|
@ -43,7 +43,7 @@ fromtext_gpos(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
ISC_FALSE));
|
||||
RETERR(txt_fromtext(&token.value.as_textregion, target));
|
||||
}
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -65,7 +65,7 @@ totext_gpos(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
|||
RETERR(str_totext(" ", target));
|
||||
}
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -83,7 +83,7 @@ fromwire_gpos(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
|
||||
for (i = 0 ; i < 3; i++)
|
||||
RETERR(txt_fromwire(source, target));
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -124,7 +124,7 @@ fromstruct_gpos(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
UNUSED(source);
|
||||
UNUSED(target);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -136,7 +136,7 @@ tostruct_gpos(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
|
|||
UNUSED(target);
|
||||
UNUSED(mctx);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -155,7 +155,7 @@ additionaldata_gpos(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
UNUSED(add);
|
||||
UNUSED(arg);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: hinfo_13.c,v 1.20 2000/03/16 22:42:32 halley Exp $ */
|
||||
/* $Id: hinfo_13.c,v 1.21 2000/04/06 22:02:47 explorer Exp $ */
|
||||
|
||||
/*
|
||||
* Reviewed: Wed Mar 15 16:47:10 PST 2000 by halley.
|
||||
|
|
@ -43,7 +43,7 @@ fromtext_hinfo(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
ISC_FALSE));
|
||||
RETERR(txt_fromtext(&token.value.as_textregion, target));
|
||||
}
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -112,7 +112,7 @@ fromstruct_hinfo(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
|
||||
REQUIRE(type == 13);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -123,7 +123,7 @@ tostruct_hinfo(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
UNUSED(target);
|
||||
UNUSED(mctx);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -141,7 +141,7 @@ additionaldata_hinfo(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
|
||||
REQUIRE(rdata->type == 13);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: isdn_20.c,v 1.14 2000/03/16 02:08:49 bwelling Exp $ */
|
||||
/* $Id: isdn_20.c,v 1.15 2000/04/06 22:02:49 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Wed Mar 15 16:53:11 PST 2000 by bwelling */
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ fromtext_isdn(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
if (token.type != isc_tokentype_string &&
|
||||
token.type != isc_tokentype_qstring) {
|
||||
isc_lex_ungettoken(lexer, &token);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
return (txt_fromtext(&token.value.as_textregion, target));
|
||||
}
|
||||
|
|
@ -64,7 +64,7 @@ totext_isdn(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
|||
dns_rdata_toregion(rdata, ®ion);
|
||||
RETERR(txt_totext(®ion, target));
|
||||
if (region.length == 0)
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
RETERR(str_totext(" ", target));
|
||||
return (txt_totext(®ion, target));
|
||||
}
|
||||
|
|
@ -82,7 +82,7 @@ fromwire_isdn(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
|
||||
RETERR(txt_fromwire(source, target));
|
||||
if (buffer_empty(source))
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
return (txt_fromwire(source, target));
|
||||
}
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ fromstruct_isdn(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
|
||||
REQUIRE(type == 20);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -129,7 +129,7 @@ tostruct_isdn(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
|
||||
REQUIRE(rdata->type == 20);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -147,7 +147,7 @@ additionaldata_isdn(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
|
||||
REQUIRE(rdata->type == 20);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: key_25.c,v 1.17 2000/03/16 22:42:32 halley Exp $ */
|
||||
/* $Id: key_25.c,v 1.18 2000/04/06 22:02:50 explorer Exp $ */
|
||||
|
||||
/*
|
||||
* Reviewed: Wed Mar 15 16:47:10 PST 2000 by halley.
|
||||
|
|
@ -59,7 +59,7 @@ fromtext_key(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
|
||||
/* No Key? */
|
||||
if ((flags & 0xc000) == 0xc000)
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
return (isc_base64_tobuffer(lexer, target, -1));
|
||||
}
|
||||
|
|
@ -98,7 +98,7 @@ totext_key(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
|||
|
||||
/* No Key? */
|
||||
if ((flags & 0xc000) == 0xc00)
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
/* key */
|
||||
if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
|
||||
|
|
@ -109,7 +109,7 @@ totext_key(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
|||
if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
|
||||
RETERR(str_totext(" )", target));
|
||||
|
||||
return DNS_R_SUCCESS;
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -127,7 +127,7 @@ fromwire_key(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
|
||||
isc_buffer_active(source, &sr);
|
||||
if (sr.length < 4)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
|
||||
isc_buffer_forward(source, sr.length);
|
||||
return (mem_tobuffer(target, sr.base, sr.length));
|
||||
|
|
@ -188,12 +188,12 @@ fromstruct_key(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
if (key->datalen > 0) {
|
||||
isc_buffer_available(target, &tr);
|
||||
if (tr.length < key->datalen)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
memcpy(tr.base, key->data, key->datalen);
|
||||
isc_buffer_add(target, key->datalen);
|
||||
}
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -236,14 +236,14 @@ tostruct_key(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
if (key->datalen > 0) {
|
||||
key->data = isc_mem_get(mctx, key->datalen);
|
||||
if (key->data == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
memcpy(key->data, sr.base, key->datalen);
|
||||
isc_region_consume(&sr, key->datalen);
|
||||
}
|
||||
else
|
||||
key->data = NULL;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -266,7 +266,7 @@ additionaldata_key(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
UNUSED(add);
|
||||
UNUSED(arg);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: loc_29.c,v 1.12 2000/03/16 02:18:15 explorer Exp $ */
|
||||
/* $Id: loc_29.c,v 1.13 2000/04/06 22:02:51 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Wed Mar 15 18:13:09 PST 2000 by explorer */
|
||||
|
||||
|
|
@ -494,11 +494,11 @@ fromwire_loc(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
|
||||
isc_buffer_active(source, &sr);
|
||||
if (sr.length < 1)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
if (sr.base[0] != 0)
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
if (sr.length < 16)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
|
||||
/* size */
|
||||
c = sr.base[1];
|
||||
|
|
@ -575,7 +575,7 @@ fromstruct_loc(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
|
||||
REQUIRE(type == 29);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -586,7 +586,7 @@ tostruct_loc(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
|
|||
|
||||
REQUIRE(rdata->type == 29);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -605,7 +605,7 @@ additionaldata_loc(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
|
||||
REQUIRE(rdata->type == 29);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: mb_7.c,v 1.22 2000/03/16 02:08:50 bwelling Exp $ */
|
||||
/* $Id: mb_7.c,v 1.23 2000/04/06 22:02:53 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Wed Mar 15 17:31:26 PST 2000 by bwelling */
|
||||
|
||||
|
|
@ -138,7 +138,7 @@ fromstruct_mb(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
|
||||
REQUIRE(type == 7);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -148,7 +148,7 @@ tostruct_mb(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
|
||||
REQUIRE(rdata->type == 7);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: md_3.c,v 1.23 2000/03/16 02:08:51 bwelling Exp $ */
|
||||
/* $Id: md_3.c,v 1.24 2000/04/06 22:02:54 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Wed Mar 15 17:48:20 PST 2000 by bwelling */
|
||||
|
||||
|
|
@ -138,7 +138,7 @@ fromstruct_md(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
|
||||
REQUIRE(type == 3);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -148,7 +148,7 @@ tostruct_md(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
|
||||
REQUIRE(rdata->type == 3);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: mf_4.c,v 1.21 2000/03/16 02:00:34 brister Exp $ */
|
||||
/* $Id: mf_4.c,v 1.22 2000/04/06 22:02:55 explorer Exp $ */
|
||||
|
||||
/* reviewed: Wed Mar 15 17:47:33 PST 2000 by brister */
|
||||
|
||||
|
|
@ -142,7 +142,7 @@ fromstruct_mf(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
UNUSED(source);
|
||||
UNUSED(target);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -154,7 +154,7 @@ tostruct_mf(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
|
|||
UNUSED(target);
|
||||
UNUSED(mctx);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: mg_8.c,v 1.20 2000/03/16 02:00:35 brister Exp $ */
|
||||
/* $Id: mg_8.c,v 1.21 2000/04/06 22:02:57 explorer Exp $ */
|
||||
|
||||
/* reviewed: Wed Mar 15 17:49:21 PST 2000 by brister */
|
||||
|
||||
|
|
@ -142,7 +142,7 @@ fromstruct_mg(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
UNUSED(source);
|
||||
UNUSED(target);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -154,7 +154,7 @@ tostruct_mg(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
|
|||
UNUSED(target);
|
||||
UNUSED(mctx);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -173,7 +173,7 @@ additionaldata_mg(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
(void)add;
|
||||
(void)arg;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: minfo_14.c,v 1.21 2000/03/20 22:44:33 gson Exp $ */
|
||||
/* $Id: minfo_14.c,v 1.22 2000/04/06 22:02:58 explorer Exp $ */
|
||||
|
||||
/* reviewed: Wed Mar 15 17:45:32 PST 2000 by brister */
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ fromtext_minfo(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
RETERR(dns_name_fromtext(&name, &buffer, origin,
|
||||
downcase, target));
|
||||
}
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -188,7 +188,7 @@ fromstruct_minfo(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
UNUSED(source);
|
||||
UNUSED(target);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -200,7 +200,7 @@ tostruct_minfo(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
|
|||
UNUSED(target);
|
||||
UNUSED(mctx);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -219,7 +219,7 @@ additionaldata_minfo(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
(void)add;
|
||||
(void)arg;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -235,7 +235,7 @@ digest_minfo(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg)
|
|||
dns_name_init(&name, NULL);
|
||||
dns_name_fromregion(&name, &r);
|
||||
result = dns_name_digest(&name, digest, arg);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
isc_region_consume(&r, name_length(&name));
|
||||
dns_name_init(&name, NULL);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: mr_9.c,v 1.19 2000/03/16 02:31:14 tale Exp $ */
|
||||
/* $Id: mr_9.c,v 1.20 2000/04/06 22:03:00 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Wed Mar 15 21:30:35 EST 2000 by tale */
|
||||
|
||||
|
|
@ -137,7 +137,7 @@ fromstruct_mr(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
UNUSED(source);
|
||||
UNUSED(target);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -147,7 +147,7 @@ tostruct_mr(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
UNUSED(target);
|
||||
UNUSED(mctx);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -165,7 +165,7 @@ additionaldata_mr(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
UNUSED(add);
|
||||
UNUSED(arg);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: mx_15.c,v 1.26 2000/03/20 22:44:34 gson Exp $ */
|
||||
/* $Id: mx_15.c,v 1.27 2000/04/06 22:03:01 explorer Exp $ */
|
||||
|
||||
/* reviewed: Wed Mar 15 18:05:46 PST 2000 by brister */
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ fromwire_mx(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
|
||||
isc_buffer_active(source, &sregion);
|
||||
if (sregion.length < 2)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
RETERR(mem_tobuffer(target, sregion.base, 2));
|
||||
isc_buffer_forward(source, 2);
|
||||
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||
|
|
@ -168,7 +168,7 @@ fromstruct_mx(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
UNUSED(source);
|
||||
UNUSED(target);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -179,7 +179,7 @@ tostruct_mx(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
|
|||
UNUSED(target);
|
||||
UNUSED(mctx);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: ns_2.c,v 1.22 2000/03/16 02:16:16 bwelling Exp $ */
|
||||
/* $Id: ns_2.c,v 1.23 2000/04/06 22:03:02 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Wed Mar 15 18:15:00 PST 2000 by bwelling */
|
||||
|
||||
|
|
@ -138,7 +138,7 @@ fromstruct_ns(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
|
||||
REQUIRE(type == 2);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: null_10.c,v 1.18 2000/03/16 21:58:58 explorer Exp $ */
|
||||
/* $Id: null_10.c,v 1.19 2000/04/06 22:03:03 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Thu Mar 16 13:57:50 PST 2000 by explorer */
|
||||
|
||||
|
|
@ -104,7 +104,7 @@ fromstruct_null(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
|
||||
REQUIRE(type == 10);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -115,7 +115,7 @@ tostruct_null(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
|
|||
|
||||
REQUIRE(rdata->type == 10);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -134,7 +134,7 @@ additionaldata_null(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
|
||||
REQUIRE(rdata->type == 10);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: nxt_30.c,v 1.23 2000/03/20 22:48:58 gson Exp $ */
|
||||
/* $Id: nxt_30.c,v 1.24 2000/04/06 22:03:05 explorer Exp $ */
|
||||
|
||||
/* reviewed: Wed Mar 15 18:21:15 PST 2000 by brister */
|
||||
|
||||
|
|
@ -75,7 +75,7 @@ fromtext_nxt(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
} while (1);
|
||||
isc_lex_ungettoken(lexer, &token);
|
||||
if (first)
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
n = (maxcovered + 8) / 8;
|
||||
return (mem_tobuffer(target, bm, n));
|
||||
}
|
||||
|
|
@ -111,7 +111,7 @@ totext_nxt(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
|||
result = dns_rdatatype_totext(
|
||||
(dns_rdatatype_t)(i * 8 + j),
|
||||
target);
|
||||
if (result == DNS_R_SUCCESS) {
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
RETERR(str_totext(" ",
|
||||
target));
|
||||
continue;
|
||||
|
|
@ -152,7 +152,7 @@ fromwire_nxt(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
return (DNS_R_EXTRADATA);
|
||||
RETERR(mem_tobuffer(target, sr.base, sr.length));
|
||||
isc_buffer_forward(source, sr.length);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -214,7 +214,7 @@ fromstruct_nxt(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
UNUSED(source);
|
||||
UNUSED(target);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -225,7 +225,7 @@ tostruct_nxt(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
UNUSED(target);
|
||||
UNUSED(mctx);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -246,7 +246,7 @@ additionaldata_nxt(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
(void)add;
|
||||
(void)arg;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -261,7 +261,7 @@ digest_nxt(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg) {
|
|||
dns_name_init(&name, NULL);
|
||||
dns_name_fromregion(&name, &r);
|
||||
result = dns_name_digest(&name, digest, arg);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
isc_region_consume(&r, name_length(&name));
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: opt_41.c,v 1.5 2000/03/16 22:42:10 gson Exp $ */
|
||||
/* $Id: opt_41.c,v 1.6 2000/04/06 22:03:06 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Thu Mar 16 14:06:44 PST 2000 by gson */
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ fromtext_opt(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
UNUSED(downcase);
|
||||
UNUSED(target);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -57,7 +57,7 @@ totext_opt(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
|||
UNUSED(tctx);
|
||||
UNUSED(target);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -80,14 +80,14 @@ fromwire_opt(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
total = 0;
|
||||
while (sregion.length != 0) {
|
||||
if (sregion.length < 4)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
option = uint16_fromregion(&sregion);
|
||||
isc_region_consume(&sregion, 2);
|
||||
length = uint16_fromregion(&sregion);
|
||||
isc_region_consume(&sregion, 2);
|
||||
total += 4;
|
||||
if (sregion.length < length)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
isc_region_consume(&sregion, length);
|
||||
total += length;
|
||||
}
|
||||
|
|
@ -95,12 +95,12 @@ fromwire_opt(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
isc_buffer_active(source, &sregion);
|
||||
isc_buffer_available(target, &tregion);
|
||||
if (tregion.length < total)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
memcpy(tregion.base, sregion.base, total);
|
||||
isc_buffer_forward(source, total);
|
||||
isc_buffer_add(target, total);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -137,7 +137,7 @@ fromstruct_opt(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
UNUSED(source);
|
||||
UNUSED(target);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -148,7 +148,7 @@ tostruct_opt(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
UNUSED(target);
|
||||
UNUSED(mctx);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -165,7 +165,7 @@ additionaldata_opt(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
UNUSED(add);
|
||||
UNUSED(arg);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -180,7 +180,7 @@ digest_opt(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg) {
|
|||
UNUSED(digest);
|
||||
UNUSED(arg);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
#endif /* RDATA_GENERIC_OPT_41_C */
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: proforma.c,v 1.19 2000/03/20 22:48:58 gson Exp $ */
|
||||
/* $Id: proforma.c,v 1.20 2000/04/06 22:03:07 explorer Exp $ */
|
||||
|
||||
#ifndef RDATA_GENERIC_#_#_C
|
||||
#define RDATA_GENERIC_#_#_C
|
||||
|
|
@ -31,7 +31,7 @@ fromtext_#(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
|
||||
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -42,7 +42,7 @@ totext_#(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
|||
REQUIRE(rdata->type == #);
|
||||
REQUIRE(rdata->rdclass == #);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -59,7 +59,7 @@ fromwire_#(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
/* NONE or GLOBAL14 */
|
||||
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -74,7 +74,7 @@ towire_#(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) {
|
|||
/* NONE or GLOBAL14 */
|
||||
dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline int
|
||||
|
|
@ -99,7 +99,7 @@ fromstruct_#(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
REQUIRE(type == #);
|
||||
REQUIRE(rdclass == #);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -108,7 +108,7 @@ tostruct_#(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
REQUIRE(rdata->type == #);
|
||||
REQUIRE(rdata->rdclass == #);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -131,7 +131,7 @@ additionaldata_#(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
(void)add;
|
||||
(void)arg;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: ptr_12.c,v 1.20 2000/03/16 22:07:28 explorer Exp $ */
|
||||
/* $Id: ptr_12.c,v 1.21 2000/04/06 22:03:08 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Thu Mar 16 14:05:12 PST 2000 by explorer */
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ fromstruct_ptr(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
|
||||
REQUIRE(type == 12);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -151,7 +151,7 @@ tostruct_ptr(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
|
|||
|
||||
REQUIRE(rdata->type == 12);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -170,7 +170,7 @@ additionaldata_ptr(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
|
||||
REQUIRE(rdata->type == 12);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rp_17.c,v 1.17 2000/03/20 22:48:59 gson Exp $ */
|
||||
/* $Id: rp_17.c,v 1.18 2000/04/06 22:03:09 explorer Exp $ */
|
||||
|
||||
/* RFC 1183 */
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ fromtext_rp(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
RETERR(dns_name_fromtext(&name, &buffer, origin,
|
||||
downcase, target));
|
||||
}
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -185,7 +185,7 @@ fromstruct_rp(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
|
||||
REQUIRE(type == 17);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -196,7 +196,7 @@ tostruct_rp(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
|
|||
|
||||
REQUIRE(rdata->type == 17);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -215,7 +215,7 @@ additionaldata_rp(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
|
||||
REQUIRE(rdata->type == 17);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rt_21.c,v 1.17 2000/03/20 22:44:34 gson Exp $ */
|
||||
/* $Id: rt_21.c,v 1.18 2000/04/06 22:03:11 explorer Exp $ */
|
||||
|
||||
/* reviewed: Thu Mar 16 15:02:31 PST 2000 by brister */
|
||||
|
||||
|
|
@ -99,9 +99,9 @@ fromwire_rt(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
isc_buffer_active(source, &sregion);
|
||||
isc_buffer_available(target, &tregion);
|
||||
if (tregion.length < 2)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
if (sregion.length < 2)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
memcpy(tregion.base, sregion.base, 2);
|
||||
isc_buffer_forward(source, 2);
|
||||
isc_buffer_add(target, 2);
|
||||
|
|
@ -125,7 +125,7 @@ towire_rt(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target)
|
|||
isc_buffer_available(target, &tr);
|
||||
dns_rdata_toregion(rdata, ®ion);
|
||||
if (tr.length < 2)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
memcpy(tr.base, region.base, 2);
|
||||
isc_region_consume(®ion, 2);
|
||||
isc_buffer_add(target, 2);
|
||||
|
|
@ -179,7 +179,7 @@ fromstruct_rt(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
UNUSED(source);
|
||||
UNUSED(target);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -191,7 +191,7 @@ tostruct_rt(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
|
|||
UNUSED(target);
|
||||
UNUSED(mctx);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: sig_24.c,v 1.30 2000/03/17 21:43:46 gson Exp $ */
|
||||
/* $Id: sig_24.c,v 1.31 2000/04/06 22:03:12 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Fri Mar 17 09:05:02 PST 2000 by gson */
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ fromtext_sig(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
/* type covered */
|
||||
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
|
||||
result = dns_rdatatype_fromtext(&covered, &token.value.as_textregion);
|
||||
if (result != DNS_R_SUCCESS && result != DNS_R_NOTIMPLEMENTED) {
|
||||
if (result != ISC_R_SUCCESS && result != ISC_R_NOTIMPLEMENTED) {
|
||||
i = strtol(token.value.as_pointer, &e, 10);
|
||||
if (i < 0 || i > 65535)
|
||||
return (DNS_R_RANGE);
|
||||
|
|
@ -179,7 +179,7 @@ totext_sig(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
|||
if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
|
||||
RETERR(str_totext(" )", target));
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -210,7 +210,7 @@ fromwire_sig(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
* key footprint: 2
|
||||
*/
|
||||
if (sr.length < 18)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
|
||||
isc_buffer_forward(source, 18);
|
||||
RETERR(mem_tobuffer(target, sr.base, 18));
|
||||
|
|
@ -347,12 +347,12 @@ fromstruct_sig(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
if (sig->siglen > 0) {
|
||||
isc_buffer_available(target, &tr);
|
||||
if (tr.length < sig->siglen)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
memcpy(tr.base, sig->signature, sig->siglen);
|
||||
isc_buffer_add(target, sig->siglen);
|
||||
}
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -422,11 +422,11 @@ tostruct_sig(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
sig->siglen = sr.length;
|
||||
sig->signature = isc_mem_get(mctx, sig->siglen);
|
||||
if (sig->signature == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
memcpy(sig->signature, sr.base, sig->siglen);
|
||||
isc_region_consume(&sr, sig->siglen);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -450,7 +450,7 @@ additionaldata_sig(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
UNUSED(add);
|
||||
UNUSED(arg);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -461,7 +461,7 @@ digest_sig(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg) {
|
|||
UNUSED(digest);
|
||||
UNUSED(arg);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline dns_rdatatype_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: soa_6.c,v 1.30 2000/03/18 00:19:25 explorer Exp $ */
|
||||
/* $Id: soa_6.c,v 1.31 2000/04/06 22:03:13 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Thu Mar 16 15:18:32 PST 2000 by explorer */
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ fromtext_soa(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
RETERR(uint32_tobuffer(n, target));
|
||||
}
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static char *soa_fieldnames[5] = {
|
||||
|
|
@ -132,7 +132,7 @@ totext_soa(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
|||
|
||||
RETERR(str_totext(")", target));
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -164,15 +164,15 @@ fromwire_soa(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
isc_buffer_available(target, &tregion);
|
||||
|
||||
if (sregion.length < 20)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
if (tregion.length < 20)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
|
||||
memcpy(tregion.base, sregion.base, 20);
|
||||
isc_buffer_forward(source, 20);
|
||||
isc_buffer_add(target, 20);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -205,11 +205,11 @@ towire_soa(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target)
|
|||
|
||||
isc_buffer_available(target, &tregion);
|
||||
if (tregion.length < 20)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
|
||||
memcpy(tregion.base, sregion.base, 20);
|
||||
isc_buffer_add(target, 20);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline int
|
||||
|
|
@ -267,7 +267,7 @@ fromstruct_soa(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
|
||||
REQUIRE(type == 6);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -313,7 +313,7 @@ tostruct_soa(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
|
|||
|
||||
soa->minimum = uint32_fromregion(®ion);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -338,7 +338,7 @@ additionaldata_soa(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
|
||||
REQUIRE(rdata->type == 6);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: tkey_249.c,v 1.23 2000/03/20 22:44:35 gson Exp $ */
|
||||
/* $Id: tkey_249.c,v 1.24 2000/04/06 22:03:15 explorer Exp $ */
|
||||
|
||||
/*
|
||||
* Reviewed: Thu Mar 16 17:35:30 PST 2000 by halley.
|
||||
|
|
@ -68,7 +68,7 @@ fromtext_tkey(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
/* Error */
|
||||
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
|
||||
if (dns_rcode_fromtext(&rcode, &token.value.as_textregion)
|
||||
!= DNS_R_SUCCESS) {
|
||||
!= ISC_R_SUCCESS) {
|
||||
i = strtol(token.value.as_pointer, &e, 10);
|
||||
if (*e != 0)
|
||||
return (DNS_R_UNKNOWN);
|
||||
|
|
@ -142,7 +142,7 @@ totext_tkey(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
|||
/* Error */
|
||||
n = uint16_fromregion(&sr);
|
||||
isc_region_consume(&sr, 2);
|
||||
if (dns_rcode_totext((dns_rcode_t)n, target) == DNS_R_SUCCESS)
|
||||
if (dns_rcode_totext((dns_rcode_t)n, target) == ISC_R_SUCCESS)
|
||||
RETERR(str_totext(" ", target));
|
||||
else {
|
||||
sprintf(buf, "%lu ", n);
|
||||
|
|
@ -222,27 +222,27 @@ fromwire_tkey(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
*/
|
||||
isc_buffer_active(source, &sr);
|
||||
if (sr.length < 12)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
RETERR(mem_tobuffer(target, sr.base, 12));
|
||||
isc_region_consume(&sr, 12);
|
||||
isc_buffer_forward(source, 12);
|
||||
|
||||
/* Key Length + Key Data */
|
||||
if (sr.length < 2)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
n = uint16_fromregion(&sr);
|
||||
if (sr.length < n + 2)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
RETERR(mem_tobuffer(target, sr.base, n + 2));
|
||||
isc_region_consume(&sr, n + 2);
|
||||
isc_buffer_forward(source, n + 2);
|
||||
|
||||
/* Other Length + Other Data */
|
||||
if (sr.length < 2)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
n = uint16_fromregion(&sr);
|
||||
if (sr.length < n + 2)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
isc_buffer_forward(source, n + 2);
|
||||
return (mem_tobuffer(target, sr.base, n + 2));
|
||||
}
|
||||
|
|
@ -337,7 +337,7 @@ fromstruct_tkey(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
if (tkey->keylen > 0) {
|
||||
isc_buffer_available(target, &tr);
|
||||
if (tr.length < tkey->keylen)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
memcpy(tr.base, tkey->key, tkey->keylen);
|
||||
isc_buffer_add(target, tkey->keylen);
|
||||
}
|
||||
|
|
@ -349,12 +349,12 @@ fromstruct_tkey(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
if (tkey->otherlen > 0) {
|
||||
isc_buffer_available(target, &tr);
|
||||
if (tr.length < tkey->otherlen)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
memcpy(tr.base, tkey->other, tkey->otherlen);
|
||||
isc_buffer_add(target, tkey->otherlen);
|
||||
}
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -416,7 +416,7 @@ tostruct_tkey(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
/* Key */
|
||||
tkey->key = isc_mem_get(mctx, tkey->keylen);
|
||||
if (tkey->key == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
memcpy(tkey->key, sr.base, tkey->keylen);
|
||||
isc_region_consume(&sr, tkey->keylen);
|
||||
|
||||
|
|
@ -429,11 +429,11 @@ tostruct_tkey(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
/* Other */
|
||||
tkey->other = isc_mem_get(mctx, tkey->otherlen);
|
||||
if (tkey->other == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
memcpy(tkey->other, sr.base, tkey->otherlen);
|
||||
isc_region_consume(&sr, tkey->otherlen);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -458,7 +458,7 @@ additionaldata_tkey(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
|
||||
REQUIRE(rdata->type == 249);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -469,7 +469,7 @@ digest_tkey(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg)
|
|||
|
||||
REQUIRE(rdata->type == 249);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
#endif /* RDATA_GENERIC_TKEY_249_C */
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: txt_16.c,v 1.20 2000/03/16 23:40:50 bwelling Exp $ */
|
||||
/* $Id: txt_16.c,v 1.21 2000/04/06 22:03:16 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Thu Mar 16 15:40:00 PST 2000 by bwelling */
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ fromtext_txt(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
}
|
||||
/* Let upper layer handle eol/eof. */
|
||||
isc_lex_ungettoken(lexer, &token);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -66,7 +66,7 @@ totext_txt(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
|||
RETERR(str_totext(" ", target));
|
||||
}
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -84,10 +84,10 @@ fromwire_txt(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
|
||||
while (!buffer_empty(source)) {
|
||||
result = txt_fromwire(source, target);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -100,11 +100,11 @@ towire_txt(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) {
|
|||
|
||||
isc_buffer_available(target, ®ion);
|
||||
if (region.length < rdata->length)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
|
||||
memcpy(region.base, rdata->data, rdata->length);
|
||||
isc_buffer_add(target, rdata->length);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline int
|
||||
|
|
@ -131,7 +131,7 @@ fromstruct_txt(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
|
||||
REQUIRE(type == 16);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -141,7 +141,7 @@ tostruct_txt(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
|
||||
REQUIRE(rdata->type == 16);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -159,7 +159,7 @@ additionaldata_txt(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
|
||||
REQUIRE(rdata->type == 16);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: unspec_103.c,v 1.12 2000/03/20 22:48:59 gson Exp $ */
|
||||
/* $Id: unspec_103.c,v 1.13 2000/04/06 22:03:18 explorer Exp $ */
|
||||
|
||||
#ifndef RDATA_GENERIC_UNSPEC_103_C
|
||||
#define RDATA_GENERIC_UNSPEC_103_C
|
||||
|
|
@ -101,7 +101,7 @@ fromstruct_unspec(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
source = source;
|
||||
target = target;
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -112,7 +112,7 @@ tostruct_unspec(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
target = target;
|
||||
mctx = mctx;
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -130,7 +130,7 @@ additionaldata_unspec(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
(void)add;
|
||||
(void)arg;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: x25_19.c,v 1.12 2000/03/17 00:15:30 bwelling Exp $ */
|
||||
/* $Id: x25_19.c,v 1.13 2000/04/06 22:03:19 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Thu Mar 16 16:15:57 PST 2000 by bwelling */
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ fromstruct_x25(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
|
||||
REQUIRE(type == 19);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -126,7 +126,7 @@ tostruct_x25(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
UNUSED(target);
|
||||
UNUSED(mctx);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -144,7 +144,7 @@ additionaldata_x25(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
|
||||
REQUIRE(rdata->type == 19);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: a_1.c,v 1.5 2000/03/20 22:44:35 gson Exp $ */
|
||||
/* $Id: a_1.c,v 1.6 2000/04/06 22:03:20 explorer Exp $ */
|
||||
|
||||
/* reviewed: Thu Mar 16 15:58:36 PST 2000 by brister */
|
||||
|
||||
|
|
@ -47,10 +47,10 @@ fromtext_hs_a(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
return (DNS_R_BADDOTTEDQUAD);
|
||||
isc_buffer_available(target, ®ion);
|
||||
if (region.length < 4)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
memcpy(region.base, &addr, 4);
|
||||
isc_buffer_add(target, 4);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -68,10 +68,10 @@ totext_hs_a(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
|||
isc_buffer_available(target, ®ion);
|
||||
if (inet_ntop(AF_INET, rdata->data,
|
||||
(char *)region.base, region.length) == NULL)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
|
||||
isc_buffer_add(target, strlen((char *)region.base));
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -92,14 +92,14 @@ fromwire_hs_a(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
isc_buffer_active(source, &sregion);
|
||||
isc_buffer_available(target, &tregion);
|
||||
if (sregion.length < 4)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
if (tregion.length < 4)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
|
||||
memcpy(tregion.base, sregion.base, 4);
|
||||
isc_buffer_forward(source, 4);
|
||||
isc_buffer_add(target, 4);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -114,10 +114,10 @@ towire_hs_a(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target)
|
|||
|
||||
isc_buffer_available(target, ®ion);
|
||||
if (region.length < rdata->length)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
memcpy(region.base, rdata->data, rdata->length);
|
||||
isc_buffer_add(target, 4);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline int
|
||||
|
|
@ -148,7 +148,7 @@ fromstruct_hs_a(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
UNUSED(source);
|
||||
UNUSED(target);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -171,7 +171,7 @@ tostruct_hs_a(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
|
|||
n = uint32_fromregion(®ion);
|
||||
a->in_addr.s_addr = htonl(n);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -192,7 +192,7 @@ additionaldata_hs_a(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
(void)add;
|
||||
(void)arg;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: a6_38.c,v 1.22 2000/03/20 22:44:35 gson Exp $ */
|
||||
/* $Id: a6_38.c,v 1.23 2000/04/06 22:03:22 explorer Exp $ */
|
||||
|
||||
/* draft-ietf-ipngwg-dns-lookups-03.txt */
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ fromtext_in_a6(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
}
|
||||
|
||||
if (prefixlen == 0)
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
|
||||
dns_name_init(&name, NULL);
|
||||
|
|
@ -110,14 +110,14 @@ totext_in_a6(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
|||
isc_buffer_available(target, &tr);
|
||||
if (inet_ntop(AF_INET6, addr,
|
||||
(char *)tr.base, tr.length) == NULL)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
|
||||
isc_buffer_add(target, strlen((char *)tr.base));
|
||||
isc_region_consume(&sr, 16 - octets);
|
||||
}
|
||||
|
||||
if (prefixlen == 0)
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
RETERR(str_totext(" ", target));
|
||||
dns_name_init(&name, NULL);
|
||||
|
|
@ -149,7 +149,7 @@ fromwire_in_a6(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
isc_buffer_active(source, &sr);
|
||||
/* prefix length */
|
||||
if (sr.length < 1)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
prefixlen = sr.base[0];
|
||||
if (prefixlen > 128)
|
||||
return (DNS_R_RANGE);
|
||||
|
|
@ -161,7 +161,7 @@ fromwire_in_a6(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
if (prefixlen != 128) {
|
||||
octets = 16 - prefixlen / 8;
|
||||
if (sr.length < octets)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
mask = 0xff >> (prefixlen % 8);
|
||||
sr.base[0] &= mask; /* ensure pad bits are zero */
|
||||
RETERR(mem_tobuffer(target, sr.base, octets));
|
||||
|
|
@ -169,7 +169,7 @@ fromwire_in_a6(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
}
|
||||
|
||||
if (prefixlen == 0)
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
dns_name_init(&name, NULL);
|
||||
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||
|
|
@ -199,7 +199,7 @@ towire_in_a6(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) {
|
|||
isc_region_consume(&sr, octets);
|
||||
|
||||
if (prefixlen == 0)
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
dns_name_init(&name, NULL);
|
||||
dns_name_fromregion(&name, &sr);
|
||||
|
|
@ -284,7 +284,7 @@ fromstruct_in_a6(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
|
||||
octets = 16 - prefixlen / 8;
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -297,7 +297,7 @@ tostruct_in_a6(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
|
|||
UNUSED(target);
|
||||
UNUSED(mctx);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -317,7 +317,7 @@ additionaldata_in_a6(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
(void)add;
|
||||
(void)arg;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -338,10 +338,10 @@ digest_in_a6(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg)
|
|||
|
||||
r1.length = octets;
|
||||
result = (digest)(arg, &r1);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
if (prefixlen == 0)
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
isc_region_consume(&r2, octets);
|
||||
dns_name_init(&name, NULL);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: a_1.c,v 1.25 2000/03/17 01:48:29 bwelling Exp $ */
|
||||
/* $Id: a_1.c,v 1.26 2000/04/06 22:03:23 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */
|
||||
|
||||
|
|
@ -47,10 +47,10 @@ fromtext_in_a(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
return (DNS_R_BADDOTTEDQUAD);
|
||||
isc_buffer_available(target, ®ion);
|
||||
if (region.length < 4)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
memcpy(region.base, &addr, 4);
|
||||
isc_buffer_add(target, 4);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -68,10 +68,10 @@ totext_in_a(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
|||
isc_buffer_available(target, ®ion);
|
||||
if (inet_ntop(AF_INET, rdata->data,
|
||||
(char *)region.base, region.length) == NULL)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
|
||||
isc_buffer_add(target, strlen((char *)region.base));
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -91,14 +91,14 @@ fromwire_in_a(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
isc_buffer_active(source, &sregion);
|
||||
isc_buffer_available(target, &tregion);
|
||||
if (sregion.length < 4)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
if (tregion.length < 4)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
|
||||
memcpy(tregion.base, sregion.base, 4);
|
||||
isc_buffer_forward(source, 4);
|
||||
isc_buffer_add(target, 4);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -112,10 +112,10 @@ towire_in_a(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) {
|
|||
|
||||
isc_buffer_available(target, ®ion);
|
||||
if (region.length < rdata->length)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
memcpy(region.base, rdata->data, rdata->length);
|
||||
isc_buffer_add(target, 4);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline int
|
||||
|
|
@ -143,7 +143,7 @@ fromstruct_in_a(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
REQUIRE(type == 1);
|
||||
REQUIRE(rdclass == 1);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -165,7 +165,7 @@ tostruct_in_a(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
n = uint32_fromregion(®ion);
|
||||
a->in_addr.s_addr = htonl(n);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -184,7 +184,7 @@ additionaldata_in_a(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
REQUIRE(rdata->type == 1);
|
||||
REQUIRE(rdata->rdclass == 1);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: aaaa_28.c,v 1.17 2000/03/17 01:48:28 bwelling Exp $ */
|
||||
/* $Id: aaaa_28.c,v 1.18 2000/04/06 22:03:25 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */
|
||||
|
||||
|
|
@ -49,10 +49,10 @@ fromtext_in_aaaa(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
return (DNS_R_BADAAAA);
|
||||
isc_buffer_available(target, ®ion);
|
||||
if (region.length < 16)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
memcpy(region.base, addr, 16);
|
||||
isc_buffer_add(target, 16);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -70,10 +70,10 @@ totext_in_aaaa(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
|||
isc_buffer_available(target, ®ion);
|
||||
if (inet_ntop(AF_INET6, rdata->data,
|
||||
(char *)region.base, region.length) == NULL)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
|
||||
isc_buffer_add(target, strlen((char *)region.base));
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -93,14 +93,14 @@ fromwire_in_aaaa(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
isc_buffer_active(source, &sregion);
|
||||
isc_buffer_available(target, &tregion);
|
||||
if (sregion.length < 16)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
if (tregion.length < 16)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
|
||||
memcpy(tregion.base, sregion.base, 16);
|
||||
isc_buffer_forward(source, 16);
|
||||
isc_buffer_add(target, 16);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -114,10 +114,10 @@ towire_in_aaaa(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) {
|
|||
|
||||
isc_buffer_available(target, ®ion);
|
||||
if (region.length < rdata->length)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
memcpy(region.base, rdata->data, rdata->length);
|
||||
isc_buffer_add(target, 16);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline int
|
||||
|
|
@ -145,7 +145,7 @@ fromstruct_in_aaaa(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
REQUIRE(type == 1);
|
||||
REQUIRE(rdclass == 1);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -156,7 +156,7 @@ tostruct_in_aaaa(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
REQUIRE(rdata->type == 28);
|
||||
REQUIRE(rdata->rdclass == 1);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -175,7 +175,7 @@ additionaldata_in_aaaa(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
REQUIRE(rdata->type == 28);
|
||||
REQUIRE(rdata->rdclass == 1);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: kx_36.c,v 1.19 2000/03/20 22:44:35 gson Exp $ */
|
||||
/* $Id: kx_36.c,v 1.20 2000/04/06 22:03:26 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Thu Mar 16 17:24:54 PST 2000 by explorer */
|
||||
|
||||
|
|
@ -97,7 +97,7 @@ fromwire_in_kx(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
|
||||
isc_buffer_active(source, &sregion);
|
||||
if (sregion.length < 2)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
RETERR(mem_tobuffer(target, sregion.base, 2));
|
||||
isc_buffer_forward(source, 2);
|
||||
return (dns_name_fromwire(&name, source, dctx, downcase, target));
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: naptr_35.c,v 1.18 2000/03/20 22:44:36 gson Exp $ */
|
||||
/* $Id: naptr_35.c,v 1.19 2000/04/06 22:03:27 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */
|
||||
|
||||
|
|
@ -137,7 +137,7 @@ fromwire_in_naptr(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
/* order, preference */
|
||||
isc_buffer_active(source, &sr);
|
||||
if (sr.length < 4)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
RETERR(mem_tobuffer(target, sr.base, 4));
|
||||
isc_buffer_forward(source, 4);
|
||||
|
||||
|
|
@ -257,7 +257,7 @@ fromstruct_in_naptr(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
REQUIRE(type == 35);
|
||||
REQUIRE(rdclass == 1);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -268,7 +268,7 @@ tostruct_in_naptr(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
REQUIRE(rdata->type == 35);
|
||||
REQUIRE(rdata->rdclass == 1);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -323,7 +323,7 @@ additionaldata_in_naptr(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
if (atype != 0)
|
||||
return ((add)(arg, &name, atype));
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -364,7 +364,7 @@ digest_in_naptr(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg) {
|
|||
*/
|
||||
r1.length = length;
|
||||
result = (digest)(arg, &r1);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
/* replacement */
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: nsap-ptr_23.c,v 1.14 2000/03/17 18:18:27 gson Exp $ */
|
||||
/* $Id: nsap-ptr_23.c,v 1.15 2000/04/06 22:03:28 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Fri Mar 17 10:16:02 PST 2000 by gson */
|
||||
|
||||
|
|
@ -144,7 +144,7 @@ fromstruct_in_nsap_ptr(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
UNUSED(source);
|
||||
UNUSED(target);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -156,7 +156,7 @@ tostruct_in_nsap_ptr(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
UNUSED(target);
|
||||
UNUSED(mctx);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -175,7 +175,7 @@ additionaldata_in_nsap_ptr(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
UNUSED(add);
|
||||
UNUSED(arg);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: nsap_22.c,v 1.14 2000/03/20 18:03:53 gson Exp $ */
|
||||
/* $Id: nsap_22.c,v 1.15 2000/04/06 22:03:30 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Fri Mar 17 10:41:07 PST 2000 by gson */
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ fromtext_in_nsap(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
|
||||
sr = &token.value.as_textregion;
|
||||
if (sr->length < 2)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
if (sr->base[0] != '0' || (sr->base[1] != 'x' && sr->base[1] != 'X'))
|
||||
return (DNS_R_SYNTAX);
|
||||
isc_textregion_consume(sr, 2);
|
||||
|
|
@ -68,9 +68,9 @@ fromtext_in_nsap(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
isc_textregion_consume(sr, 1);
|
||||
}
|
||||
if (digits) {
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
}
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -92,7 +92,7 @@ totext_in_nsap(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
|||
isc_region_consume(®ion, 1);
|
||||
RETERR(str_totext(buf, target));
|
||||
}
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -110,11 +110,11 @@ fromwire_in_nsap(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
|
||||
isc_buffer_active(source, ®ion);
|
||||
if (region.length < 1)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
|
||||
RETERR(mem_tobuffer(target, region.base, region.length));
|
||||
isc_buffer_forward(source, region.length);
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -154,7 +154,7 @@ fromstruct_in_nsap(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
UNUSED(source);
|
||||
UNUSED(target);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -166,7 +166,7 @@ tostruct_in_nsap(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
UNUSED(target);
|
||||
UNUSED(mctx);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -185,7 +185,7 @@ additionaldata_in_nsap(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
UNUSED(add);
|
||||
UNUSED(arg);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: px_26.c,v 1.15 2000/03/20 19:32:10 gson Exp $ */
|
||||
/* $Id: px_26.c,v 1.16 2000/04/06 22:03:32 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Mon Mar 20 10:44:27 PST 2000 */
|
||||
|
||||
|
|
@ -116,7 +116,7 @@ fromwire_in_px(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
/* preference */
|
||||
isc_buffer_active(source, &sregion);
|
||||
if (sregion.length < 2)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
RETERR(mem_tobuffer(target, sregion.base, 2));
|
||||
isc_buffer_forward(source, 2);
|
||||
|
||||
|
|
@ -283,7 +283,7 @@ additionaldata_in_px(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
UNUSED(add);
|
||||
UNUSED(arg);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -300,12 +300,12 @@ digest_in_px(dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg) {
|
|||
isc_region_consume(&r2, 2);
|
||||
r1.length = 2;
|
||||
result = (digest)(arg, &r1);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
dns_name_init(&name, NULL);
|
||||
dns_name_fromregion(&name, &r2);
|
||||
result = dns_name_digest(&name, digest, arg);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
isc_region_consume(&r2, name_length(&name));
|
||||
dns_name_init(&name, NULL);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: srv_33.c,v 1.16 2000/03/20 22:44:36 gson Exp $ */
|
||||
/* $Id: srv_33.c,v 1.17 2000/04/06 22:03:33 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Fri Mar 17 13:01:00 PST 2000 by bwelling */
|
||||
|
||||
|
|
@ -123,7 +123,7 @@ fromwire_in_srv(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
/* priority, weight, port */
|
||||
isc_buffer_active(source, &sr);
|
||||
if (sr.length < 6)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
RETERR(mem_tobuffer(target, sr.base, 6));
|
||||
isc_buffer_forward(source, 6);
|
||||
|
||||
|
|
@ -198,7 +198,7 @@ fromstruct_in_srv(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
REQUIRE(type == 33);
|
||||
REQUIRE(rdclass == 1);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -209,7 +209,7 @@ tostruct_in_srv(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
|
|||
REQUIRE(rdata->type == 33);
|
||||
REQUIRE(rdata->rdclass == 1);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: wks_11.c,v 1.22 2000/03/20 19:29:44 gson Exp $ */
|
||||
/* $Id: wks_11.c,v 1.23 2000/04/06 22:03:34 explorer Exp $ */
|
||||
|
||||
/* Reviewed: Fri Mar 17 15:01:49 PST 2000 by explorer */
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ fromtext_in_wks(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
if (inet_aton(token.value.as_pointer, &addr) != 1)
|
||||
return (DNS_R_BADDOTTEDQUAD);
|
||||
if (region.length < 4)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
memcpy(region.base, &addr, 4);
|
||||
isc_buffer_add(target, 4);
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ fromtext_in_wks(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
else if ((pe = getprotobyname(token.value.as_pointer)) != NULL)
|
||||
proto = pe->p_proto;
|
||||
else
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
if (proto < 0 || proto > 0xff)
|
||||
return (DNS_R_RANGE);
|
||||
|
||||
|
|
@ -97,7 +97,7 @@ fromtext_in_wks(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
!= NULL)
|
||||
port = ntohs(se->s_port);
|
||||
else
|
||||
return (DNS_R_UNEXPECTED);
|
||||
return (ISC_R_UNEXPECTED);
|
||||
if (port < 0 || port > 0xffff)
|
||||
return (DNS_R_RANGE);
|
||||
if (port > maxport)
|
||||
|
|
@ -130,7 +130,7 @@ totext_in_wks(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
|||
dns_rdata_toregion(rdata, &sr);
|
||||
isc_buffer_available(target, &tr);
|
||||
if (inet_ntop(AF_INET, sr.base, (char *)tr.base, tr.length) == NULL)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
isc_buffer_add(target, strlen((char *)tr.base));
|
||||
isc_region_consume(&sr, 4);
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ totext_in_wks(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
|
|||
}
|
||||
|
||||
RETERR(str_totext(" )", target));
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -173,17 +173,17 @@ fromwire_in_wks(dns_rdataclass_t rdclass, dns_rdatatype_t type,
|
|||
isc_buffer_available(target, &tr);
|
||||
|
||||
if (sr.length < 5)
|
||||
return (DNS_R_UNEXPECTEDEND);
|
||||
return (ISC_R_UNEXPECTEDEND);
|
||||
if (sr.length > 8 * 1024 + 5)
|
||||
return (DNS_R_EXTRADATA);
|
||||
if (tr.length < sr.length)
|
||||
return (DNS_R_NOSPACE);
|
||||
return (ISC_R_NOSPACE);
|
||||
|
||||
memcpy(tr.base, sr.base, sr.length);
|
||||
isc_buffer_add(target, sr.length);
|
||||
isc_buffer_forward(source, sr.length);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -226,7 +226,7 @@ fromstruct_in_wks(dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source,
|
|||
REQUIRE(type == 11);
|
||||
REQUIRE(rdclass == 1);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
@ -238,7 +238,7 @@ tostruct_in_wks(dns_rdata_t *rdata, void *target, isc_mem_t *mctx)
|
|||
REQUIRE(rdata->type == 11);
|
||||
REQUIRE(rdata->rdclass == 1);
|
||||
|
||||
return (DNS_R_NOTIMPLEMENTED);
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
@ -258,7 +258,7 @@ additionaldata_in_wks(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
|
|||
REQUIRE(rdata->type == 11);
|
||||
REQUIRE(rdata->rdclass == 1);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static inline isc_result_t
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ dns_rdatalist_tordataset(dns_rdatalist_t *rdatalist,
|
|||
rdataset->private4 = NULL;
|
||||
rdataset->private5 = NULL;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -94,9 +94,9 @@ rdatalist_first(dns_rdataset_t *rdataset) {
|
|||
rdataset->private2 = ISC_LIST_HEAD(rdatalist->rdata);
|
||||
|
||||
if (rdataset->private2 == NULL)
|
||||
return (DNS_R_NOMORE);
|
||||
return (ISC_R_NOMORE);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -105,14 +105,14 @@ rdatalist_next(dns_rdataset_t *rdataset) {
|
|||
|
||||
rdata = rdataset->private2;
|
||||
if (rdata == NULL)
|
||||
return (DNS_R_NOMORE);
|
||||
return (ISC_R_NOMORE);
|
||||
|
||||
rdataset->private2 = ISC_LIST_NEXT(rdata, link);
|
||||
|
||||
if (rdataset->private2 == NULL)
|
||||
return (DNS_R_NOMORE);
|
||||
return (ISC_R_NOMORE);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ question_disassociate(dns_rdataset_t *rdataset) {
|
|||
static isc_result_t
|
||||
question_cursor(dns_rdataset_t *rdataset) {
|
||||
(void)rdataset;
|
||||
return (DNS_R_NOMORE);
|
||||
return (ISC_R_NOMORE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -287,7 +287,7 @@ dns_rdataset_towire(dns_rdataset_t *rdataset,
|
|||
question = ISC_TRUE;
|
||||
count = 1;
|
||||
result = dns_rdataset_first(rdataset);
|
||||
INSIST(result == DNS_R_NOMORE);
|
||||
INSIST(result == ISC_R_NOMORE);
|
||||
} else if (rdataset->type == 0) {
|
||||
/*
|
||||
* This is a negative caching rdataset.
|
||||
|
|
@ -296,9 +296,9 @@ dns_rdataset_towire(dns_rdataset_t *rdataset,
|
|||
} else {
|
||||
count = (rdataset->methods->count)(rdataset);
|
||||
result = dns_rdataset_first(rdataset);
|
||||
if (result == DNS_R_NOMORE)
|
||||
return (DNS_R_SUCCESS);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result == ISC_R_NOMORE)
|
||||
return (ISC_R_SUCCESS);
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
}
|
||||
|
||||
|
|
@ -323,7 +323,7 @@ dns_rdataset_towire(dns_rdataset_t *rdataset,
|
|||
i++;
|
||||
result = dns_rdataset_next(rdataset);
|
||||
} while (result == ISC_R_SUCCESS);
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
return (result);
|
||||
INSIST(i == count);
|
||||
/*
|
||||
|
|
@ -365,7 +365,7 @@ dns_rdataset_towire(dns_rdataset_t *rdataset,
|
|||
else
|
||||
dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
|
||||
result = dns_name_towire(owner_name, cctx, target);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto rollback;
|
||||
headlen = sizeof(dns_rdataclass_t) + sizeof(dns_rdatatype_t);
|
||||
if (!question)
|
||||
|
|
@ -395,7 +395,7 @@ dns_rdataset_towire(dns_rdataset_t *rdataset,
|
|||
else
|
||||
dns_rdataset_current(rdataset, &rdata);
|
||||
result = dns_rdata_towire(&rdata, cctx, target);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto rollback;
|
||||
INSIST((target->used >= rdlen.used + 2) &&
|
||||
(target->used - rdlen.used - 2 < 65536));
|
||||
|
|
@ -413,19 +413,19 @@ dns_rdataset_towire(dns_rdataset_t *rdataset,
|
|||
i = 0;
|
||||
tcount++;
|
||||
if (tcount == count)
|
||||
result = DNS_R_NOMORE;
|
||||
result = ISC_R_NOMORE;
|
||||
else
|
||||
result = ISC_R_SUCCESS;
|
||||
} else
|
||||
result = dns_rdataset_next(rdataset);
|
||||
} while (result == DNS_R_SUCCESS);
|
||||
} while (result == ISC_R_SUCCESS);
|
||||
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
goto rollback;
|
||||
|
||||
*countp += count;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
|
||||
rollback:
|
||||
INSIST(savedbuffer.used < 65536);
|
||||
|
|
@ -452,18 +452,18 @@ dns_rdataset_additionaldata(dns_rdataset_t *rdataset,
|
|||
REQUIRE((rdataset->attributes & DNS_RDATASETATTR_QUESTION) == 0);
|
||||
|
||||
result = dns_rdataset_first(rdataset);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
return (result);
|
||||
|
||||
do {
|
||||
dns_rdataset_current(rdataset, &rdata);
|
||||
result = dns_rdata_additionaldata(&rdata, add, arg);
|
||||
if (result == DNS_R_SUCCESS)
|
||||
if (result == ISC_R_SUCCESS)
|
||||
result = dns_rdataset_next(rdataset);
|
||||
} while (result == DNS_R_SUCCESS);
|
||||
} while (result == ISC_R_SUCCESS);
|
||||
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
return (result);
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rdataslab.c,v 1.9 2000/02/03 23:43:58 halley Exp $ */
|
||||
/* $Id: rdataslab.c,v 1.10 2000/04/06 22:02:15 explorer Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ dns_rdataslab_fromrdataset(dns_rdataset_t *rdataset, isc_mem_t *mctx,
|
|||
unsigned int nitems;
|
||||
|
||||
result = dns_rdataset_first(rdataset);
|
||||
REQUIRE(result == DNS_R_SUCCESS);
|
||||
REQUIRE(result == ISC_R_SUCCESS);
|
||||
|
||||
buflen = reservelen + 2;
|
||||
nitems = 0;
|
||||
|
|
@ -63,9 +63,9 @@ dns_rdataslab_fromrdataset(dns_rdataset_t *rdataset, isc_mem_t *mctx,
|
|||
nitems++;
|
||||
|
||||
result = dns_rdataset_next(rdataset);
|
||||
} while (result == DNS_R_SUCCESS);
|
||||
} while (result == ISC_R_SUCCESS);
|
||||
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
return (result);
|
||||
|
||||
/*
|
||||
|
|
@ -74,7 +74,7 @@ dns_rdataslab_fromrdataset(dns_rdataset_t *rdataset, isc_mem_t *mctx,
|
|||
*/
|
||||
rawbuf = isc_mem_get(mctx, buflen);
|
||||
if (rawbuf == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
|
||||
region->base = rawbuf;
|
||||
region->length = buflen;
|
||||
|
|
@ -84,7 +84,7 @@ dns_rdataslab_fromrdataset(dns_rdataset_t *rdataset, isc_mem_t *mctx,
|
|||
*rawbuf++ = (nitems & 0xff00) >> 8;
|
||||
*rawbuf++ = (nitems & 0x00ff);
|
||||
result = dns_rdataset_first(rdataset);
|
||||
REQUIRE(result == DNS_R_SUCCESS);
|
||||
REQUIRE(result == ISC_R_SUCCESS);
|
||||
do {
|
||||
dns_rdataset_current(rdataset, &rdata);
|
||||
*rawbuf++ = (rdata.length & 0xff00) >> 8;
|
||||
|
|
@ -93,9 +93,9 @@ dns_rdataslab_fromrdataset(dns_rdataset_t *rdataset, isc_mem_t *mctx,
|
|||
rawbuf += rdata.length;
|
||||
|
||||
result = dns_rdataset_next(rdataset);
|
||||
} while (result == DNS_R_SUCCESS);
|
||||
} while (result == ISC_R_SUCCESS);
|
||||
|
||||
if (result != DNS_R_NOMORE) {
|
||||
if (result != ISC_R_NOMORE) {
|
||||
isc_mem_put(mctx, region->base, region->length);
|
||||
region->base = NULL;
|
||||
region->length = 0;
|
||||
|
|
@ -103,7 +103,7 @@ dns_rdataslab_fromrdataset(dns_rdataset_t *rdataset, isc_mem_t *mctx,
|
|||
return (result);
|
||||
}
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
unsigned int
|
||||
|
|
@ -219,7 +219,7 @@ dns_rdataslab_merge(unsigned char *oslab, unsigned char *nslab,
|
|||
*/
|
||||
tstart = isc_mem_get(mctx, tlength);
|
||||
if (tstart == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
memcpy(tstart, nslab, reservelen);
|
||||
tcurrent = tstart + reservelen;
|
||||
|
||||
|
|
@ -271,7 +271,7 @@ dns_rdataslab_merge(unsigned char *oslab, unsigned char *nslab,
|
|||
|
||||
*tslabp = tstart;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -348,7 +348,7 @@ dns_rdataslab_subtract(unsigned char *mslab, unsigned char *sslab,
|
|||
* Don't continue if the new rdataslab would be empty.
|
||||
*/
|
||||
if (tcount == 0)
|
||||
return (DNS_R_NXRDATASET);
|
||||
return (DNS_R_NXRRSET);
|
||||
|
||||
/*
|
||||
* If nothing is going to change, we can stop.
|
||||
|
|
@ -361,7 +361,7 @@ dns_rdataslab_subtract(unsigned char *mslab, unsigned char *sslab,
|
|||
*/
|
||||
tstart = isc_mem_get(mctx, tlength);
|
||||
if (tstart == NULL)
|
||||
return (DNS_R_NOMEMORY);
|
||||
return (ISC_R_NOMEMORY);
|
||||
memcpy(tstart, mslab, reservelen);
|
||||
tcurrent = tstart + reservelen;
|
||||
|
||||
|
|
@ -408,5 +408,5 @@ dns_rdataslab_subtract(unsigned char *mslab, unsigned char *sslab,
|
|||
|
||||
*tslabp = tstart;
|
||||
|
||||
return (DNS_R_SUCCESS);
|
||||
return (ISC_R_SUCCESS);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,13 +143,13 @@ dns_requestmgr_create(isc_mem_t *mctx,
|
|||
return (ISC_R_NOMEMORY);
|
||||
|
||||
result = isc_mutex_init(&requestmgr->lock);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_mem_put(mctx, requestmgr, sizeof(*requestmgr));
|
||||
return (result);
|
||||
}
|
||||
for (i = 0; i < DNS_REQUEST_NLOCKS; i++) {
|
||||
result = isc_mutex_init(&requestmgr->locks[i]);
|
||||
if (result != DNS_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
while (--i >= 0)
|
||||
isc_mutex_destroy(&requestmgr->locks[i]);
|
||||
isc_mutex_destroy(&requestmgr->lock);
|
||||
|
|
@ -422,7 +422,7 @@ dns_request_create(dns_requestmgr_t *requestmgr, dns_message_t *message,
|
|||
&request->dispatch);
|
||||
break;
|
||||
default:
|
||||
result = DNS_R_NOTIMPLEMENTED;
|
||||
result = ISC_R_NOTIMPLEMENTED;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
|
@ -528,22 +528,22 @@ render(dns_message_t *message, isc_buffer_t **bufferp, isc_mem_t *mctx) {
|
|||
* Render message.
|
||||
*/
|
||||
result = dns_message_renderbegin(message, buf1);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
result = dns_message_rendersection(message, DNS_SECTION_QUESTION, 0);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
result = dns_message_rendersection(message, DNS_SECTION_ANSWER, 0);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
result = dns_message_rendersection(message, DNS_SECTION_AUTHORITY, 0);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
result = dns_message_rendersection(message, DNS_SECTION_ADDITIONAL, 0);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
result = dns_message_renderend(message);
|
||||
if (result != DNS_R_SUCCESS)
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -678,7 +678,7 @@ fctx_query(fetchctx_t *fctx, dns_adbaddrinfo_t *addrinfo,
|
|||
dns_dispatch_attach(res->dispatchv6, &query->dispatch);
|
||||
break;
|
||||
default:
|
||||
result = DNS_R_NOTIMPLEMENTED;
|
||||
result = ISC_R_NOTIMPLEMENTED;
|
||||
goto cleanup_dispatch;
|
||||
}
|
||||
/*
|
||||
|
|
@ -1362,7 +1362,7 @@ fctx_getaddresses(fetchctx_t *fctx) {
|
|||
}
|
||||
result = dns_rdataset_next(&fctx->nameservers);
|
||||
}
|
||||
if (result != DNS_R_NOMORE)
|
||||
if (result != ISC_R_NOMORE)
|
||||
return (result);
|
||||
|
||||
out:
|
||||
|
|
@ -1595,7 +1595,7 @@ fctx_timeout(isc_task_t *task, isc_event_t *event) {
|
|||
FCTXTRACE("timeout");
|
||||
|
||||
if (event->type == ISC_TIMEREVENT_LIFE) {
|
||||
fctx_done(fctx, DNS_R_TIMEDOUT);
|
||||
fctx_done(fctx, ISC_R_TIMEDOUT);
|
||||
} else {
|
||||
/*
|
||||
* We could cancel the running queries here, or we could let
|
||||
|
|
@ -1916,7 +1916,7 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
|
|||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_time_nowplusinterval: %s",
|
||||
isc_result_totext(iresult));
|
||||
result = DNS_R_UNEXPECTED;
|
||||
result = ISC_R_UNEXPECTED;
|
||||
goto cleanup_rmessage;
|
||||
}
|
||||
|
||||
|
|
@ -1940,7 +1940,7 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
|
|||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_timer_create: %s",
|
||||
isc_result_totext(iresult));
|
||||
result = DNS_R_UNEXPECTED;
|
||||
result = ISC_R_UNEXPECTED;
|
||||
goto cleanup_rmessage;
|
||||
}
|
||||
|
||||
|
|
@ -2254,7 +2254,7 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, isc_stdtime_t now) {
|
|||
fctx->validating++;
|
||||
}
|
||||
#else
|
||||
result = DNS_R_NOTIMPLEMENTED;
|
||||
result = ISC_R_NOTIMPLEMENTED;
|
||||
#endif
|
||||
}
|
||||
} else if (!EXTERNAL(rdataset)) {
|
||||
|
|
@ -3277,7 +3277,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
|
|||
result = dns_message_parse(message, &devent->buffer, ISC_FALSE);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
switch (result) {
|
||||
case DNS_R_UNEXPECTEDEND:
|
||||
case ISC_R_UNEXPECTEDEND:
|
||||
if (!message->question_ok ||
|
||||
(message->flags & DNS_MESSAGEFLAG_TC) == 0 ||
|
||||
(options & DNS_FETCHOPT_TCP) != 0) {
|
||||
|
|
@ -3341,7 +3341,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
|
|||
}
|
||||
goto done;
|
||||
case DNS_R_MOREDATA:
|
||||
result = DNS_R_NOTIMPLEMENTED;
|
||||
result = ISC_R_NOTIMPLEMENTED;
|
||||
goto done;
|
||||
default:
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ static char *text[DNS_R_NRESULTS] = {
|
|||
"bitstring too long", /* 3 */
|
||||
"empty label", /* 4 */
|
||||
"bad dotted quad", /* 5 */
|
||||
"unexpected end of input", /* 6 */
|
||||
"UNUSED6", /* 6 */
|
||||
"unknown class/type", /* 7 */
|
||||
"bad label type", /* 8 */
|
||||
"bad compression pointer", /* 9 */
|
||||
|
|
@ -49,7 +49,7 @@ static char *text[DNS_R_NRESULTS] = {
|
|||
"no owner", /* 19 */
|
||||
"no ttl", /* 20 */
|
||||
"bad class", /* 21 */
|
||||
"unexpected token", /* 22 */
|
||||
"UNUSED22", /* 22 */
|
||||
"partial match", /* 23 */
|
||||
"new origin", /* 24 */
|
||||
"unchanged", /* 25 */
|
||||
|
|
@ -171,7 +171,6 @@ dns_result_torcode(isc_result_t result) {
|
|||
case DNS_R_LABELTOOLONG:
|
||||
case DNS_R_BADBITSTRING:
|
||||
case DNS_R_BITSTRINGTOOLONG:
|
||||
case DNS_R_UNEXPECTEDEND:
|
||||
case DNS_R_UNKNOWN:
|
||||
case DNS_R_BADLABELTYPE:
|
||||
case DNS_R_BADPOINTER:
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue