mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-29 01:49:02 -04:00
rem: dev: Clean up unused result codes
A number of result codes are obsolete and can be removed. Others, including `ISC_R_NOMEMORY`, are still checked in various places even though they can't occur any longer. These have been cleaned up. Merge branch 'each-cleanup-results' into 'main' See merge request isc-projects/bind9!9942
This commit is contained in:
commit
d3455be08c
92 changed files with 263 additions and 915 deletions
|
|
@ -112,11 +112,8 @@ add(char *key, int value) {
|
|||
}
|
||||
|
||||
if (symtab == NULL) {
|
||||
result = isc_symtab_create(sym_mctx, 100, freekey, sym_mctx,
|
||||
false, &symtab);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return;
|
||||
}
|
||||
isc_symtab_create(sym_mctx, 100, freekey, sym_mctx, false,
|
||||
&symtab);
|
||||
}
|
||||
|
||||
key = isc_mem_strdup(sym_mctx, key);
|
||||
|
|
@ -660,17 +657,17 @@ load_zone(isc_mem_t *mctx, const char *zonename, const char *filename,
|
|||
isc_buffer_add(&buffer, strlen(zonename));
|
||||
origin = dns_fixedname_initname(&fixorigin);
|
||||
CHECK(dns_name_fromtext(origin, &buffer, dns_rootname, 0, NULL));
|
||||
CHECK(dns_zone_setorigin(zone, origin));
|
||||
dns_zone_setorigin(zone, origin);
|
||||
dns_zone_setdbtype(zone, 1, (const char *const *)dbtype);
|
||||
if (strcmp(filename, "-") == 0) {
|
||||
CHECK(dns_zone_setstream(zone, stdin, fileformat,
|
||||
&dns_master_style_default));
|
||||
dns_zone_setstream(zone, stdin, fileformat,
|
||||
&dns_master_style_default);
|
||||
} else {
|
||||
CHECK(dns_zone_setfile(zone, filename, fileformat,
|
||||
&dns_master_style_default));
|
||||
dns_zone_setfile(zone, filename, fileformat,
|
||||
&dns_master_style_default);
|
||||
}
|
||||
if (journal != NULL) {
|
||||
CHECK(dns_zone_setjournal(zone, journal));
|
||||
dns_zone_setjournal(zone, journal);
|
||||
}
|
||||
|
||||
region.base = UNCONST(classname);
|
||||
|
|
|
|||
|
|
@ -787,9 +787,7 @@ key_fromconfig(const cfg_obj_t *key, dns_client_t *client, dns_view_t *toview) {
|
|||
num_keys++;
|
||||
|
||||
cleanup:
|
||||
if (result == DST_R_NOCRYPTO) {
|
||||
cfg_obj_log(key, ISC_LOG_ERROR, "no crypto support");
|
||||
} else if (result == DST_R_UNSUPPORTEDALG) {
|
||||
if (result == DST_R_UNSUPPORTEDALG) {
|
||||
cfg_obj_log(key, ISC_LOG_WARNING,
|
||||
"skipping trusted key '%s': %s", keynamestr,
|
||||
isc_result_totext(result));
|
||||
|
|
@ -823,9 +821,6 @@ load_keys(const cfg_obj_t *keys, dns_client_t *client, dns_view_t *toview) {
|
|||
}
|
||||
|
||||
cleanup:
|
||||
if (result == DST_R_NOCRYPTO) {
|
||||
result = ISC_R_SUCCESS;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -2202,8 +2197,8 @@ run_server(void *arg) {
|
|||
CHECK(ns_interfacemgr_create(mctx, sctx, loopmgr, netmgr, dispatchmgr,
|
||||
NULL, &interfacemgr));
|
||||
|
||||
CHECK(dns_view_create(mctx, loopmgr, dispatchmgr, dns_rdataclass_in,
|
||||
"_default", &view));
|
||||
dns_view_create(mctx, loopmgr, dispatchmgr, dns_rdataclass_in,
|
||||
"_default", &view);
|
||||
CHECK(dns_cache_create(loopmgr, dns_rdataclass_in, "", mctx, &cache));
|
||||
dns_view_setcache(view, cache, false);
|
||||
dns_cache_detach(&cache);
|
||||
|
|
|
|||
|
|
@ -489,7 +489,7 @@ control_recvmessage(isc_nmhandle_t *handle ISC_ATTR_UNUSED, isc_result_t result,
|
|||
if ((sent + CLOCKSKEW) < conn->now ||
|
||||
(sent - CLOCKSKEW) > conn->now)
|
||||
{
|
||||
result = ISCCC_R_CLOCKSKEW;
|
||||
result = DNS_R_CLOCKSKEW;
|
||||
goto cleanup;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -503,7 +503,7 @@ control_recvmessage(isc_nmhandle_t *handle ISC_ATTR_UNUSED, isc_result_t result,
|
|||
if (isccc_cc_lookupuint32(conn->ctrl, "_exp", &exp) == ISC_R_SUCCESS &&
|
||||
conn->now > exp)
|
||||
{
|
||||
result = ISCCC_R_EXPIRED;
|
||||
result = DNS_R_EXPIRED;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
|
@ -842,15 +842,12 @@ get_rndckey(isc_mem_t *mctx, controlkeylist_t *keyids) {
|
|||
CHECK(cfg_map_get(config, "key", &key));
|
||||
|
||||
keyid = isc_mem_get(mctx, sizeof(*keyid));
|
||||
*keyid = (controlkey_t){
|
||||
.algorithm = DST_ALG_UNKNOWN,
|
||||
.link = ISC_LINK_INITIALIZER,
|
||||
};
|
||||
keyid->keyname = isc_mem_strdup(mctx,
|
||||
cfg_obj_asstring(cfg_map_getname(key)));
|
||||
keyid->secret.base = NULL;
|
||||
keyid->secret.length = 0;
|
||||
keyid->algorithm = DST_ALG_UNKNOWN;
|
||||
ISC_LINK_INIT(keyid, link);
|
||||
if (keyid->keyname == NULL) {
|
||||
CHECK(ISC_R_NOMEMORY);
|
||||
}
|
||||
|
||||
CHECK(isccfg_check_key(key));
|
||||
|
||||
|
|
|
|||
|
|
@ -34,5 +34,5 @@ named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
|
|||
*
|
||||
* Returns:
|
||||
*\li ISC_R_SUCCESS
|
||||
*\li ISC_R_NOMEMORY
|
||||
*\li return codes from dns_name_fromtext()
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -32,5 +32,6 @@ named_tsigkeyring_fromconfig(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
*
|
||||
* Returns:
|
||||
* \li ISC_R_SUCCESS
|
||||
* \li ISC_R_NOMEMORY
|
||||
* \li DNS_R_BADALG
|
||||
* \li return codes from dns_name_fromtext()
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1414,14 +1414,7 @@ named_smf_get_instance(char **ins_name, int debug, isc_mem_t *mctx) {
|
|||
return ISC_R_FAILURE;
|
||||
}
|
||||
|
||||
if ((instance = isc_mem_allocate(mctx, namelen + 1)) == NULL) {
|
||||
UNEXPECTED_ERROR("named_smf_get_instance memory "
|
||||
"allocation failed: %s",
|
||||
isc_result_totext(ISC_R_NOMEMORY));
|
||||
scf_handle_destroy(h);
|
||||
return ISC_R_FAILURE;
|
||||
}
|
||||
|
||||
instance = isc_mem_allocate(mctx, namelen + 1);
|
||||
if (scf_myname(h, instance, namelen + 1) == -1) {
|
||||
if (debug) {
|
||||
UNEXPECTED_ERROR("scf_myname() failed: %s",
|
||||
|
|
|
|||
|
|
@ -904,15 +904,6 @@ process_key(const cfg_obj_t *key, dns_keytable_t *secroots,
|
|||
initializing ? "initial-key" : "static-key",
|
||||
namestr, isc_result_totext(result));
|
||||
return ISC_R_SUCCESS;
|
||||
case DST_R_NOCRYPTO:
|
||||
/*
|
||||
* Crypto support is not available.
|
||||
*/
|
||||
cfg_obj_log(key, ISC_LOG_ERROR,
|
||||
"ignoring %s for '%s': no crypto support",
|
||||
initializing ? "initial-key" : "static-key",
|
||||
namestr);
|
||||
return result;
|
||||
default:
|
||||
/*
|
||||
* Something unexpected happened; we have no choice but to
|
||||
|
|
@ -994,9 +985,6 @@ cleanup:
|
|||
if (secroots != NULL) {
|
||||
dns_keytable_detach(&secroots);
|
||||
}
|
||||
if (result == DST_R_NOCRYPTO) {
|
||||
result = ISC_R_SUCCESS;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -1317,15 +1305,12 @@ configure_order(dns_order_t *order, const cfg_obj_t *ent) {
|
|||
* explicit entry for "." when the name is "*".
|
||||
*/
|
||||
if (addroot) {
|
||||
result = dns_order_add(order, dns_rootname, rdtype, rdclass,
|
||||
mode);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
dns_order_add(order, dns_rootname, rdtype, rdclass, mode);
|
||||
}
|
||||
|
||||
return dns_order_add(order, dns_fixedname_name(&fixed), rdtype, rdclass,
|
||||
mode);
|
||||
dns_order_add(order, dns_fixedname_name(&fixed), rdtype, rdclass, mode);
|
||||
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
|
|
@ -1684,7 +1669,7 @@ check_dbtype(dns_zone_t *zone, unsigned int dbtypec, const char **dbargv,
|
|||
unsigned int i;
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
|
||||
CHECK(dns_zone_getdbtype(zone, &argv, mctx));
|
||||
dns_zone_getdbtype(zone, &argv, mctx);
|
||||
|
||||
/*
|
||||
* Check that all the arguments match.
|
||||
|
|
@ -1853,7 +1838,7 @@ dns64_reverse(dns_view_t *view, isc_mem_t *mctx, isc_netaddr_t *na,
|
|||
isc_buffer_add(&b, strlen(reverse));
|
||||
CHECK(dns_name_fromtext(name, &b, dns_rootname, 0, NULL));
|
||||
dns_zone_create(&zone, mctx, 0);
|
||||
CHECK(dns_zone_setorigin(zone, name));
|
||||
dns_zone_setorigin(zone, name);
|
||||
dns_zone_setview(zone, view);
|
||||
CHECK(dns_zonemgr_managezone(named_g_server->zonemgr, zone));
|
||||
dns_zone_setclass(zone, view->rdclass);
|
||||
|
|
@ -3223,7 +3208,7 @@ create_empty_zone(dns_zone_t *pzone, dns_name_t *name, dns_view_t *view,
|
|||
|
||||
if (pzone == NULL) {
|
||||
CHECK(dns_zonemgr_createzone(named_g_server->zonemgr, &zone));
|
||||
CHECK(dns_zone_setorigin(zone, name));
|
||||
dns_zone_setorigin(zone, name);
|
||||
CHECK(dns_zonemgr_managezone(named_g_server->zonemgr, zone));
|
||||
if (db == NULL) {
|
||||
dns_zone_setdbtype(zone, empty_dbtypec, empty_dbtype);
|
||||
|
|
@ -3330,7 +3315,7 @@ create_ipv4only_zone(dns_zone_t *pzone, dns_view_t *view,
|
|||
* Create the actual zone.
|
||||
*/
|
||||
dns_zone_create(&zone, mctx, 0);
|
||||
CHECK(dns_zone_setorigin(zone, name));
|
||||
dns_zone_setorigin(zone, name);
|
||||
CHECK(dns_zonemgr_managezone(named_g_server->zonemgr, zone));
|
||||
dns_zone_setclass(zone, view->rdclass);
|
||||
dns_zone_settype(zone, dns_zone_primary);
|
||||
|
|
@ -3913,11 +3898,6 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
|
|||
const cfg_obj_t *name, *search = NULL;
|
||||
char *s = isc_mem_strdup(mctx, cfg_obj_asstring(obj));
|
||||
|
||||
if (s == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
result = isc_commandline_strtoargv(mctx, s, &dlzargc,
|
||||
&dlzargv, 0);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
|
|
@ -4147,12 +4127,9 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
|
|||
dns64options |= DNS_DNS64_BREAK_DNSSEC;
|
||||
}
|
||||
|
||||
result = dns_dns64_create(mctx, &na, prefixlen, sp,
|
||||
clients, mapped, excluded,
|
||||
dns64options, &dns64);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
dns_dns64_create(mctx, &na, prefixlen, sp, clients,
|
||||
mapped, excluded, dns64options,
|
||||
&dns64);
|
||||
dns_dns64_append(&view->dns64, dns64);
|
||||
view->dns64cnt++;
|
||||
result = dns64_reverse(view, mctx, &na, prefixlen,
|
||||
|
|
@ -4748,7 +4725,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
|
|||
dns_peerlist_t *newpeers = NULL;
|
||||
|
||||
(void)named_config_get(cfgmaps, "server", &peers);
|
||||
CHECK(dns_peerlist_new(mctx, &newpeers));
|
||||
dns_peerlist_new(mctx, &newpeers);
|
||||
for (element = cfg_list_first(peers); element != NULL;
|
||||
element = cfg_list_next(element))
|
||||
{
|
||||
|
|
@ -4770,7 +4747,7 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
|
|||
const cfg_obj_t *rrsetorder = NULL;
|
||||
|
||||
(void)named_config_get(maps, "rrset-order", &rrsetorder);
|
||||
CHECK(dns_order_create(mctx, &order));
|
||||
dns_order_create(mctx, &order);
|
||||
for (element = cfg_list_first(rrsetorder); element != NULL;
|
||||
element = cfg_list_next(element))
|
||||
{
|
||||
|
|
@ -5316,9 +5293,9 @@ configure_view(dns_view_t *view, dns_viewlist_t *viewlist, cfg_obj_t *config,
|
|||
|
||||
if (dctx == NULL) {
|
||||
const void *hashinit = isc_hash_get_initializer();
|
||||
CHECK(dns_dyndb_createctx(mctx, hashinit, view,
|
||||
named_g_server->zonemgr,
|
||||
named_g_loopmgr, &dctx));
|
||||
dns_dyndb_createctx(mctx, hashinit, view,
|
||||
named_g_server->zonemgr,
|
||||
named_g_loopmgr, &dctx);
|
||||
}
|
||||
|
||||
CHECK(configure_dyndb(dyndb, mctx, dctx));
|
||||
|
|
@ -6160,12 +6137,8 @@ create_view(const cfg_obj_t *vconfig, dns_viewlist_t *viewlist,
|
|||
}
|
||||
INSIST(view == NULL);
|
||||
|
||||
result = dns_view_create(named_g_mctx, named_g_loopmgr,
|
||||
named_g_dispatchmgr, viewclass, viewname,
|
||||
&view);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
dns_view_create(named_g_mctx, named_g_loopmgr, named_g_dispatchmgr,
|
||||
viewclass, viewname, &view);
|
||||
|
||||
isc_nonce_buf(view->secret, sizeof(view->secret));
|
||||
|
||||
|
|
@ -6369,7 +6342,7 @@ configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
|
|||
} else {
|
||||
CHECK(dns_zonemgr_createzone(named_g_server->zonemgr,
|
||||
&zone));
|
||||
CHECK(dns_zone_setorigin(zone, origin));
|
||||
dns_zone_setorigin(zone, origin);
|
||||
dns_zone_setview(zone, view);
|
||||
CHECK(dns_zonemgr_managezone(named_g_server->zonemgr,
|
||||
zone));
|
||||
|
|
@ -6472,7 +6445,7 @@ configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
|
|||
* to create a new one.
|
||||
*/
|
||||
CHECK(dns_zonemgr_createzone(named_g_server->zonemgr, &zone));
|
||||
CHECK(dns_zone_setorigin(zone, origin));
|
||||
dns_zone_setorigin(zone, origin);
|
||||
dns_zone_setview(zone, view);
|
||||
CHECK(dns_zonemgr_managezone(named_g_server->zonemgr, zone));
|
||||
dns_zone_setstats(zone, named_g_server->zonestats);
|
||||
|
|
@ -6530,7 +6503,7 @@ configure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
|
|||
if (raw == NULL) {
|
||||
dns_zone_create(&raw, dns_zone_getmem(zone),
|
||||
dns_zone_gettid(zone));
|
||||
CHECK(dns_zone_setorigin(raw, origin));
|
||||
dns_zone_setorigin(raw, origin);
|
||||
dns_zone_setview(raw, view);
|
||||
dns_zone_setstats(raw, named_g_server->zonestats);
|
||||
CHECK(dns_zone_link(zone, raw));
|
||||
|
|
@ -6631,14 +6604,14 @@ add_keydata_zone(dns_view_t *view, const char *directory, isc_mem_t *mctx) {
|
|||
|
||||
/* No existing keydata zone was found; create one */
|
||||
CHECK(dns_zonemgr_createzone(named_g_server->zonemgr, &zone));
|
||||
CHECK(dns_zone_setorigin(zone, dns_rootname));
|
||||
dns_zone_setorigin(zone, dns_rootname);
|
||||
|
||||
defaultview = (strcmp(view->name, "_default") == 0);
|
||||
CHECK(isc_file_sanitize(
|
||||
directory, defaultview ? "managed-keys" : view->name,
|
||||
defaultview ? "bind" : "mkeys", filename, sizeof(filename)));
|
||||
CHECK(dns_zone_setfile(zone, filename, dns_masterformat_text,
|
||||
&dns_master_style_default));
|
||||
dns_zone_setfile(zone, filename, dns_masterformat_text,
|
||||
&dns_master_style_default);
|
||||
|
||||
dns_zone_setview(zone, view);
|
||||
dns_zone_settype(zone, dns_zone_key);
|
||||
|
|
@ -8251,20 +8224,8 @@ load_configuration(const char *filename, named_server_t *server,
|
|||
/*
|
||||
* Configure sets of UDP query source ports.
|
||||
*/
|
||||
result = isc_portset_create(named_g_mctx, &v4portset);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
|
||||
ISC_LOG_ERROR, "creating UDP/IPv4 port set: %s",
|
||||
isc_result_totext(result));
|
||||
goto cleanup_bindkeys_parser;
|
||||
}
|
||||
result = isc_portset_create(named_g_mctx, &v6portset);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(NAMED_LOGCATEGORY_GENERAL, NAMED_LOGMODULE_SERVER,
|
||||
ISC_LOG_ERROR, "creating UDP/IPv6 port set: %s",
|
||||
isc_result_totext(result));
|
||||
goto cleanup_v4portset;
|
||||
}
|
||||
isc_portset_create(named_g_mctx, &v4portset);
|
||||
isc_portset_create(named_g_mctx, &v6portset);
|
||||
|
||||
result = isc_net_getudpportrange(AF_INET, &udpport_low, &udpport_high);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
|
|
@ -8272,7 +8233,7 @@ load_configuration(const char *filename, named_server_t *server,
|
|||
ISC_LOG_ERROR,
|
||||
"get the default UDP/IPv4 port range: %s",
|
||||
isc_result_totext(result));
|
||||
goto cleanup_v6portset;
|
||||
goto cleanup_portsets;
|
||||
}
|
||||
|
||||
isc_portset_addrange(v4portset, udpport_low, udpport_high);
|
||||
|
|
@ -8290,7 +8251,7 @@ load_configuration(const char *filename, named_server_t *server,
|
|||
ISC_LOG_ERROR,
|
||||
"get the default UDP/IPv6 port range: %s",
|
||||
isc_result_totext(result));
|
||||
goto cleanup_v6portset;
|
||||
goto cleanup_portsets;
|
||||
}
|
||||
isc_portset_addrange(v6portset, udpport_low, udpport_high);
|
||||
if (!ns_server_getoption(server->sctx, NS_SERVER_DISABLE6)) {
|
||||
|
|
@ -8369,7 +8330,7 @@ load_configuration(const char *filename, named_server_t *server,
|
|||
} else {
|
||||
result = named_config_getport(config, "port", &listen_port);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup_v6portset;
|
||||
goto cleanup_portsets;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -8416,13 +8377,13 @@ load_configuration(const char *filename, named_server_t *server,
|
|||
|
||||
result = named_config_get(maps, "listen-on", &clistenon);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup_v6portset;
|
||||
goto cleanup_portsets;
|
||||
}
|
||||
result = listenlist_fromconfig(
|
||||
clistenon, config, named_g_aclconfctx, named_g_mctx,
|
||||
AF_INET, server->tlsctx_server_cache, &listenon);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup_v6portset;
|
||||
goto cleanup_portsets;
|
||||
}
|
||||
if (listenon != NULL) {
|
||||
ns_interfacemgr_setlistenon4(server->interfacemgr,
|
||||
|
|
@ -8440,13 +8401,13 @@ load_configuration(const char *filename, named_server_t *server,
|
|||
|
||||
result = named_config_get(maps, "listen-on-v6", &clistenon);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup_v6portset;
|
||||
goto cleanup_portsets;
|
||||
}
|
||||
result = listenlist_fromconfig(
|
||||
clistenon, config, named_g_aclconfctx, named_g_mctx,
|
||||
AF_INET6, server->tlsctx_server_cache, &listenon);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup_v6portset;
|
||||
goto cleanup_portsets;
|
||||
}
|
||||
if (listenon != NULL) {
|
||||
ns_interfacemgr_setlistenon6(server->interfacemgr,
|
||||
|
|
@ -8476,7 +8437,7 @@ load_configuration(const char *filename, named_server_t *server,
|
|||
"unable to listen on any configured "
|
||||
"interfaces");
|
||||
result = ISC_R_FAILURE;
|
||||
goto cleanup_v6portset;
|
||||
goto cleanup_portsets;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -9283,10 +9244,8 @@ cleanup_keystorelist:
|
|||
dns_keystore_detach(&keystore);
|
||||
}
|
||||
|
||||
cleanup_v6portset:
|
||||
cleanup_portsets:
|
||||
isc_portset_destroy(named_g_mctx, &v6portset);
|
||||
|
||||
cleanup_v4portset:
|
||||
isc_portset_destroy(named_g_mctx, &v4portset);
|
||||
|
||||
cleanup_bindkeys_parser:
|
||||
|
|
|
|||
|
|
@ -53,10 +53,7 @@ named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
|
|||
isc_buffer_t b;
|
||||
const cfg_obj_t *obj;
|
||||
|
||||
result = dns_tkeyctx_create(mctx, &tctx);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
dns_tkeyctx_create(mctx, &tctx);
|
||||
|
||||
obj = NULL;
|
||||
result = cfg_map_get(options, "tkey-domain", &obj);
|
||||
|
|
|
|||
|
|
@ -978,9 +978,6 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
if (result == ISC_R_SUCCESS) {
|
||||
cpval = isc_mem_strdup(mctx, cfg_obj_asstring(obj));
|
||||
}
|
||||
if (cpval == NULL) {
|
||||
CHECK(ISC_R_NOMEMORY);
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
result = cfg_map_get(zoptions, "dlz", &obj);
|
||||
|
|
@ -1109,24 +1106,20 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
size_t signedlen = strlen(filename) + sizeof(SIGNED);
|
||||
char *signedname;
|
||||
|
||||
CHECK(dns_zone_setfile(raw, filename, masterformat,
|
||||
masterstyle));
|
||||
dns_zone_setfile(raw, filename, masterformat, masterstyle);
|
||||
signedname = isc_mem_get(mctx, signedlen);
|
||||
|
||||
(void)snprintf(signedname, signedlen, "%s" SIGNED, filename);
|
||||
result = dns_zone_setfile(zone, signedname,
|
||||
dns_masterformat_raw, NULL);
|
||||
dns_zone_setfile(zone, signedname, dns_masterformat_raw, NULL);
|
||||
isc_mem_put(mctx, signedname, signedlen);
|
||||
CHECK(result);
|
||||
} else {
|
||||
CHECK(dns_zone_setfile(zone, filename, masterformat,
|
||||
masterstyle));
|
||||
dns_zone_setfile(zone, filename, masterformat, masterstyle);
|
||||
}
|
||||
|
||||
obj = NULL;
|
||||
result = cfg_map_get(zoptions, "journal", &obj);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
CHECK(dns_zone_setjournal(mayberaw, cfg_obj_asstring(obj)));
|
||||
dns_zone_setjournal(mayberaw, cfg_obj_asstring(obj));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -1627,7 +1620,7 @@ named_zone_configure(const cfg_obj_t *config, const cfg_obj_t *vconfig,
|
|||
result = named_config_get(maps, "key-directory", &obj);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
filename = cfg_obj_asstring(obj);
|
||||
CHECK(dns_zone_setkeydirectory(zone, filename));
|
||||
dns_zone_setkeydirectory(zone, filename);
|
||||
}
|
||||
/* Also save a reference to the keystore list. */
|
||||
dns_zone_setkeystores(zone, keystorelist);
|
||||
|
|
|
|||
|
|
@ -766,14 +766,12 @@ set_source_ports(dns_dispatchmgr_t *manager) {
|
|||
in_port_t udpport_low, udpport_high;
|
||||
isc_result_t result;
|
||||
|
||||
result = isc_portset_create(gmctx, &v4portset);
|
||||
check_result(result, "isc_portset_create (v4)");
|
||||
isc_portset_create(gmctx, &v4portset);
|
||||
result = isc_net_getudpportrange(AF_INET, &udpport_low, &udpport_high);
|
||||
check_result(result, "isc_net_getudpportrange (v4)");
|
||||
isc_portset_addrange(v4portset, udpport_low, udpport_high);
|
||||
|
||||
result = isc_portset_create(gmctx, &v6portset);
|
||||
check_result(result, "isc_portset_create (v6)");
|
||||
isc_portset_create(gmctx, &v6portset);
|
||||
result = isc_net_getudpportrange(AF_INET6, &udpport_low, &udpport_high);
|
||||
check_result(result, "isc_net_getudpportrange (v6)");
|
||||
isc_portset_addrange(v6portset, udpport_low, udpport_high);
|
||||
|
|
|
|||
|
|
@ -68,13 +68,7 @@ create_zone(sample_instance_t *const inst, dns_name_t *const name,
|
|||
|
||||
dns_zone_create(&raw, inst->mctx, 0); /* FIXME: all zones are assigned
|
||||
to loop 0 */
|
||||
result = dns_zone_setorigin(raw, name);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
log_write(ISC_LOG_ERROR,
|
||||
"create_zone: dns_zone_setorigin -> %s\n",
|
||||
isc_result_totext(result));
|
||||
goto cleanup;
|
||||
}
|
||||
dns_zone_setorigin(raw, name);
|
||||
dns_zone_setclass(raw, dns_rdataclass_in);
|
||||
dns_zone_settype(raw, dns_zone_primary);
|
||||
dns_zone_setdbtype(raw, 1, zone_argv);
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@ main(int argc, char *argv[]) {
|
|||
RUNCHECK(dns_requestmgr_create(mctx, loopmgr, dispatchmgr, dispatchv4,
|
||||
NULL, &requestmgr));
|
||||
|
||||
RUNCHECK(dns_view_create(mctx, loopmgr, NULL, 0, "_test", &view));
|
||||
dns_view_create(mctx, loopmgr, NULL, 0, "_test", &view);
|
||||
|
||||
isc_loopmgr_setup(loopmgr, sendqueries, NULL);
|
||||
isc_loopmgr_teardown(loopmgr, teardown_view, view);
|
||||
|
|
|
|||
|
|
@ -2044,11 +2044,7 @@ set_source_ports(dns_dispatchmgr_t *manager) {
|
|||
in_port_t udpport_low, udpport_high;
|
||||
isc_result_t result;
|
||||
|
||||
result = isc_portset_create(mctx, &v4portset);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("isc_portset_create (v4) failed");
|
||||
}
|
||||
|
||||
isc_portset_create(mctx, &v4portset);
|
||||
result = isc_net_getudpportrange(AF_INET, &udpport_low, &udpport_high);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("isc_net_getudpportrange (v4) failed");
|
||||
|
|
@ -2056,10 +2052,7 @@ set_source_ports(dns_dispatchmgr_t *manager) {
|
|||
|
||||
isc_portset_addrange(v4portset, udpport_low, udpport_high);
|
||||
|
||||
result = isc_portset_create(mctx, &v6portset);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("isc_portset_create (v6) failed");
|
||||
}
|
||||
isc_portset_create(mctx, &v6portset);
|
||||
result = isc_net_getudpportrange(AF_INET6, &udpport_low, &udpport_high);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("isc_net_getudpportrange (v6) failed");
|
||||
|
|
@ -2103,7 +2096,7 @@ setup(void *arg ISC_ATTR_UNUSED) {
|
|||
mctx, loopmgr, dispatchmgr, have_ipv4 ? dispatchvx : NULL,
|
||||
have_ipv6 ? dispatchvx : NULL, &requestmgr));
|
||||
|
||||
RUNCHECK(dns_view_create(mctx, loopmgr, NULL, 0, "_mdig", &view));
|
||||
dns_view_create(mctx, loopmgr, NULL, 0, "_mdig", &view);
|
||||
}
|
||||
|
||||
/*% Main processing routine for mdig */
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ main(int argc, char *argv[]) {
|
|||
options = ISC_LEXOPT_EOL;
|
||||
isc_lex_setcomments(lex, ISC_LEXCOMMENT_DNSMASTERFILE);
|
||||
|
||||
RUNTIME_CHECK(isc_lex_openstream(lex, stdin) == ISC_R_SUCCESS);
|
||||
isc_lex_openstream(lex, stdin);
|
||||
|
||||
if (origin != NULL) {
|
||||
name = dns_fixedname_initname(&fixed);
|
||||
|
|
|
|||
|
|
@ -173,13 +173,7 @@ LLVMFuzzerInitialize(int *argc ISC_ATTR_UNUSED, char ***argv ISC_ATTR_UNUSED) {
|
|||
|
||||
isc_loopmgr_create(mctx, 1, &loopmgr);
|
||||
|
||||
result = dns_view_create(mctx, loopmgr, NULL, dns_rdataclass_in, "view",
|
||||
&view);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stderr, "dns_view_create failed: %s\n",
|
||||
isc_result_totext(result));
|
||||
return 1;
|
||||
}
|
||||
dns_view_create(mctx, loopmgr, NULL, dns_rdataclass_in, "view", &view);
|
||||
|
||||
dns_tsigkeyring_create(mctx, &ring);
|
||||
dns_tsigkeyring_create(mctx, &emptyring);
|
||||
|
|
@ -214,30 +208,12 @@ LLVMFuzzerInitialize(int *argc ISC_ATTR_UNUSED, char ***argv ISC_ATTR_UNUSED) {
|
|||
|
||||
dns_zone_create(&zone, mctx, 0);
|
||||
|
||||
result = dns_zone_setorigin(zone, name);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stderr, "dns_zone_setorigin failed: %s\n",
|
||||
isc_result_totext(result));
|
||||
return 1;
|
||||
}
|
||||
|
||||
dns_zone_setorigin(zone, name);
|
||||
dns_zone_setclass(zone, view->rdclass);
|
||||
dns_zone_settype(zone, dns_zone_primary);
|
||||
|
||||
result = dns_zone_setkeydirectory(zone, wd);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stderr, "dns_zone_setkeydirectory failed: %s\n",
|
||||
isc_result_totext(result));
|
||||
return 1;
|
||||
}
|
||||
|
||||
result = dns_zone_setfile(zone, pathbuf, dns_masterformat_text,
|
||||
&dns_master_style_default);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stderr, "dns_zone_setfile failed: %s\n",
|
||||
isc_result_totext(result));
|
||||
return 1;
|
||||
}
|
||||
dns_zone_setkeydirectory(zone, wd);
|
||||
dns_zone_setfile(zone, pathbuf, dns_masterformat_text,
|
||||
&dns_master_style_default);
|
||||
|
||||
result = dns_zone_load(zone, false);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
|
|
|
|||
|
|
@ -1492,10 +1492,7 @@ catz_process_primaries(dns_catz_zone_t *catz, dns_ipkeylist_t *ipkl,
|
|||
sizeof(sockaddr));
|
||||
}
|
||||
} else {
|
||||
result = dns_ipkeylist_resize(mctx, ipkl, i + 1);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
dns_ipkeylist_resize(mctx, ipkl, i + 1);
|
||||
|
||||
ipkl->labels[i] = isc_mem_get(mctx,
|
||||
sizeof(*ipkl->labels[0]));
|
||||
|
|
@ -1521,10 +1518,7 @@ catz_process_primaries(dns_catz_zone_t *catz, dns_ipkeylist_t *ipkl,
|
|||
|
||||
rcount = dns_rdataset_count(value) + ipkl->count;
|
||||
|
||||
result = dns_ipkeylist_resize(mctx, ipkl, rcount);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
dns_ipkeylist_resize(mctx, ipkl, rcount);
|
||||
|
||||
for (result = dns_rdataset_first(value); result == ISC_R_SUCCESS;
|
||||
result = dns_rdataset_next(value))
|
||||
|
|
|
|||
|
|
@ -149,20 +149,14 @@ setsourceports(isc_mem_t *mctx, dns_dispatchmgr_t *manager) {
|
|||
in_port_t udpport_low, udpport_high;
|
||||
isc_result_t result;
|
||||
|
||||
result = isc_portset_create(mctx, &v4portset);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
isc_portset_create(mctx, &v4portset);
|
||||
result = isc_net_getudpportrange(AF_INET, &udpport_low, &udpport_high);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
isc_portset_addrange(v4portset, udpport_low, udpport_high);
|
||||
|
||||
result = isc_portset_create(mctx, &v6portset);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
isc_portset_create(mctx, &v6portset);
|
||||
result = isc_net_getudpportrange(AF_INET6, &udpport_low, &udpport_high);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
|
|
@ -210,11 +204,8 @@ createview(isc_mem_t *mctx, dns_rdataclass_t rdclass, isc_nm_t *nm,
|
|||
isc_result_t result;
|
||||
dns_view_t *view = NULL;
|
||||
|
||||
result = dns_view_create(mctx, loopmgr, dispatchmgr, rdclass,
|
||||
DNS_CLIENTVIEW_NAME, &view);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
dns_view_create(mctx, loopmgr, dispatchmgr, rdclass,
|
||||
DNS_CLIENTVIEW_NAME, &view);
|
||||
|
||||
/* Initialize view security roots */
|
||||
dns_view_initsecroots(view);
|
||||
|
|
|
|||
|
|
@ -450,10 +450,7 @@ dns_dlz_writeablezone(dns_view_t *view, dns_dlzdb_t *dlzdb,
|
|||
|
||||
/* Create it */
|
||||
dns_zone_create(&zone, view->mctx, 0);
|
||||
result = dns_zone_setorigin(zone, origin);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
dns_zone_setorigin(zone, origin);
|
||||
dns_zone_setview(zone, view);
|
||||
|
||||
dns_zone_setadded(zone, true);
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ struct dns_dns64 {
|
|||
ISC_LINK(dns_dns64_t) link;
|
||||
};
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_dns64_create(isc_mem_t *mctx, const isc_netaddr_t *prefix,
|
||||
unsigned int prefixlen, const isc_netaddr_t *suffix,
|
||||
dns_acl_t *clients, dns_acl_t *mapped, dns_acl_t *excluded,
|
||||
|
|
@ -100,7 +100,6 @@ dns_dns64_create(isc_mem_t *mctx, const isc_netaddr_t *prefix,
|
|||
dns64->mctx = NULL;
|
||||
isc_mem_attach(mctx, &dns64->mctx);
|
||||
*dns64p = dns64;
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -70,9 +70,6 @@ dns_ds_fromkeyrdata(const dns_name_t *owner, dns_rdata_t *key,
|
|||
(void)dns_name_downcase(owner, name, NULL);
|
||||
|
||||
md = isc_md_new();
|
||||
if (md == NULL) {
|
||||
return ISC_R_NOMEMORY;
|
||||
}
|
||||
|
||||
result = isc_md_init(md, md_type);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ dns_dyndb_cleanup(bool exiting) {
|
|||
}
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_dyndb_createctx(isc_mem_t *mctx, const void *hashinit, dns_view_t *view,
|
||||
dns_zonemgr_t *zmgr, isc_loopmgr_t *loopmgr,
|
||||
dns_dyndbctx_t **dctxp) {
|
||||
|
|
@ -290,8 +290,6 @@ dns_dyndb_createctx(isc_mem_t *mctx, const void *hashinit, dns_view_t *view,
|
|||
dctx->magic = DNS_DYNDBCTX_MAGIC;
|
||||
|
||||
*dctxp = dctx;
|
||||
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -342,7 +342,6 @@ dns_adb_createfind(dns_adb_t *adb, isc_loop_t *loop, isc_job_cb cb, void *cbarg,
|
|||
*\li #ISC_R_NOMORE Addresses might have been returned, but no events
|
||||
* will ever be posted for this context. This is only
|
||||
* returned if task != NULL.
|
||||
*\li #ISC_R_NOMEMORY insufficient resources
|
||||
*\li #DNS_R_ALIAS 'name' is an alias for another name.
|
||||
*
|
||||
* Notes:
|
||||
|
|
@ -575,7 +574,6 @@ dns_adb_findaddrinfo(dns_adb_t *adb, const isc_sockaddr_t *sa,
|
|||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li #ISC_R_SHUTTINGDOWN
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,6 @@ dns_cache_create(isc_loopmgr_t *loopmgr, dns_rdataclass_t rdclass,
|
|||
* Returns:
|
||||
*
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*/
|
||||
|
||||
void
|
||||
|
|
@ -190,7 +189,6 @@ dns_cache_flush(dns_cache_t *cache);
|
|||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -205,7 +203,6 @@ dns_cache_flushnode(dns_cache_t *cache, const dns_name_t *name, bool tree);
|
|||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li other error returns.
|
||||
*/
|
||||
|
||||
|
|
@ -221,7 +218,6 @@ dns_cache_flushname(dns_cache_t *cache, const dns_name_t *name);
|
|||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li other error returns.
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -137,7 +137,6 @@ dns_catz_entry_new(isc_mem_t *mctx, const dns_name_t *domain);
|
|||
*
|
||||
* Returns:
|
||||
* \li ISC_R_SUCCESS on success
|
||||
* \li ISC_R_NOMEMORY on allocation failure
|
||||
*/
|
||||
|
||||
dns_catz_entry_t *
|
||||
|
|
@ -151,7 +150,6 @@ dns_catz_entry_copy(dns_catz_zone_t *catz, const dns_catz_entry_t *entry);
|
|||
*
|
||||
* Returns:
|
||||
* \li ISC_R_SUCCESS on success
|
||||
* \li ISC_R_NOMEMORY on allocation failure
|
||||
*/
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -370,7 +370,6 @@ dns_db_create(isc_mem_t *mctx, const char *db_type, const dns_name_t *origin,
|
|||
* Returns:
|
||||
*
|
||||
* \li #ISC_R_SUCCESS
|
||||
* \li #ISC_R_NOMEMORY
|
||||
* \li #ISC_R_NOTFOUND db_type not found
|
||||
*
|
||||
* \li Many other errors are possible, depending on what db_type was
|
||||
|
|
@ -501,7 +500,6 @@ dns_db_beginload(dns_db_t *db, dns_rdatacallbacks_t *callbacks);
|
|||
* Returns:
|
||||
*
|
||||
* \li #ISC_R_SUCCESS
|
||||
* \li #ISC_R_NOMEMORY
|
||||
*
|
||||
* \li Other results are possible, depending upon the database
|
||||
* implementation used, syntax errors in the master file, etc.
|
||||
|
|
@ -527,7 +525,6 @@ dns_db_endload(dns_db_t *db, dns_rdatacallbacks_t *callbacks);
|
|||
* Returns:
|
||||
*
|
||||
* \li #ISC_R_SUCCESS
|
||||
* \li #ISC_R_NOMEMORY
|
||||
*
|
||||
* \li Other results are possible, depending upon the database
|
||||
* implementation used, syntax errors in the master file, etc.
|
||||
|
|
@ -557,7 +554,6 @@ dns_db_load(dns_db_t *db, const char *filename, dns_masterformat_t format,
|
|||
* Returns:
|
||||
*
|
||||
* \li #ISC_R_SUCCESS
|
||||
* \li #ISC_R_NOMEMORY
|
||||
*
|
||||
* \li Other results are possible, depending upon the database
|
||||
* implementation used, syntax errors in the master file, etc.
|
||||
|
|
@ -577,7 +573,6 @@ dns_db_dump(dns_db_t *db, dns_dbversion_t *version, const char *filename);
|
|||
* Returns:
|
||||
*
|
||||
* \li #ISC_R_SUCCESS
|
||||
* \li #ISC_R_NOMEMORY
|
||||
*
|
||||
* \li Other results are possible, depending upon the database
|
||||
* implementation used, OS file errors, etc.
|
||||
|
|
@ -622,7 +617,6 @@ dns_db_newversion(dns_db_t *db, dns_dbversion_t **versionp);
|
|||
* Returns:
|
||||
*
|
||||
* \li #ISC_R_SUCCESS
|
||||
* \li #ISC_R_NOMEMORY
|
||||
*
|
||||
* \li Other results are possible, depending upon the database
|
||||
* implementation used.
|
||||
|
|
@ -731,7 +725,6 @@ dns__db_findnodeext(dns_db_t *db, const dns_name_t *name, bool create,
|
|||
*
|
||||
* \li #ISC_R_SUCCESS
|
||||
* \li #ISC_R_NOTFOUND If !create and name not found.
|
||||
* \li #ISC_R_NOMEMORY Can only happen if create is true.
|
||||
*
|
||||
* \li Other results are possible, depending upon the database
|
||||
* implementation used.
|
||||
|
|
@ -928,8 +921,6 @@ dns__db_findext(dns_db_t *db, const dns_name_t *name, dns_dbversion_t *version,
|
|||
*
|
||||
* Error results:
|
||||
*
|
||||
* \li #ISC_R_NOMEMORY
|
||||
*
|
||||
* \li #DNS_R_BADDB Data that is required to be
|
||||
* present in the DB, e.g. an NSEC
|
||||
* record in a secure zone, is not
|
||||
|
|
@ -1105,7 +1096,6 @@ dns_db_createiterator(dns_db_t *db, unsigned int options,
|
|||
* Returns:
|
||||
*
|
||||
* \li #ISC_R_SUCCESS
|
||||
* \li #ISC_R_NOMEMORY
|
||||
*/
|
||||
|
||||
/***
|
||||
|
|
@ -1274,8 +1264,8 @@ dns__db_addrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
|||
* Returns:
|
||||
*
|
||||
* \li #ISC_R_SUCCESS
|
||||
* \li #DNS_R_UNCHANGED The operation did not change
|
||||
* anything. \li #ISC_R_NOMEMORY \li #DNS_R_NOTEXACT
|
||||
* \li #DNS_R_UNCHANGED The operation did not change anything.
|
||||
* \li #DNS_R_NOTEXACT
|
||||
*
|
||||
* \li Other results are possible, depending upon the database
|
||||
* implementation used.
|
||||
|
|
@ -1455,7 +1445,6 @@ dns_db_register(const char *name, dns_dbcreatefunc_t create, void *driverarg,
|
|||
*
|
||||
* Returns:
|
||||
* \li #ISC_R_SUCCESS The registration succeeded
|
||||
* \li #ISC_R_NOMEMORY Out of memory
|
||||
* \li #ISC_R_EXISTS A database implementation with the same name exists
|
||||
*
|
||||
* Ensures:
|
||||
|
|
@ -1568,7 +1557,6 @@ dns__db_findnsec3node(dns_db_t *db, const dns_name_t *name, bool create,
|
|||
*
|
||||
* \li #ISC_R_SUCCESS
|
||||
* \li #ISC_R_NOTFOUND If !create and name not found.
|
||||
* \li #ISC_R_NOMEMORY Can only happen if create is true.
|
||||
*
|
||||
* \li Other results are possible, depending upon the database
|
||||
* implementation used.
|
||||
|
|
@ -1586,7 +1574,6 @@ dns_db_setsigningtime(dns_db_t *db, dns_rdataset_t *rdataset,
|
|||
*
|
||||
* Returns:
|
||||
* \li #ISC_R_SUCCESS
|
||||
* \li #ISC_R_NOMEMORY
|
||||
* \li #ISC_R_NOTIMPLEMENTED - Not supported by this DB implementation.
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -284,7 +284,5 @@ dns_diff_print(const dns_diff_t *diff, FILE *file);
|
|||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li #ISC_R_UNEXPECTED
|
||||
*\li any error from dns_rdataset_totext()
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -348,7 +348,6 @@ dns_dispatch_add(dns_dispatch_t *disp, isc_loop_t *loop,
|
|||
* Returns:
|
||||
*
|
||||
*\li ISC_R_SUCCESS -- all is well.
|
||||
*\li ISC_R_NOMEMORY -- memory could not be allocated.
|
||||
*\li ISC_R_NOMORE -- no more message ids can be allocated
|
||||
* for this destination.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#define DNS_DNS64_RECURSIVE 0x01 /* Recursive query. */
|
||||
#define DNS_DNS64_DNSSEC 0x02 /* DNSSEC sensitive query. */
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_dns64_create(isc_mem_t *mctx, const isc_netaddr_t *prefix,
|
||||
unsigned int prefixlen, const isc_netaddr_t *suffix,
|
||||
dns_acl_t *client, dns_acl_t *mapped, dns_acl_t *excluded,
|
||||
|
|
@ -79,10 +79,6 @@ dns_dns64_create(isc_mem_t *mctx, const isc_netaddr_t *prefix,
|
|||
* 'client' to be NULL or a valid acl.
|
||||
* 'mapped' to be NULL or a valid acl.
|
||||
* 'excluded' to be NULL or a valid acl.
|
||||
*
|
||||
* Returns:
|
||||
* ISC_R_SUCCESS
|
||||
* ISC_R_NOMEMORY
|
||||
*/
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -89,7 +89,6 @@ dns_dnssec_keyfromrdata(const dns_name_t *name, const dns_rdata_t *rdata,
|
|||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li DST_R_INVALIDPUBLICKEY
|
||||
*\li various errors from dns_name_totext
|
||||
*/
|
||||
|
|
@ -131,7 +130,6 @@ dns_dnssec_sign(const dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
|
|||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li #ISC_R_NOSPACE
|
||||
*\li #DNS_R_INVALIDTIME - the expiration is before the inception
|
||||
*\li #DNS_R_KEYUNAUTHORIZED - the key cannot sign this data (either
|
||||
|
|
@ -162,7 +160,6 @@ dns_dnssec_verify(const dns_name_t *name, dns_rdataset_t *set, dst_key_t *key,
|
|||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li #DNS_R_FROMWILDCARD - the signature is valid and is from
|
||||
* a wildcard expansion. dns_dnssec_verify2() only.
|
||||
* 'wild' contains the name of the wildcard if non-NULL.
|
||||
|
|
@ -201,7 +198,6 @@ dns_dnssec_signmessage(dns_message_t *msg, dst_key_t *key);
|
|||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li DST_R_*
|
||||
*/
|
||||
|
||||
|
|
@ -223,7 +219,6 @@ dns_dnssec_verifymessage(isc_buffer_t *source, dns_message_t *msg,
|
|||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li #ISC_R_NOTFOUND - no SIG(0) was found
|
||||
*\li #DNS_R_SIGINVALID - the SIG record is not well-formed or
|
||||
* was not generated by the key.
|
||||
|
|
@ -298,7 +293,6 @@ dns_dnssec_findmatchingkeys(const dns_name_t *origin, dns_kasp_t *kasp,
|
|||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOTFOUND
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li any error returned by dns_name_totext(), isc_dir_open(), or
|
||||
* dst_key_fromnamedfile()
|
||||
*
|
||||
|
|
|
|||
|
|
@ -70,7 +70,6 @@ dns_dyndb_register_t(isc_mem_t *mctx, const char *name, const char *parameters,
|
|||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li Other errors are possible
|
||||
*/
|
||||
|
||||
|
|
@ -114,7 +113,6 @@ dns_dyndb_load(const char *libname, const char *name, const char *parameters,
|
|||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li Other errors are possible
|
||||
*/
|
||||
|
||||
|
|
@ -127,7 +125,7 @@ dns_dyndb_cleanup(bool exiting);
|
|||
* as opposed to merely being reconfigured.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_dyndb_createctx(isc_mem_t *mctx, const void *hashinit, dns_view_t *view,
|
||||
dns_zonemgr_t *zmgr, isc_loopmgr_t *loopmgr,
|
||||
dns_dyndbctx_t **dctxp);
|
||||
|
|
@ -138,11 +136,6 @@ dns_dyndb_createctx(isc_mem_t *mctx, const void *hashinit, dns_view_t *view,
|
|||
* etc). This structure is expected to last only until all dyndb
|
||||
* modules have been loaded and initialized; after that it will be
|
||||
* destroyed with dns_dyndb_destroyctx().
|
||||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li Other errors are possible
|
||||
*/
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ dns_fwdtable_add(dns_fwdtable_t *fwdtable, const dns_name_t *name,
|
|||
*
|
||||
* Returns:
|
||||
* \li #ISC_R_SUCCESS
|
||||
* \li #ISC_R_NOMEMORY
|
||||
* \li other errors from dns_qp_insert()
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
|
|
|
|||
|
|
@ -71,7 +71,8 @@ dns_ipkeylist_copy(isc_mem_t *mctx, const dns_ipkeylist_t *src,
|
|||
*\li #ISC_R_SUCCESS -- success
|
||||
*\li any other value -- failure
|
||||
*/
|
||||
isc_result_t
|
||||
|
||||
void
|
||||
dns_ipkeylist_resize(isc_mem_t *mctx, dns_ipkeylist_t *ipkl, unsigned int n);
|
||||
/*%<
|
||||
* Resize ipkl to contain n elements. Size (count) is not changed, and the
|
||||
|
|
@ -81,8 +82,4 @@ dns_ipkeylist_resize(isc_mem_t *mctx, dns_ipkeylist_t *ipkl, unsigned int n);
|
|||
* \li 'mctx' to be a valid memory context.
|
||||
* \li 'ipk' to be non NULL
|
||||
* \li 'n' >= ipkl->count
|
||||
*
|
||||
* Returns:
|
||||
* \li #ISC_R_SUCCESS if success
|
||||
* \li #ISC_R_NOMEMORY if there's no memory, ipkeylist is left untouched
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ struct dns_kasp {
|
|||
#define DNS_KASP_KEY_ROLE_KSK 0x01
|
||||
#define DNS_KASP_KEY_ROLE_ZSK 0x02
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_kasp_create(isc_mem_t *mctx, const char *name, dns_kasp_t **kaspp);
|
||||
/*%<
|
||||
* Create a KASP.
|
||||
|
|
@ -150,11 +150,6 @@ dns_kasp_create(isc_mem_t *mctx, const char *name, dns_kasp_t **kaspp);
|
|||
*\li kaspp != NULL && *kaspp == NULL
|
||||
*
|
||||
* Returns:
|
||||
*
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*
|
||||
*\li Other errors are possible.
|
||||
*/
|
||||
|
||||
void
|
||||
|
|
@ -566,13 +561,6 @@ dns_kasp_keys(dns_kasp_t *kasp);
|
|||
* Requires:
|
||||
*
|
||||
*\li 'kasp' is a valid, frozen kasp.
|
||||
*
|
||||
* Returns:
|
||||
*
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*
|
||||
*\li Other errors are possible.
|
||||
*/
|
||||
|
||||
bool
|
||||
|
|
@ -600,7 +588,7 @@ dns_kasp_addkey(dns_kasp_t *kasp, dns_kasp_key_t *key);
|
|||
*\li 'key' is not NULL.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_kasp_key_create(dns_kasp_t *kasp, dns_kasp_key_t **keyp);
|
||||
/*%<
|
||||
* Create a key inside a KASP.
|
||||
|
|
@ -610,13 +598,6 @@ dns_kasp_key_create(dns_kasp_t *kasp, dns_kasp_key_t **keyp);
|
|||
*\li 'kasp' is a valid kasp.
|
||||
*
|
||||
*\li keyp != NULL && *keyp == NULL
|
||||
*
|
||||
* Returns:
|
||||
*
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*
|
||||
*\li Other errors are possible.
|
||||
*/
|
||||
|
||||
void
|
||||
|
|
@ -882,13 +863,6 @@ dns_kasp_digests(dns_kasp_t *kasp);
|
|||
* Requires:
|
||||
*
|
||||
*\li 'kasp' is a valid, frozen kasp.
|
||||
*
|
||||
* Returns:
|
||||
*
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*
|
||||
*\li Other errors are possible.
|
||||
*/
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ struct dns_keystore {
|
|||
|
||||
#define DNS_KEYSTORE_KEYDIRECTORY "key-directory"
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_keystore_create(isc_mem_t *mctx, const char *name, dns_keystore_t **kspp);
|
||||
/*%<
|
||||
* Create a key store.
|
||||
|
|
@ -71,13 +71,6 @@ dns_keystore_create(isc_mem_t *mctx, const char *name, dns_keystore_t **kspp);
|
|||
*\li 'name' is a valid C string.
|
||||
*
|
||||
*\li kspp != NULL && *kspp == NULL
|
||||
*
|
||||
* Returns:
|
||||
*
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*
|
||||
*\li Other errors are possible.
|
||||
*/
|
||||
|
||||
const char *
|
||||
|
|
|
|||
|
|
@ -177,7 +177,6 @@ dns_master_loadfileasync(const char *master_file, dns_name_t *top,
|
|||
*\li ISC_R_SUCCESS upon successfully loading the master file.
|
||||
*\li DNS_R_SEENINCLUDE upon successfully loading the master file with
|
||||
* a $INCLUDE statement.
|
||||
*\li ISC_R_NOMEMORY out of memory.
|
||||
*\li ISC_R_UNEXPECTEDEND expected to be able to read a input token and
|
||||
* there was not one.
|
||||
*\li ISC_R_UNEXPECTED
|
||||
|
|
|
|||
|
|
@ -271,7 +271,6 @@ dns_master_dumptostream(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
|
|||
*
|
||||
* Returns:
|
||||
*\li ISC_R_SUCCESS
|
||||
*\li ISC_R_NOMEMORY
|
||||
*\li Any database or rrset iterator error.
|
||||
*\li Any dns_rdata_totext() error code.
|
||||
*/
|
||||
|
|
@ -303,7 +302,6 @@ dns_master_dump(isc_mem_t *mctx, dns_db_t *db, dns_dbversion_t *version,
|
|||
*
|
||||
* Returns:
|
||||
*\li ISC_R_SUCCESS
|
||||
*\li ISC_R_NOMEMORY
|
||||
*\li Any database or rrset iterator error.
|
||||
*\li Any dns_rdata_totext() error code.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -584,7 +584,6 @@ dns_message_parse(dns_message_t *msg, isc_buffer_t *source,
|
|||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS -- all is well
|
||||
*\li #ISC_R_NOMEMORY -- no memory
|
||||
*\li #DNS_R_RECOVERABLE -- the message parsed properly, but contained
|
||||
* errors.
|
||||
*\li Many other errors possible XXXMLG
|
||||
|
|
@ -699,8 +698,6 @@ dns_message_rendersection(dns_message_t *msg, dns_section_t section,
|
|||
* no more records for this section.
|
||||
*\li #ISC_R_NOSPACE -- Not enough room in the buffer to write
|
||||
* all records requested.
|
||||
*\li #DNS_R_MOREDATA -- All requested records written, and there
|
||||
* are records remaining for this section.
|
||||
*/
|
||||
|
||||
void
|
||||
|
|
@ -1207,7 +1204,7 @@ dns_message_getquerytsig(dns_message_t *msg, isc_mem_t *mctx,
|
|||
* Returns:
|
||||
*
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li any return code from dns_rdataset_first()
|
||||
*
|
||||
* Ensures:
|
||||
*\li 'tsig' points to NULL or an allocated buffer which must be freed
|
||||
|
|
@ -1441,10 +1438,8 @@ dns_message_buildopt(dns_message_t *msg, dns_rdataset_t **opt,
|
|||
* \li opt to be a non NULL and *opt to be NULL.
|
||||
*
|
||||
* Returns:
|
||||
* \li ISC_R_SUCCESS on success.
|
||||
* \li ISC_R_NOMEMORY
|
||||
* \li ISC_R_SUCCESS
|
||||
* \li ISC_R_NOSPACE
|
||||
* \li other.
|
||||
*/
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -1217,8 +1217,6 @@ dns_name_tostring(const dns_name_t *source, char **target, isc_mem_t *mctx);
|
|||
* Returns:
|
||||
*
|
||||
*\li ISC_R_SUCCESS
|
||||
*\li ISC_R_NOMEMORY
|
||||
*
|
||||
*\li Any error that dns_name_totext() can return.
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include <dns/types.h>
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_order_create(isc_mem_t *mctx, dns_order_t **orderp);
|
||||
/*%<
|
||||
* Create a order object.
|
||||
|
|
@ -27,13 +27,9 @@ dns_order_create(isc_mem_t *mctx, dns_order_t **orderp);
|
|||
* Requires:
|
||||
* \li 'orderp' to be non NULL and '*orderp == NULL'.
|
||||
*\li 'mctx' to be valid.
|
||||
*
|
||||
* Returns:
|
||||
*\li ISC_R_SUCCESS
|
||||
*\li ISC_R_NOMEMORY
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_order_add(dns_order_t *order, const dns_name_t *name,
|
||||
dns_rdatatype_t rdtype, dns_rdataclass_t rdclass,
|
||||
unsigned int mode);
|
||||
|
|
@ -45,10 +41,6 @@ dns_order_add(dns_order_t *order, const dns_name_t *name,
|
|||
*\li 'name' to be valid.
|
||||
*\li 'mode' to be one of #DNS_RDATASETATTR_RANDOMIZE,
|
||||
* #DNS_RDATASETATTR_FIXEDORDER or zero (#DNS_RDATASETATTR_CYCLIC).
|
||||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*/
|
||||
|
||||
unsigned int
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
*** Functions
|
||||
***/
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_peerlist_new(isc_mem_t *mem, dns_peerlist_t **list);
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -182,8 +182,9 @@ dns_rdataslab_fromrdataset(dns_rdataset_t *rdataset, isc_mem_t *mctx,
|
|||
*
|
||||
* Returns:
|
||||
*\li ISC_R_SUCCESS - successful completion
|
||||
*\li ISC_R_NOMEMORY - no memory.
|
||||
*\li XXX others
|
||||
*\li ISC_R_NOSPACE - more than 64k RRs
|
||||
*\li DNS_R_TOOMANYRECORDS - more than max-records-per-rrset RRs
|
||||
*\li DNS_R_SINGLETON - singleton type has more than one RR
|
||||
*/
|
||||
|
||||
unsigned int
|
||||
|
|
|
|||
|
|
@ -408,7 +408,6 @@ dns_resolver_disable_algorithm(dns_resolver_t *resolver, const dns_name_t *name,
|
|||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_RANGE
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -421,7 +420,6 @@ dns_resolver_disable_ds_digest(dns_resolver_t *resolver, const dns_name_t *name,
|
|||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_RANGE
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*/
|
||||
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ dns_rriterator_init(dns_rriterator_t *it, dns_db_t *db, dns_dbversion_t *ver,
|
|||
* Returns:
|
||||
*
|
||||
* \li #ISC_R_SUCCESS
|
||||
* \li #ISC_R_NOMEMORY
|
||||
* \li any error from dns_db_createiterator()
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
|
|
|
|||
|
|
@ -60,10 +60,6 @@ dns_ssutable_create(isc_mem_t *mctx, dns_ssutable_t **table);
|
|||
* Requires:
|
||||
*\li 'mctx' is a valid memory context
|
||||
*\li 'table' is not NULL, and '*table' is NULL
|
||||
*
|
||||
* Returns:
|
||||
*\li ISC_R_SUCCESS
|
||||
*\li ISC_R_NOMEMORY
|
||||
*/
|
||||
|
||||
void
|
||||
|
|
@ -131,10 +127,6 @@ dns_ssutable_addrule(dns_ssutable_t *table, bool grant,
|
|||
*\li 'name' is a valid absolute name
|
||||
*\li If 'ntypes' > 0, 'types' must not be NULL
|
||||
*\li 'debug' must not be NULL
|
||||
*
|
||||
* Returns:
|
||||
*\li ISC_R_SUCCESS
|
||||
*\li ISC_R_NOMEMORY
|
||||
*/
|
||||
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -37,20 +37,15 @@ struct dns_tkeyctx {
|
|||
char *gssapi_keytab;
|
||||
};
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_tkeyctx_create(isc_mem_t *mctx, dns_tkeyctx_t **tctxp);
|
||||
/*%<
|
||||
* Create an empty TKEY context.
|
||||
*
|
||||
* Requires:
|
||||
*\li 'mctx' is not NULL
|
||||
*\li 'tctx' is not NULL
|
||||
*\li '*tctx' is NULL
|
||||
*
|
||||
* Returns
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li return codes from dns_name_fromtext()
|
||||
*\li 'tctxp' is not NULL
|
||||
*\li '*tctxp' is NULL
|
||||
*/
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -158,7 +158,6 @@ dns_tsigkey_createfromkey(const dns_name_t *name, dst_algorithm_t algorithm,
|
|||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_EXISTS - a key with this name already exists
|
||||
*\li #ISC_R_NOTIMPLEMENTED - algorithm is not implemented
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*/
|
||||
|
||||
void
|
||||
|
|
@ -183,7 +182,6 @@ dns_tsig_sign(dns_message_t *msg);
|
|||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li #ISC_R_NOSPACE
|
||||
*\li #DNS_R_EXPECTEDTSIG
|
||||
* - this is a response & msg->querytsig is NULL
|
||||
|
|
@ -205,7 +203,6 @@ dns_tsig_verify(isc_buffer_t *source, dns_message_t *msg,
|
|||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li #DNS_R_EXPECTEDTSIG - A TSIG was expected but not seen
|
||||
*\li #DNS_R_UNEXPECTEDTSIG - A TSIG was seen but not expected
|
||||
*\li #DNS_R_TSIGERRORSET - the TSIG verified but ->error was set
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ struct dns_view {
|
|||
#endif /* __OpenBSD__ */
|
||||
#endif /* HAVE_LMDB */
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_view_create(isc_mem_t *mctx, isc_loopmgr_t *loopmgr,
|
||||
dns_dispatchmgr_t *dispmgr, dns_rdataclass_t rdclass,
|
||||
const char *name, dns_view_t **viewp);
|
||||
|
|
@ -280,13 +280,6 @@ dns_view_create(isc_mem_t *mctx, isc_loopmgr_t *loopmgr,
|
|||
*\li 'name' is a valid C string.
|
||||
*
|
||||
*\li viewp != NULL && *viewp == NULL
|
||||
*
|
||||
* Returns:
|
||||
*
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*
|
||||
*\li Other errors are possible.
|
||||
*/
|
||||
|
||||
void
|
||||
|
|
@ -869,7 +862,7 @@ dns_view_flushcache(dns_view_t *view, bool fixuponly);
|
|||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
* other returns are failures.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ dns_zone_setviewrevert(dns_zone_t *zone);
|
|||
*\li 'zone' to be a valid zone.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_zone_setorigin(dns_zone_t *zone, const dns_name_t *origin);
|
||||
/*%<
|
||||
* Sets the zones origin to 'origin'.
|
||||
|
|
@ -277,7 +277,6 @@ dns_zone_setorigin(dns_zone_t *zone, const dns_name_t *origin);
|
|||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*/
|
||||
|
||||
dns_name_t *
|
||||
|
|
@ -289,7 +288,7 @@ dns_zone_getorigin(dns_zone_t *zone);
|
|||
*\li 'zone' to be a valid zone.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_zone_setfile(dns_zone_t *zone, const char *file, dns_masterformat_t format,
|
||||
const dns_master_style_t *style);
|
||||
/*%<
|
||||
|
|
@ -303,10 +302,6 @@ dns_zone_setfile(dns_zone_t *zone, const char *file, dns_masterformat_t format,
|
|||
*
|
||||
* Require:
|
||||
*\li 'zone' to be a valid zone.
|
||||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li #ISC_R_SUCCESS
|
||||
*/
|
||||
|
||||
const char *
|
||||
|
|
@ -321,7 +316,7 @@ dns_zone_getfile(dns_zone_t *zone);
|
|||
*\li Pointer to null-terminated file name, or NULL.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_zone_setstream(dns_zone_t *zone, const FILE *stream,
|
||||
dns_masterformat_t format, const dns_master_style_t *style);
|
||||
/*%<
|
||||
|
|
@ -332,10 +327,6 @@ dns_zone_setstream(dns_zone_t *zone, const FILE *stream,
|
|||
*\li 'stream' to be a valid and open FILE *.
|
||||
*\li 'zone->masterfile' to be NULL, since we should load data either from
|
||||
* 'stream' or from a master file, but not both.
|
||||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li #ISC_R_SUCCESS
|
||||
*/
|
||||
|
||||
void
|
||||
|
|
@ -495,7 +486,6 @@ dns_zone_asyncload(dns_zone_t *zone, bool newonly, dns_zt_callback_t done,
|
|||
*\li #ISC_R_ALREADYRUNNING
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_FAILURE
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*/
|
||||
|
||||
bool
|
||||
|
|
@ -578,7 +568,7 @@ dns_zone_setdbtype(dns_zone_t *zone, unsigned int dbargc,
|
|||
*\li 'dbargv' to point to dbargc NULL-terminated strings
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_zone_getdbtype(dns_zone_t *zone, char ***argv, isc_mem_t *mctx);
|
||||
/*%<
|
||||
* Returns the current dbtype. isc_mem_free() should be used
|
||||
|
|
@ -588,10 +578,6 @@ dns_zone_getdbtype(dns_zone_t *zone, char ***argv, isc_mem_t *mctx);
|
|||
*\li 'zone' to be a valid zone.
|
||||
*\li 'argv' to be non NULL and *argv to be NULL.
|
||||
*\li 'mctx' to be valid.
|
||||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li #ISC_R_SUCCESS
|
||||
*/
|
||||
|
||||
void
|
||||
|
|
@ -681,11 +667,6 @@ dns_zone_setprimaries(dns_zone_t *zone, isc_sockaddr_t *addresses,
|
|||
*\li 'keynames' array of dns_name_t's for tsig keys or NULL.
|
||||
*
|
||||
*\li If 'addresses' is NULL then 'count' must be zero.
|
||||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li Any result dns_name_dup() can return, if keynames!=NULL
|
||||
*/
|
||||
|
||||
void
|
||||
|
|
@ -702,11 +683,6 @@ dns_zone_setparentals(dns_zone_t *zone, isc_sockaddr_t *addresses,
|
|||
*\li 'keynames' array of dns_name_t's for tsig keys or NULL.
|
||||
*
|
||||
*\li If 'addresses' is NULL then 'count' must be zero.
|
||||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li Any result dns_name_dup() can return, if keynames!=NULL
|
||||
*/
|
||||
|
||||
void
|
||||
|
|
@ -724,10 +700,6 @@ dns_zone_setalsonotify(dns_zone_t *zone, isc_sockaddr_t *addresses,
|
|||
*\li 'zone' to be a valid zone.
|
||||
*\li 'addresses' to be non-NULL if count != 0.
|
||||
*\li 'count' to be the number of notifiees.
|
||||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*/
|
||||
|
||||
void
|
||||
|
|
@ -1303,7 +1275,7 @@ dns_zone_getmaxxfrout(dns_zone_t *zone);
|
|||
*\li 'zone' to be valid initialised zone.
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_zone_setjournal(dns_zone_t *zone, const char *myjournal);
|
||||
/*%<
|
||||
* Sets the filename used for journaling updates / IXFR transfers.
|
||||
|
|
@ -1313,10 +1285,6 @@ dns_zone_setjournal(dns_zone_t *zone, const char *myjournal);
|
|||
*
|
||||
* Requires:
|
||||
*\li 'zone' to be a valid zone.
|
||||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*/
|
||||
|
||||
char *
|
||||
|
|
@ -1607,7 +1575,6 @@ dns_zone_forwardupdate(dns_zone_t *zone, dns_message_t *msg,
|
|||
*\li 'callback' to be non NULL.
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS if the message has been forwarded,
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li Others
|
||||
*/
|
||||
|
||||
|
|
@ -1643,7 +1610,7 @@ dns_zone_first(dns_zonemgr_t *zmgr, dns_zone_t **first);
|
|||
* (result ISC_R_NOMORE).
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_zone_setkeydirectory(dns_zone_t *zone, const char *directory);
|
||||
/*%<
|
||||
* Sets the name of the directory where private keys used for
|
||||
|
|
@ -1651,10 +1618,6 @@ dns_zone_setkeydirectory(dns_zone_t *zone, const char *directory);
|
|||
*
|
||||
* Require:
|
||||
*\li 'zone' to be a valid zone.
|
||||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li #ISC_R_SUCCESS
|
||||
*/
|
||||
|
||||
const char *
|
||||
|
|
|
|||
|
|
@ -229,7 +229,9 @@ dst_context_create(dst_key_t *key, isc_mem_t *mctx, isc_logcategory_t category,
|
|||
*
|
||||
* Returns:
|
||||
* \li ISC_R_SUCCESS
|
||||
* \li ISC_R_NOMEMORY
|
||||
* \li DST_R_UNSUPPORTEDALG
|
||||
* \li DST_R_NULLKEY
|
||||
* \li Other errors are possible.
|
||||
*
|
||||
* Ensures:
|
||||
* \li *dctxp will contain a usable context.
|
||||
|
|
@ -1053,7 +1055,6 @@ dst_key_dump(dst_key_t *key, isc_mem_t *mctx, char **buffer, int *length);
|
|||
*
|
||||
* Returns:
|
||||
* ISC_R_SUCCESS
|
||||
* ISC_R_NOMEMORY
|
||||
* ISC_R_NOTIMPLEMENTED
|
||||
* others.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -98,7 +98,6 @@ dns_ipkeylist_clear(isc_mem_t *mctx, dns_ipkeylist_t *ipkl) {
|
|||
isc_result_t
|
||||
dns_ipkeylist_copy(isc_mem_t *mctx, const dns_ipkeylist_t *src,
|
||||
dns_ipkeylist_t *dst) {
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
uint32_t i;
|
||||
|
||||
REQUIRE(dst != NULL);
|
||||
|
|
@ -109,10 +108,7 @@ dns_ipkeylist_copy(isc_mem_t *mctx, const dns_ipkeylist_t *src,
|
|||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
result = dns_ipkeylist_resize(mctx, dst, src->count);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
dns_ipkeylist_resize(mctx, dst, src->count);
|
||||
|
||||
memmove(dst->addrs, src->addrs, src->count * sizeof(isc_sockaddr_t));
|
||||
|
||||
|
|
@ -164,13 +160,13 @@ dns_ipkeylist_copy(isc_mem_t *mctx, const dns_ipkeylist_t *src,
|
|||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_ipkeylist_resize(isc_mem_t *mctx, dns_ipkeylist_t *ipkl, unsigned int n) {
|
||||
REQUIRE(ipkl != NULL);
|
||||
REQUIRE(n > ipkl->count);
|
||||
|
||||
if (n <= ipkl->allocated) {
|
||||
return ISC_R_SUCCESS;
|
||||
return;
|
||||
}
|
||||
|
||||
ipkl->addrs = isc_mem_creget(mctx, ipkl->addrs, ipkl->allocated, n,
|
||||
|
|
@ -185,5 +181,4 @@ dns_ipkeylist_resize(isc_mem_t *mctx, dns_ipkeylist_t *ipkl, unsigned int n) {
|
|||
sizeof(ipkl->labels[0]));
|
||||
|
||||
ipkl->allocated = n;
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1854,13 +1854,10 @@ read_one_rr(dns_journal_t *j);
|
|||
* previously allocated by isc_mem_get().
|
||||
*/
|
||||
|
||||
static isc_result_t
|
||||
static void
|
||||
size_buffer(isc_mem_t *mctx, isc_buffer_t *b, unsigned int size) {
|
||||
if (b->length < size) {
|
||||
void *mem = isc_mem_get(mctx, size);
|
||||
if (mem == NULL) {
|
||||
return ISC_R_NOMEMORY;
|
||||
}
|
||||
if (b->base != NULL) {
|
||||
isc_mem_put(mctx, b->base, b->length);
|
||||
}
|
||||
|
|
@ -1868,7 +1865,6 @@ size_buffer(isc_mem_t *mctx, isc_buffer_t *b, unsigned int size) {
|
|||
b->length = size;
|
||||
}
|
||||
isc_buffer_clear(b);
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -2033,7 +2029,7 @@ read_one_rr(dns_journal_t *j) {
|
|||
FAIL(ISC_R_UNEXPECTED);
|
||||
}
|
||||
|
||||
CHECK(size_buffer(j->mctx, &j->it.source, rrhdr.size));
|
||||
size_buffer(j->mctx, &j->it.source, rrhdr.size);
|
||||
CHECK(journal_read(j, j->it.source.base, rrhdr.size));
|
||||
isc_buffer_add(&j->it.source, rrhdr.size);
|
||||
|
||||
|
|
@ -2043,7 +2039,7 @@ read_one_rr(dns_journal_t *j) {
|
|||
* no compression in present, the output of dns_*_fromwire()
|
||||
* is no larger than the input.
|
||||
*/
|
||||
CHECK(size_buffer(j->mctx, &j->it.target, rrhdr.size));
|
||||
size_buffer(j->mctx, &j->it.target, rrhdr.size);
|
||||
|
||||
/*
|
||||
* Parse the owner name. We don't know where it
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
/* Default TTLsig (maximum zone ttl) */
|
||||
#define DEFAULT_TTLSIG 604800 /* one week */
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_kasp_create(isc_mem_t *mctx, const char *name, dns_kasp_t **kaspp) {
|
||||
dns_kasp_t *kasp;
|
||||
dns_kasp_t k = {
|
||||
|
|
@ -54,7 +54,6 @@ dns_kasp_create(isc_mem_t *mctx, const char *name, dns_kasp_t **kaspp) {
|
|||
isc_refcount_init(&kasp->references, 1);
|
||||
|
||||
*kaspp = kasp;
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -398,7 +397,7 @@ dns_kasp_addkey(dns_kasp_t *kasp, dns_kasp_key_t *key) {
|
|||
ISC_LIST_APPEND(kasp->keys, key, link);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_kasp_key_create(dns_kasp_t *kasp, dns_kasp_key_t **keyp) {
|
||||
dns_kasp_key_t *key = NULL;
|
||||
dns_kasp_key_t k = { .tag_max = 0xffff, .length = -1 };
|
||||
|
|
@ -415,7 +414,6 @@ dns_kasp_key_create(dns_kasp_t *kasp, dns_kasp_key_t **keyp) {
|
|||
ISC_LINK_INIT(key, link);
|
||||
|
||||
*keyp = key;
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#include <dns/keystore.h>
|
||||
#include <dns/keyvalues.h>
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_keystore_create(isc_mem_t *mctx, const char *name, dns_keystore_t **kspp) {
|
||||
dns_keystore_t *keystore;
|
||||
|
||||
|
|
@ -48,8 +48,6 @@ dns_keystore_create(isc_mem_t *mctx, const char *name, dns_keystore_t **kspp) {
|
|||
|
||||
keystore->magic = DNS_KEYSTORE_MAGIC;
|
||||
*kspp = keystore;
|
||||
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
|
|||
|
|
@ -319,14 +319,9 @@ loadctx_destroy(dns_loadctx_t *lctx);
|
|||
else \
|
||||
LOGIT(result)
|
||||
|
||||
#define LOGIT(result) \
|
||||
if (result == ISC_R_NOMEMORY) \
|
||||
(*callbacks->error)(callbacks, "dns_master_load: %s", \
|
||||
isc_result_totext(result)); \
|
||||
else \
|
||||
(*callbacks->error)(callbacks, "%s: %s:%lu: %s", \
|
||||
"dns_master_load", source, line, \
|
||||
isc_result_totext(result))
|
||||
#define LOGIT(result) \
|
||||
(*callbacks->error)(callbacks, "%s: %s:%lu: %s", "dns_master_load", \
|
||||
source, line, isc_result_totext(result))
|
||||
|
||||
static unsigned char in_addr_arpa_data[] = "\007IN-ADDR\004ARPA";
|
||||
static unsigned char in_addr_arpa_offsets[] = { 0, 8, 13 };
|
||||
|
|
@ -360,8 +355,6 @@ gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *token, bool eol,
|
|||
result = isc_lex_gettoken(lex, options, token);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
switch (result) {
|
||||
case ISC_R_NOMEMORY:
|
||||
return ISC_R_NOMEMORY;
|
||||
default:
|
||||
(*callbacks->error)(callbacks,
|
||||
"dns_master_load: %s:%lu:"
|
||||
|
|
@ -796,10 +789,6 @@ generate(dns_loadctx_t *lctx, char *range, char *lhs, char *gtype, char *rhs,
|
|||
target_mem = isc_mem_get(lctx->mctx, target_size);
|
||||
rhsbuf = isc_mem_get(lctx->mctx, DNS_MASTER_RHS);
|
||||
lhsbuf = isc_mem_get(lctx->mctx, DNS_MASTER_LHS);
|
||||
if (target_mem == NULL || rhsbuf == NULL || lhsbuf == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto error_cleanup;
|
||||
}
|
||||
isc_buffer_init(&target, target_mem, target_size);
|
||||
|
||||
n = sscanf(range, "%d-%d%1[/]%d", &start, &stop, dummy, &step);
|
||||
|
|
@ -908,13 +897,8 @@ generate(dns_loadctx_t *lctx, char *range, char *lhs, char *gtype, char *rhs,
|
|||
goto cleanup;
|
||||
|
||||
error_cleanup:
|
||||
if (result == ISC_R_NOMEMORY) {
|
||||
(*callbacks->error)(callbacks, "$GENERATE: %s",
|
||||
isc_result_totext(result));
|
||||
} else {
|
||||
(*callbacks->error)(callbacks, "$GENERATE: %s:%lu: %s", source,
|
||||
line, isc_result_totext(result));
|
||||
}
|
||||
(*callbacks->error)(callbacks, "$GENERATE: %s:%lu: %s", source, line,
|
||||
isc_result_totext(result));
|
||||
|
||||
insist_cleanup:
|
||||
INSIST(result != ISC_R_SUCCESS);
|
||||
|
|
@ -1781,10 +1765,6 @@ load_text(dns_loadctx_t *lctx) {
|
|||
new_rdata = grow_rdata(rdata_size + RDSZ, rdata,
|
||||
rdata_size, ¤t_list,
|
||||
&glue_list, mctx);
|
||||
if (new_rdata == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto log_and_cleanup;
|
||||
}
|
||||
rdata_size += RDSZ;
|
||||
rdata = new_rdata;
|
||||
}
|
||||
|
|
@ -2052,10 +2032,6 @@ load_text(dns_loadctx_t *lctx) {
|
|||
rdatalist_size + RDLSZ, rdatalist,
|
||||
rdatalist_size, ¤t_list,
|
||||
&glue_list, mctx);
|
||||
if (new_rdatalist == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto log_and_cleanup;
|
||||
}
|
||||
rdatalist = new_rdatalist;
|
||||
rdatalist_size += RDLSZ;
|
||||
}
|
||||
|
|
@ -2524,10 +2500,6 @@ load_raw(dns_loadctx_t *lctx) {
|
|||
|
||||
new_rdata = grow_rdata(rdcount + RDSZ, rdata,
|
||||
rdata_size, &head, &dummy, mctx);
|
||||
if (new_rdata == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
rdata_size = rdcount + RDSZ;
|
||||
rdata = new_rdata;
|
||||
}
|
||||
|
|
@ -2742,15 +2714,11 @@ dns_master_loadstream(FILE *stream, dns_name_t *top, dns_name_t *origin,
|
|||
loadctx_create(dns_masterformat_text, mctx, options, 0, top, zclass,
|
||||
origin, callbacks, NULL, NULL, NULL, NULL, NULL, &lctx);
|
||||
|
||||
result = isc_lex_openstream(lctx->lex, stream);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
isc_lex_openstream(lctx->lex, stream);
|
||||
|
||||
result = (lctx->load)(lctx);
|
||||
INSIST(result != DNS_R_CONTINUE);
|
||||
|
||||
cleanup:
|
||||
dns_loadctx_detach(&lctx);
|
||||
return result;
|
||||
}
|
||||
|
|
@ -2950,10 +2918,7 @@ commit(dns_rdatacallbacks_t *callbacks, dns_loadctx_t *lctx,
|
|||
}
|
||||
result = callbacks->add(callbacks->add_private, owner,
|
||||
&dataset DNS__DB_FILELINE);
|
||||
if (result == ISC_R_NOMEMORY) {
|
||||
(*error)(callbacks, "dns_master_load: %s",
|
||||
isc_result_totext(result));
|
||||
} else if (result != ISC_R_SUCCESS) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
dns_name_format(owner, namebuf, sizeof(namebuf));
|
||||
if (source != NULL) {
|
||||
(*error)(callbacks, "%s: %s:%lu: %s: %s",
|
||||
|
|
|
|||
|
|
@ -46,31 +46,28 @@ struct dns_order {
|
|||
#define DNS_ORDER_MAGIC ISC_MAGIC('O', 'r', 'd', 'r')
|
||||
#define DNS_ORDER_VALID(order) ISC_MAGIC_VALID(order, DNS_ORDER_MAGIC)
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_order_create(isc_mem_t *mctx, dns_order_t **orderp) {
|
||||
dns_order_t *order;
|
||||
dns_order_t *order = NULL;
|
||||
|
||||
REQUIRE(orderp != NULL && *orderp == NULL);
|
||||
|
||||
order = isc_mem_get(mctx, sizeof(*order));
|
||||
*order = (dns_order_t){
|
||||
.ents = ISC_LIST_INITIALIZER,
|
||||
.references = ISC_REFCOUNT_INITIALIZER(1),
|
||||
.magic = DNS_ORDER_MAGIC,
|
||||
};
|
||||
|
||||
ISC_LIST_INIT(order->ents);
|
||||
|
||||
/* Implicit attach. */
|
||||
isc_refcount_init(&order->references, 1);
|
||||
|
||||
order->mctx = NULL;
|
||||
isc_mem_attach(mctx, &order->mctx);
|
||||
order->magic = DNS_ORDER_MAGIC;
|
||||
*orderp = order;
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_order_add(dns_order_t *order, const dns_name_t *name,
|
||||
dns_rdatatype_t rdtype, dns_rdataclass_t rdclass,
|
||||
unsigned int mode) {
|
||||
dns_order_ent_t *ent;
|
||||
dns_order_ent_t *ent = NULL;
|
||||
|
||||
REQUIRE(DNS_ORDER_VALID(order));
|
||||
REQUIRE(mode == DNS_RDATASETATTR_RANDOMIZE ||
|
||||
|
|
@ -79,15 +76,17 @@ dns_order_add(dns_order_t *order, const dns_name_t *name,
|
|||
mode == DNS_RDATASETATTR_NONE);
|
||||
|
||||
ent = isc_mem_get(order->mctx, sizeof(*ent));
|
||||
*ent = (dns_order_ent_t){
|
||||
.rdtype = rdtype,
|
||||
.rdclass = rdclass,
|
||||
.mode = mode,
|
||||
.link = ISC_LINK_INITIALIZER,
|
||||
};
|
||||
|
||||
dns_fixedname_init(&ent->name);
|
||||
dns_name_copy(name, dns_fixedname_name(&ent->name));
|
||||
ent->rdtype = rdtype;
|
||||
ent->rdclass = rdclass;
|
||||
ent->mode = mode;
|
||||
ISC_LINK_INIT(ent, link);
|
||||
|
||||
ISC_LIST_INITANDAPPEND(order->ents, ent, link);
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ peerlist_delete(dns_peerlist_t **list);
|
|||
static void
|
||||
peer_delete(dns_peer_t **peer);
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_peerlist_new(isc_mem_t *mem, dns_peerlist_t **list) {
|
||||
dns_peerlist_t *l;
|
||||
|
||||
|
|
@ -124,8 +124,6 @@ dns_peerlist_new(isc_mem_t *mem, dns_peerlist_t **list) {
|
|||
l->magic = DNS_PEERLIST_MAGIC;
|
||||
|
||||
*list = l;
|
||||
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ dns_result_torcode(isc_result_t result) {
|
|||
case ISC_R_RANGE:
|
||||
case ISC_R_UNEXPECTEDEND:
|
||||
case DNS_R_BADAAAA:
|
||||
case DNS_R_BADCKSUM:
|
||||
case DNS_R_BADCLASS:
|
||||
case DNS_R_BADLABELTYPE:
|
||||
case DNS_R_BADPOINTER:
|
||||
|
|
@ -39,10 +38,8 @@ dns_result_torcode(isc_result_t result) {
|
|||
case DNS_R_BADZONE:
|
||||
case DNS_R_EXTRADATA:
|
||||
case DNS_R_LABELTOOLONG:
|
||||
case DNS_R_NOREDATA:
|
||||
case DNS_R_SYNTAX:
|
||||
case DNS_R_TEXTTOOLONG:
|
||||
case DNS_R_TOOMANYHOPS:
|
||||
case DNS_R_TSIGERRORSET:
|
||||
case DNS_R_UNKNOWN:
|
||||
case DNS_R_NAMETOOLONG:
|
||||
|
|
|
|||
|
|
@ -1024,10 +1024,6 @@ modrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
|||
}
|
||||
|
||||
rdatastr = isc_buffer_base(buffer);
|
||||
if (rdatastr == NULL) {
|
||||
result = ISC_R_NOMEMORY;
|
||||
goto cleanup;
|
||||
}
|
||||
rdatastr[isc_buffer_usedlength(buffer) - 1] = 0;
|
||||
|
||||
MAYBE_LOCK(sdlz->dlzimp);
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ tkey_log(const char *fmt, ...) {
|
|||
va_end(ap);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_tkeyctx_create(isc_mem_t *mctx, dns_tkeyctx_t **tctxp) {
|
||||
REQUIRE(mctx != NULL);
|
||||
REQUIRE(tctxp != NULL && *tctxp == NULL);
|
||||
|
|
@ -87,7 +87,6 @@ dns_tkeyctx_create(isc_mem_t *mctx, dns_tkeyctx_t **tctxp) {
|
|||
isc_mem_attach(mctx, &tctx->mctx);
|
||||
|
||||
*tctxp = tctx;
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@
|
|||
*/
|
||||
#define DEFAULT_EDNS_BUFSIZE 1232
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_view_create(isc_mem_t *mctx, isc_loopmgr_t *loopmgr,
|
||||
dns_dispatchmgr_t *dispatchmgr, dns_rdataclass_t rdclass,
|
||||
const char *name, dns_view_t **viewp) {
|
||||
|
|
@ -96,9 +96,7 @@ dns_view_create(isc_mem_t *mctx, isc_loopmgr_t *loopmgr,
|
|||
REQUIRE(viewp != NULL && *viewp == NULL);
|
||||
|
||||
result = isc_file_sanitize(NULL, name, "nta", buffer, sizeof(buffer));
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||
|
||||
view = isc_mem_get(mctx, sizeof(*view));
|
||||
*view = (dns_view_t){
|
||||
|
|
@ -153,15 +151,9 @@ dns_view_create(isc_mem_t *mctx, isc_loopmgr_t *loopmgr,
|
|||
|
||||
isc_mutex_init(&view->new_zone_lock);
|
||||
|
||||
result = dns_order_create(view->mctx, &view->order);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup_new_zone_lock;
|
||||
}
|
||||
dns_order_create(view->mctx, &view->order);
|
||||
|
||||
result = dns_peerlist_new(view->mctx, &view->peers);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup_order;
|
||||
}
|
||||
dns_peerlist_new(view->mctx, &view->peers);
|
||||
|
||||
dns_aclenv_create(view->mctx, &view->aclenv);
|
||||
|
||||
|
|
@ -169,41 +161,6 @@ dns_view_create(isc_mem_t *mctx, isc_loopmgr_t *loopmgr,
|
|||
|
||||
view->magic = DNS_VIEW_MAGIC;
|
||||
*viewp = view;
|
||||
|
||||
return ISC_R_SUCCESS;
|
||||
|
||||
cleanup_order:
|
||||
if (view->order != NULL) {
|
||||
dns_order_detach(&view->order);
|
||||
}
|
||||
|
||||
cleanup_new_zone_lock:
|
||||
isc_mutex_destroy(&view->new_zone_lock);
|
||||
dns_badcache_destroy(&view->failcache);
|
||||
|
||||
if (view->dynamickeys != NULL) {
|
||||
dns_tsigkeyring_detach(&view->dynamickeys);
|
||||
}
|
||||
|
||||
isc_refcount_decrementz(&view->weakrefs);
|
||||
isc_refcount_destroy(&view->weakrefs);
|
||||
|
||||
isc_refcount_decrementz(&view->references);
|
||||
isc_refcount_destroy(&view->references);
|
||||
|
||||
dns_fwdtable_destroy(&view->fwdtable);
|
||||
dns_zt_detach(&view->zonetable);
|
||||
|
||||
isc_mutex_destroy(&view->lock);
|
||||
|
||||
if (view->nta_file != NULL) {
|
||||
isc_mem_free(mctx, view->nta_file);
|
||||
}
|
||||
|
||||
isc_mem_free(mctx, view->name);
|
||||
isc_mem_putanddetach(&view->mctx, view, sizeof(*view));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -885,7 +885,7 @@ static void
|
|||
zone_catz_enable(dns_zone_t *zone, dns_catz_zones_t *catzs);
|
||||
static void
|
||||
zone_catz_disable(dns_zone_t *zone);
|
||||
static isc_result_t
|
||||
static void
|
||||
default_journal(dns_zone_t *zone);
|
||||
static void
|
||||
zone_xfrdone(dns_zone_t *zone, uint32_t *expireopt, isc_result_t result);
|
||||
|
|
@ -1537,11 +1537,10 @@ zone_freedbargs(dns_zone_t *zone) {
|
|||
zone->db_argv = NULL;
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_zone_getdbtype(dns_zone_t *zone, char ***argv, isc_mem_t *mctx) {
|
||||
size_t size = 0;
|
||||
unsigned int i;
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
void *mem;
|
||||
char **tmp, *tmp2, *base;
|
||||
|
||||
|
|
@ -1568,7 +1567,6 @@ dns_zone_getdbtype(dns_zone_t *zone, char ***argv, isc_mem_t *mctx) {
|
|||
}
|
||||
UNLOCK_ZONE(zone);
|
||||
*argv = mem;
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1682,9 +1680,8 @@ dns_zone_setviewrevert(dns_zone_t *zone) {
|
|||
UNLOCK_ZONE(zone);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_zone_setorigin(dns_zone_t *zone, const dns_name_t *origin) {
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
char namebuf[1024];
|
||||
|
||||
REQUIRE(DNS_ZONE_VALID(zone));
|
||||
|
|
@ -1711,14 +1708,13 @@ dns_zone_setorigin(dns_zone_t *zone, const dns_name_t *origin) {
|
|||
zone->strname = isc_mem_strdup(zone->mctx, namebuf);
|
||||
|
||||
if (inline_secure(zone)) {
|
||||
result = dns_zone_setorigin(zone->raw, origin);
|
||||
dns_zone_setorigin(zone->raw, origin);
|
||||
}
|
||||
UNLOCK_ZONE(zone);
|
||||
return result;
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
dns_zone_setstring(dns_zone_t *zone, char **field, const char *value) {
|
||||
static void
|
||||
setstring(dns_zone_t *zone, char **field, const char *value) {
|
||||
char *copy;
|
||||
|
||||
if (value != NULL) {
|
||||
|
|
@ -1732,29 +1728,22 @@ dns_zone_setstring(dns_zone_t *zone, char **field, const char *value) {
|
|||
}
|
||||
|
||||
*field = copy;
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_zone_setfile(dns_zone_t *zone, const char *file, dns_masterformat_t format,
|
||||
const dns_master_style_t *style) {
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
|
||||
REQUIRE(DNS_ZONE_VALID(zone));
|
||||
REQUIRE(zone->stream == NULL);
|
||||
|
||||
LOCK_ZONE(zone);
|
||||
result = dns_zone_setstring(zone, &zone->masterfile, file);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
zone->masterformat = format;
|
||||
if (format == dns_masterformat_text) {
|
||||
zone->masterstyle = style;
|
||||
}
|
||||
result = default_journal(zone);
|
||||
setstring(zone, &zone->masterfile, file);
|
||||
zone->masterformat = format;
|
||||
if (format == dns_masterformat_text) {
|
||||
zone->masterstyle = style;
|
||||
}
|
||||
default_journal(zone);
|
||||
UNLOCK_ZONE(zone);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
const char *
|
||||
|
|
@ -1764,11 +1753,9 @@ dns_zone_getfile(dns_zone_t *zone) {
|
|||
return zone->masterfile;
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_zone_setstream(dns_zone_t *zone, const FILE *stream,
|
||||
dns_masterformat_t format, const dns_master_style_t *style) {
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
|
||||
REQUIRE(DNS_ZONE_VALID(zone));
|
||||
REQUIRE(stream != NULL);
|
||||
REQUIRE(zone->masterfile == NULL);
|
||||
|
|
@ -1779,10 +1766,8 @@ dns_zone_setstream(dns_zone_t *zone, const FILE *stream,
|
|||
if (format == dns_masterformat_text) {
|
||||
zone->masterstyle = style;
|
||||
}
|
||||
result = default_journal(zone);
|
||||
default_journal(zone);
|
||||
UNLOCK_ZONE(zone);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
dns_ttl_t
|
||||
|
|
@ -1808,9 +1793,8 @@ dns_zone_setmaxttl(dns_zone_t *zone, dns_ttl_t maxttl) {
|
|||
return;
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
static void
|
||||
default_journal(dns_zone_t *zone) {
|
||||
isc_result_t result;
|
||||
char *journal;
|
||||
|
||||
REQUIRE(DNS_ZONE_VALID(zone));
|
||||
|
|
@ -1825,24 +1809,19 @@ default_journal(dns_zone_t *zone) {
|
|||
} else {
|
||||
journal = NULL;
|
||||
}
|
||||
result = dns_zone_setstring(zone, &zone->journal, journal);
|
||||
setstring(zone, &zone->journal, journal);
|
||||
if (journal != NULL) {
|
||||
isc_mem_free(zone->mctx, journal);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_zone_setjournal(dns_zone_t *zone, const char *myjournal) {
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
|
||||
REQUIRE(DNS_ZONE_VALID(zone));
|
||||
|
||||
LOCK_ZONE(zone);
|
||||
result = dns_zone_setstring(zone, &zone->journal, myjournal);
|
||||
setstring(zone, &zone->journal, myjournal);
|
||||
UNLOCK_ZONE(zone);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
char *
|
||||
|
|
@ -5474,15 +5453,11 @@ cleanup:
|
|||
{
|
||||
DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_FIRSTREFRESH);
|
||||
|
||||
if (result != ISC_R_NOMEMORY) {
|
||||
if (zone->journal != NULL) {
|
||||
zone_saveunique(zone, zone->journal,
|
||||
"jn-XXXXXXXX");
|
||||
}
|
||||
if (zone->masterfile != NULL) {
|
||||
zone_saveunique(zone, zone->masterfile,
|
||||
"db-XXXXXXXX");
|
||||
}
|
||||
if (zone->journal != NULL) {
|
||||
zone_saveunique(zone, zone->journal, "jn-XXXXXXXX");
|
||||
}
|
||||
if (zone->masterfile != NULL) {
|
||||
zone_saveunique(zone, zone->masterfile, "db-XXXXXXXX");
|
||||
}
|
||||
|
||||
/* Mark the zone for immediate refresh. */
|
||||
|
|
@ -19962,17 +19937,13 @@ dns_zone_getrcvquerystats(dns_zone_t *zone) {
|
|||
}
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
dns_zone_setkeydirectory(dns_zone_t *zone, const char *directory) {
|
||||
isc_result_t result = ISC_R_SUCCESS;
|
||||
|
||||
REQUIRE(DNS_ZONE_VALID(zone));
|
||||
|
||||
LOCK_ZONE(zone);
|
||||
result = dns_zone_setstring(zone, &zone->keydirectory, directory);
|
||||
setstring(zone, &zone->keydirectory, directory);
|
||||
UNLOCK_ZONE(zone);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
const char *
|
||||
|
|
|
|||
|
|
@ -634,8 +634,8 @@ isc_file_safecreate(const char *filename, FILE **fp) {
|
|||
isc_result_t
|
||||
isc_file_splitpath(isc_mem_t *mctx, const char *path, char **dirname,
|
||||
char const **bname) {
|
||||
char *dir;
|
||||
const char *file, *slash;
|
||||
char *dir = NULL;
|
||||
const char *file = NULL, *slash = NULL;
|
||||
|
||||
if (path == NULL) {
|
||||
return ISC_R_INVALIDFILE;
|
||||
|
|
@ -655,10 +655,6 @@ isc_file_splitpath(isc_mem_t *mctx, const char *path, char **dirname,
|
|||
dir = isc_mem_strdup(mctx, ".");
|
||||
}
|
||||
|
||||
if (dir == NULL) {
|
||||
return ISC_R_NOMEMORY;
|
||||
}
|
||||
|
||||
if (*file == '\0') {
|
||||
isc_mem_free(mctx, dir);
|
||||
return ISC_R_INVALIDFILE;
|
||||
|
|
|
|||
|
|
@ -713,7 +713,6 @@ render_500(const isc_httpd_t *httpd, const isc_httpdurl_t *urlinfo, void *arg,
|
|||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS -- all is well.
|
||||
*\li #ISC_R_NOMEMORY -- not enough memory to compress data
|
||||
*\li #ISC_R_FAILURE -- error during compression or compressed
|
||||
* data would be larger than input data
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -485,7 +485,6 @@ isc_buffer_printf(isc_buffer_t *restrict b, const char *restrict format, ...)
|
|||
*\li #ISC_R_SUCCESS Operation succeeded.
|
||||
*\li #ISC_R_NOSPACE 'b' does not allow reallocation and appending the
|
||||
* formatted string to it would cause it to overflow.
|
||||
*\li #ISC_R_NOMEMORY Reallocation failed.
|
||||
*\li #ISC_R_FAILURE Other error occurred.
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -309,7 +309,6 @@ isc_file_splitpath(isc_mem_t *mctx, const char *path, char **dirname,
|
|||
* Returns:
|
||||
* - ISC_R_SUCCESS on success
|
||||
* - ISC_R_INVALIDFILE if 'path' is empty or ends with '/'
|
||||
* - ISC_R_NOMEMORY if unable to allocate memory
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ isc_ht_destroy(isc_ht_t **htp);
|
|||
*\li write-lock
|
||||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_NOMEMORY -- not enough memory to create pool
|
||||
*\li #ISC_R_EXISTS -- node of the same key already exists
|
||||
*\li #ISC_R_SUCCESS -- all is well.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -73,7 +73,6 @@ isc_interfaceiter_create(isc_mem_t *mctx, isc_interfaceiter_t **iterp);
|
|||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
* \li #ISC_R_NOMEMORY
|
||||
*\li Various network-related errors
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -151,10 +151,6 @@ isc_lex_create(isc_mem_t *mctx, size_t max_token, isc_lex_t **lexp);
|
|||
*
|
||||
* Ensures:
|
||||
*\li On success, *lexp is attached to the newly created lexer.
|
||||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*/
|
||||
|
||||
void
|
||||
|
|
@ -227,14 +223,13 @@ isc_lex_openfile(isc_lex_t *lex, const char *filename);
|
|||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY Out of memory
|
||||
*\li #ISC_R_NOTFOUND File not found
|
||||
*\li #ISC_R_NOPERM No permission to open file
|
||||
*\li #ISC_R_FAILURE Couldn't open file, not sure why
|
||||
*\li #ISC_R_UNEXPECTED
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
isc_lex_openstream(isc_lex_t *lex, FILE *stream);
|
||||
/*%<
|
||||
* Make 'stream' the current input source for 'lex'.
|
||||
|
|
@ -243,10 +238,6 @@ isc_lex_openstream(isc_lex_t *lex, FILE *stream);
|
|||
*\li 'lex' is a valid lexer.
|
||||
*
|
||||
*\li 'stream' is a valid C stream.
|
||||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY Out of memory
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -261,7 +252,6 @@ isc_lex_openbuffer(isc_lex_t *lex, isc_buffer_t *buffer);
|
|||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY Out of memory
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -291,7 +281,6 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp);
|
|||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_UNEXPECTEDEND
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*
|
||||
* These two results are returned only if their corresponding lexer
|
||||
* options are not set.
|
||||
|
|
@ -404,7 +393,6 @@ isc_lex_setsourcename(isc_lex_t *lex, const char *name);
|
|||
*
|
||||
* Returns:
|
||||
* \li #ISC_R_SUCCESS
|
||||
* \li #ISC_R_NOMEMORY
|
||||
* \li #ISC_R_NOTFOUND - there are no sources.
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -428,14 +428,7 @@ isc_log_createchannel(isc_logconfig_t *lcfg, const char *name,
|
|||
* #ISC_LOG_DEBUGONLY or #ISC_LOG_BUFFERED.
|
||||
*
|
||||
* Ensures:
|
||||
*\li #ISC_R_SUCCESS
|
||||
* A channel with the given name is usable with
|
||||
* isc_log_usechannel().
|
||||
*
|
||||
*\li #ISC_R_NOMEMORY or #ISC_R_UNEXPECTED
|
||||
* No additional memory is being used by the logging context.
|
||||
* Any channel that previously existed with the given name
|
||||
* is not redefined.
|
||||
* A channel with the given name is usable with isc_log_usechannel().
|
||||
*/
|
||||
|
||||
isc_result_t
|
||||
|
|
|
|||
|
|
@ -405,10 +405,6 @@ isc__mempool_create(isc_mem_t *restrict mctx, const size_t element_size,
|
|||
* Defaults:
|
||||
*\li freemax = 1
|
||||
*\li fillcount = 1
|
||||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_NOMEMORY -- not enough memory to create pool
|
||||
*\li #ISC_R_SUCCESS -- all is well.
|
||||
*/
|
||||
|
||||
#define isc_mempool_destroy(mp) isc__mempool_destroy((mp)_ISC_MEM_FILELINE)
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
*** Functions
|
||||
***/
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
isc_portset_create(isc_mem_t *mctx, isc_portset_t **portsetp);
|
||||
/*%<
|
||||
* Create a port set and initialize it as an empty set.
|
||||
|
|
@ -45,10 +45,6 @@ isc_portset_create(isc_mem_t *mctx, isc_portset_t **portsetp);
|
|||
* Requires:
|
||||
*\li 'mctx' to be valid.
|
||||
*\li 'portsetp' to be non NULL and '*portsetp' to be NULL;
|
||||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*/
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -143,7 +143,6 @@ isc_radix_insert(isc_radix_tree_t *radix, isc_radix_node_t **target,
|
|||
* a valid prefix.
|
||||
*
|
||||
* Returns:
|
||||
* \li ISC_R_NOMEMORY
|
||||
* \li ISC_R_SUCCESS
|
||||
*/
|
||||
|
||||
|
|
@ -166,10 +165,6 @@ isc_radix_create(isc_mem_t *mctx, isc_radix_tree_t **target, int maxbits);
|
|||
* \li 'mctx' to be valid.
|
||||
* \li 'target' to be non NULL and '*target' to be NULL.
|
||||
* \li 'maxbits' to be less than or equal to RADIX_MAXBITS.
|
||||
*
|
||||
* Returns:
|
||||
* \li ISC_R_NOMEMORY
|
||||
* \li ISC_R_SUCCESS
|
||||
*/
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ typedef enum isc_result {
|
|||
ISC_R_SUCCESS, /*%< success */
|
||||
ISC_R_NOMEMORY, /*%< out of memory */
|
||||
ISC_R_TIMEDOUT, /*%< timed out */
|
||||
ISC_R_NOTHREADS, /*%< no available threads */
|
||||
ISC_R_ADDRNOTAVAIL, /*%< address not available */
|
||||
ISC_R_ADDRINUSE, /*%< address in use */
|
||||
ISC_R_NOPERM, /*%< permission denied */
|
||||
|
|
@ -33,14 +32,12 @@ typedef enum isc_result {
|
|||
ISC_R_CONNREFUSED, /*%< connection refused */
|
||||
ISC_R_NORESOURCES, /*%< not enough free resources */
|
||||
ISC_R_EOF, /*%< end of file */
|
||||
ISC_R_BOUND, /*%< socket already bound */
|
||||
ISC_R_RELOAD, /*%< reload */
|
||||
ISC_R_SUSPEND = ISC_R_RELOAD, /*%< alias of 'reload' */
|
||||
ISC_R_LOCKBUSY, /*%< lock busy */
|
||||
ISC_R_EXISTS, /*%< already exists */
|
||||
ISC_R_NOSPACE, /*%< ran out of space */
|
||||
ISC_R_CANCELED, /*%< operation canceled */
|
||||
ISC_R_NOTBOUND, /*%< socket is not bound */
|
||||
ISC_R_SHUTTINGDOWN, /*%< shutting down */
|
||||
ISC_R_NOTFOUND, /*%< not found */
|
||||
ISC_R_UNEXPECTEDEND, /*%< unexpected end of input */
|
||||
|
|
@ -64,15 +61,11 @@ typedef enum isc_result {
|
|||
ISC_R_NOENTROPY, /*%< out of entropy */
|
||||
ISC_R_MULTICAST, /*%< invalid use of multicast */
|
||||
ISC_R_NOTFILE, /*%< not a file */
|
||||
ISC_R_NOTDIRECTORY, /*%< not a directory */
|
||||
ISC_R_EMPTY, /*%< queue is empty */
|
||||
ISC_R_FAMILYMISMATCH, /*%< address family mismatch */
|
||||
ISC_R_FAMILYNOSUPPORT, /*%< AF not supported */
|
||||
ISC_R_BADHEX, /*%< bad hex encoding */
|
||||
ISC_R_TOOMANYOPENFILES, /*%< too many open files */
|
||||
ISC_R_NOTBLOCKING, /*%< not blocking */
|
||||
ISC_R_UNBALANCEDQUOTES, /*%< unbalanced quotes */
|
||||
ISC_R_INPROGRESS, /*%< operation in progress */
|
||||
ISC_R_CONNECTIONRESET, /*%< connection reset */
|
||||
ISC_R_SOFTQUOTA, /*%< soft quota reached */
|
||||
ISC_R_BADNUMBER, /*%< not a valid number */
|
||||
|
|
@ -82,7 +75,6 @@ typedef enum isc_result {
|
|||
ISC_R_BADBASE32, /*%< bad base32 encoding */
|
||||
ISC_R_UNSET, /*%< unset */
|
||||
ISC_R_MULTIPLE, /*%< multiple */
|
||||
ISC_R_WOULDBLOCK, /*%< would block */
|
||||
ISC_R_COMPLETE, /*%< complete */
|
||||
ISC_R_CRYPTOFAILURE, /*%< cryptography library failure */
|
||||
ISC_R_DISCQUOTA, /*%< disc quota */
|
||||
|
|
@ -103,14 +95,12 @@ typedef enum isc_result {
|
|||
DNS_R_UNKNOWN,
|
||||
DNS_R_BADLABELTYPE,
|
||||
DNS_R_BADPOINTER,
|
||||
DNS_R_TOOMANYHOPS,
|
||||
DNS_R_DISALLOWED,
|
||||
DNS_R_EXTRATOKEN,
|
||||
DNS_R_EXTRADATA,
|
||||
DNS_R_TEXTTOOLONG,
|
||||
DNS_R_NOTZONETOP,
|
||||
DNS_R_SYNTAX,
|
||||
DNS_R_BADCKSUM,
|
||||
DNS_R_BADAAAA,
|
||||
DNS_R_NOOWNER,
|
||||
DNS_R_NOTTL,
|
||||
|
|
@ -120,7 +110,6 @@ typedef enum isc_result {
|
|||
DNS_R_NEWORIGIN,
|
||||
DNS_R_UNCHANGED,
|
||||
DNS_R_BADTTL,
|
||||
DNS_R_NOREDATA,
|
||||
DNS_R_CONTINUE,
|
||||
DNS_R_DELEGATION,
|
||||
DNS_R_GLUE,
|
||||
|
|
@ -129,7 +118,6 @@ typedef enum isc_result {
|
|||
DNS_R_BADDB,
|
||||
DNS_R_ZONECUT,
|
||||
DNS_R_BADZONE,
|
||||
DNS_R_MOREDATA,
|
||||
DNS_R_UPTODATE,
|
||||
DNS_R_TSIGVERIFYFAILURE,
|
||||
DNS_R_TSIGERRORSET,
|
||||
|
|
@ -157,7 +145,6 @@ typedef enum isc_result {
|
|||
DNS_R_NOTINSECURE,
|
||||
DNS_R_UNKNOWNSERVICE,
|
||||
DNS_R_RECOVERABLE,
|
||||
DNS_R_UNKNOWNOPT,
|
||||
DNS_R_UNEXPECTEDID,
|
||||
DNS_R_SEENINCLUDE,
|
||||
DNS_R_NOTEXACT,
|
||||
|
|
@ -172,12 +159,10 @@ typedef enum isc_result {
|
|||
DNS_R_CLOCKSKEW,
|
||||
DNS_R_BADIXFR,
|
||||
DNS_R_NOTAUTHORITATIVE,
|
||||
DNS_R_NOVALIDKEY,
|
||||
DNS_R_OBSOLETE,
|
||||
DNS_R_FROZEN,
|
||||
DNS_R_UNKNOWNFLAG,
|
||||
DNS_R_EXPECTEDRESPONSE,
|
||||
DNS_R_NOVALIDDS,
|
||||
DNS_R_NSISADDRESS,
|
||||
DNS_R_REMOTEFORMERR,
|
||||
DNS_R_TRUNCATEDTCP,
|
||||
|
|
@ -202,7 +187,6 @@ typedef enum isc_result {
|
|||
DNS_R_EXPIRED,
|
||||
DNS_R_NOTDYNAMIC,
|
||||
DNS_R_BADEUI,
|
||||
DNS_R_NTACOVERED,
|
||||
DNS_R_BADCDS,
|
||||
DNS_R_BADCDNSKEY,
|
||||
DNS_R_OPTERR,
|
||||
|
|
@ -230,7 +214,6 @@ typedef enum isc_result {
|
|||
DST_R_CRYPTOFAILURE,
|
||||
/* compat */
|
||||
DST_R_OPENSSLFAILURE = DST_R_CRYPTOFAILURE,
|
||||
DST_R_NOCRYPTO,
|
||||
DST_R_NULLKEY,
|
||||
DST_R_INVALIDPUBLICKEY,
|
||||
DST_R_INVALIDPRIVATEKEY,
|
||||
|
|
@ -241,8 +224,6 @@ typedef enum isc_result {
|
|||
DST_R_NOTPUBLICKEY,
|
||||
DST_R_NOTPRIVATEKEY,
|
||||
DST_R_KEYCANNOTCOMPUTESECRET,
|
||||
DST_R_COMPUTESECRETFAILURE,
|
||||
DST_R_NORANDOMNESS,
|
||||
DST_R_BADKEYTYPE,
|
||||
DST_R_NOENGINE,
|
||||
DST_R_EXTERNALKEY,
|
||||
|
|
@ -267,10 +248,7 @@ typedef enum isc_result {
|
|||
DNS_R_BADCOOKIE = DNS_R_NOERROR + 23,
|
||||
|
||||
ISCCC_R_UNKNOWNVERSION,
|
||||
ISCCC_R_SYNTAX,
|
||||
ISCCC_R_BADAUTH,
|
||||
ISCCC_R_EXPIRED,
|
||||
ISCCC_R_CLOCKSKEW,
|
||||
ISCCC_R_DUPLICATE,
|
||||
ISCCC_R_MAXDEPTH,
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ typedef enum {
|
|||
} isc_symexists_t;
|
||||
|
||||
/*% Create a symbol table. */
|
||||
isc_result_t
|
||||
void
|
||||
isc_symtab_create(isc_mem_t *mctx, unsigned int size,
|
||||
isc_symtabaction_t undefine_action, void *undefine_arg,
|
||||
bool case_sensitive, isc_symtab_t **symtabp);
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ struct isc_lex {
|
|||
LIST(struct inputsource) sources;
|
||||
};
|
||||
|
||||
static isc_result_t
|
||||
static void
|
||||
grow_data(isc_lex_t *lex, size_t *remainingp, char **currp, char **prevp) {
|
||||
char *tmp;
|
||||
|
||||
|
|
@ -78,7 +78,6 @@ grow_data(isc_lex_t *lex, size_t *remainingp, char **currp, char **prevp) {
|
|||
lex->data = tmp;
|
||||
*remainingp += lex->max_token;
|
||||
lex->max_token *= 2;
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -179,27 +178,24 @@ isc_lex_setspecials(isc_lex_t *lex, isc_lexspecials_t specials) {
|
|||
memmove(lex->specials, specials, 256);
|
||||
}
|
||||
|
||||
static isc_result_t
|
||||
static void
|
||||
new_source(isc_lex_t *lex, bool is_file, bool need_close, void *input,
|
||||
const char *name) {
|
||||
inputsource *source;
|
||||
|
||||
source = isc_mem_get(lex->mctx, sizeof(*source));
|
||||
source->result = ISC_R_SUCCESS;
|
||||
source->is_file = is_file;
|
||||
source->need_close = need_close;
|
||||
source->at_eof = false;
|
||||
source->last_was_eol = lex->last_was_eol;
|
||||
source->input = input;
|
||||
source->name = isc_mem_strdup(lex->mctx, name);
|
||||
source->pushback = NULL;
|
||||
*source = (inputsource){
|
||||
.is_file = is_file,
|
||||
.need_close = need_close,
|
||||
.last_was_eol = lex->last_was_eol,
|
||||
.input = input,
|
||||
.name = isc_mem_strdup(lex->mctx, name),
|
||||
.line = 1,
|
||||
.link = ISC_LINK_INITIALIZER,
|
||||
};
|
||||
isc_buffer_allocate(lex->mctx, &source->pushback,
|
||||
(unsigned int)lex->max_token);
|
||||
source->ignored = 0;
|
||||
source->line = 1;
|
||||
ISC_LIST_INITANDPREPEND(lex->sources, source, link);
|
||||
|
||||
return ISC_R_SUCCESS;
|
||||
ISC_LIST_PREPEND(lex->sources, source, link);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -218,14 +214,11 @@ isc_lex_openfile(isc_lex_t *lex, const char *filename) {
|
|||
return result;
|
||||
}
|
||||
|
||||
result = new_source(lex, true, true, stream, filename);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
(void)fclose(stream);
|
||||
}
|
||||
return result;
|
||||
new_source(lex, true, true, stream, filename);
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
isc_lex_openstream(isc_lex_t *lex, FILE *stream) {
|
||||
char name[128];
|
||||
|
||||
|
|
@ -237,7 +230,7 @@ isc_lex_openstream(isc_lex_t *lex, FILE *stream) {
|
|||
|
||||
snprintf(name, sizeof(name), "stream-%p", stream);
|
||||
|
||||
return new_source(lex, true, false, stream, name);
|
||||
new_source(lex, true, false, stream, name);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -252,7 +245,8 @@ isc_lex_openbuffer(isc_lex_t *lex, isc_buffer_t *buffer) {
|
|||
|
||||
snprintf(name, sizeof(name), "buffer-%p", buffer);
|
||||
|
||||
return new_source(lex, false, false, buffer, name);
|
||||
new_source(lex, false, false, buffer, name);
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
@ -669,11 +663,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
|
|||
state = lexstate_string;
|
||||
}
|
||||
if (remaining == 0U) {
|
||||
result = grow_data(lex, &remaining, &curr,
|
||||
&prev);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
grow_data(lex, &remaining, &curr, &prev);
|
||||
}
|
||||
INSIST(remaining > 0U);
|
||||
*curr++ = c;
|
||||
|
|
@ -685,11 +675,8 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
|
|||
(options & ISC_LEXOPT_VPAIR) != 0)
|
||||
{
|
||||
if (remaining == 0U) {
|
||||
result = grow_data(lex, &remaining,
|
||||
&curr, &prev);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
grow_data(lex, &remaining, &curr,
|
||||
&prev);
|
||||
}
|
||||
INSIST(remaining > 0U);
|
||||
*curr++ = c;
|
||||
|
|
@ -744,11 +731,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
|
|||
: false;
|
||||
}
|
||||
if (remaining == 0U) {
|
||||
result = grow_data(lex, &remaining, &curr,
|
||||
&prev);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
grow_data(lex, &remaining, &curr, &prev);
|
||||
}
|
||||
INSIST(remaining > 0U);
|
||||
*curr++ = c;
|
||||
|
|
@ -849,11 +832,8 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
|
|||
escaped = false;
|
||||
}
|
||||
if (remaining == 0U) {
|
||||
result = grow_data(lex, &remaining,
|
||||
&curr, &prev);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
grow_data(lex, &remaining, &curr,
|
||||
&prev);
|
||||
}
|
||||
INSIST(remaining > 0U);
|
||||
prev = curr;
|
||||
|
|
@ -901,11 +881,7 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) {
|
|||
}
|
||||
|
||||
if (remaining == 0U) {
|
||||
result = grow_data(lex, &remaining, &curr,
|
||||
&prev);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto done;
|
||||
}
|
||||
grow_data(lex, &remaining, &curr, &prev);
|
||||
}
|
||||
INSIST(remaining > 0U);
|
||||
prev = curr;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ portset_remove(isc_portset_t *portset, in_port_t port) {
|
|||
}
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
isc_portset_create(isc_mem_t *mctx, isc_portset_t **portsetp) {
|
||||
isc_portset_t *portset;
|
||||
|
||||
|
|
@ -64,8 +64,6 @@ isc_portset_create(isc_mem_t *mctx, isc_portset_t **portsetp) {
|
|||
portset = isc_mem_get(mctx, sizeof(*portset));
|
||||
*portset = (isc_portset_t){ 0 };
|
||||
*portsetp = portset;
|
||||
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ static const char *description[ISC_R_NRESULTS] = {
|
|||
[ISC_R_SUCCESS] = "success",
|
||||
[ISC_R_NOMEMORY] = "out of memory",
|
||||
[ISC_R_TIMEDOUT] = "timed out",
|
||||
[ISC_R_NOTHREADS] = "no available threads",
|
||||
[ISC_R_ADDRNOTAVAIL] = "address not available",
|
||||
[ISC_R_ADDRINUSE] = "address in use",
|
||||
[ISC_R_NOPERM] = "permission denied",
|
||||
|
|
@ -35,13 +34,11 @@ static const char *description[ISC_R_NRESULTS] = {
|
|||
[ISC_R_CONNREFUSED] = "connection refused",
|
||||
[ISC_R_NORESOURCES] = "not enough free resources",
|
||||
[ISC_R_EOF] = "end of file",
|
||||
[ISC_R_BOUND] = "socket already bound",
|
||||
[ISC_R_RELOAD] = "reload",
|
||||
[ISC_R_LOCKBUSY] = "lock busy",
|
||||
[ISC_R_EXISTS] = "already exists",
|
||||
[ISC_R_NOSPACE] = "ran out of space",
|
||||
[ISC_R_CANCELED] = "operation canceled",
|
||||
[ISC_R_NOTBOUND] = "socket is not bound",
|
||||
[ISC_R_SHUTTINGDOWN] = "shutting down",
|
||||
[ISC_R_NOTFOUND] = "not found",
|
||||
[ISC_R_UNEXPECTEDEND] = "unexpected end of input",
|
||||
|
|
@ -65,15 +62,11 @@ static const char *description[ISC_R_NRESULTS] = {
|
|||
[ISC_R_NOENTROPY] = "out of entropy",
|
||||
[ISC_R_MULTICAST] = "invalid use of multicast address",
|
||||
[ISC_R_NOTFILE] = "not a file",
|
||||
[ISC_R_NOTDIRECTORY] = "not a directory",
|
||||
[ISC_R_EMPTY] = "queue is empty",
|
||||
[ISC_R_FAMILYMISMATCH] = "address family mismatch",
|
||||
[ISC_R_FAMILYNOSUPPORT] = "address family not supported",
|
||||
[ISC_R_BADHEX] = "bad hex encoding",
|
||||
[ISC_R_TOOMANYOPENFILES] = "too many open files",
|
||||
[ISC_R_NOTBLOCKING] = "not blocking",
|
||||
[ISC_R_UNBALANCEDQUOTES] = "unbalanced quotes",
|
||||
[ISC_R_INPROGRESS] = "operation in progress",
|
||||
[ISC_R_CONNECTIONRESET] = "connection reset",
|
||||
[ISC_R_SOFTQUOTA] = "soft quota reached",
|
||||
[ISC_R_BADNUMBER] = "not a valid number",
|
||||
|
|
@ -83,7 +76,6 @@ static const char *description[ISC_R_NRESULTS] = {
|
|||
[ISC_R_BADBASE32] = "bad base32 encoding",
|
||||
[ISC_R_UNSET] = "unset",
|
||||
[ISC_R_MULTIPLE] = "multiple",
|
||||
[ISC_R_WOULDBLOCK] = "would block",
|
||||
[ISC_R_COMPLETE] = "complete",
|
||||
[ISC_R_CRYPTOFAILURE] = "crypto failure",
|
||||
[ISC_R_DISCQUOTA] = "disc quota",
|
||||
|
|
@ -104,14 +96,12 @@ static const char *description[ISC_R_NRESULTS] = {
|
|||
[DNS_R_UNKNOWN] = "unknown class/type",
|
||||
[DNS_R_BADLABELTYPE] = "bad label type",
|
||||
[DNS_R_BADPOINTER] = "bad compression pointer",
|
||||
[DNS_R_TOOMANYHOPS] = "too many hops",
|
||||
[DNS_R_DISALLOWED] = "disallowed (by application policy)",
|
||||
[DNS_R_EXTRATOKEN] = "extra input text",
|
||||
[DNS_R_EXTRADATA] = "extra input data",
|
||||
[DNS_R_TEXTTOOLONG] = "text too long",
|
||||
[DNS_R_NOTZONETOP] = "not at top of zone",
|
||||
[DNS_R_SYNTAX] = "syntax error",
|
||||
[DNS_R_BADCKSUM] = "bad checksum",
|
||||
[DNS_R_BADAAAA] = "bad IPv6 address",
|
||||
[DNS_R_NOOWNER] = "no owner",
|
||||
[DNS_R_NOTTL] = "no ttl",
|
||||
|
|
@ -121,7 +111,6 @@ static const char *description[ISC_R_NRESULTS] = {
|
|||
[DNS_R_NEWORIGIN] = "new origin",
|
||||
[DNS_R_UNCHANGED] = "unchanged",
|
||||
[DNS_R_BADTTL] = "bad ttl",
|
||||
[DNS_R_NOREDATA] = "more data needed/to be rendered",
|
||||
[DNS_R_CONTINUE] = "continue",
|
||||
[DNS_R_DELEGATION] = "delegation",
|
||||
[DNS_R_GLUE] = "glue",
|
||||
|
|
@ -130,7 +119,6 @@ static const char *description[ISC_R_NRESULTS] = {
|
|||
[DNS_R_BADDB] = "bad database",
|
||||
[DNS_R_ZONECUT] = "zonecut",
|
||||
[DNS_R_BADZONE] = "bad zone",
|
||||
[DNS_R_MOREDATA] = "more data",
|
||||
[DNS_R_UPTODATE] = "up to date",
|
||||
[DNS_R_TSIGVERIFYFAILURE] = "tsig verify failure",
|
||||
[DNS_R_TSIGERRORSET] = "tsig indicates error",
|
||||
|
|
@ -158,7 +146,6 @@ static const char *description[ISC_R_NRESULTS] = {
|
|||
[DNS_R_NOTINSECURE] = "insecurity proof failed",
|
||||
[DNS_R_UNKNOWNSERVICE] = "unknown service",
|
||||
[DNS_R_RECOVERABLE] = "recoverable error occurred",
|
||||
[DNS_R_UNKNOWNOPT] = "unknown opt attribute record",
|
||||
[DNS_R_UNEXPECTEDID] = "unexpected message id",
|
||||
[DNS_R_SEENINCLUDE] = "seen include file",
|
||||
[DNS_R_NOTEXACT] = "not exact",
|
||||
|
|
@ -173,12 +160,10 @@ static const char *description[ISC_R_NRESULTS] = {
|
|||
[DNS_R_CLOCKSKEW] = "clocks are unsynchronized",
|
||||
[DNS_R_BADIXFR] = "IXFR failed",
|
||||
[DNS_R_NOTAUTHORITATIVE] = "not authoritative",
|
||||
[DNS_R_NOVALIDKEY] = "no valid KEY",
|
||||
[DNS_R_OBSOLETE] = "obsolete",
|
||||
[DNS_R_FROZEN] = "already frozen",
|
||||
[DNS_R_UNKNOWNFLAG] = "unknown flag",
|
||||
[DNS_R_EXPECTEDRESPONSE] = "expected a response",
|
||||
[DNS_R_NOVALIDDS] = "no valid DS",
|
||||
[DNS_R_NSISADDRESS] = "NS is an address",
|
||||
[DNS_R_REMOTEFORMERR] = "received FORMERR",
|
||||
[DNS_R_TRUNCATEDTCP] = "truncated TCP response",
|
||||
|
|
@ -203,7 +188,6 @@ static const char *description[ISC_R_NRESULTS] = {
|
|||
[DNS_R_EXPIRED] = "expired",
|
||||
[DNS_R_NOTDYNAMIC] = "not dynamic",
|
||||
[DNS_R_BADEUI] = "bad EUI",
|
||||
[DNS_R_NTACOVERED] = "covered by negative trust anchor",
|
||||
[DNS_R_BADCDS] = "bad CDS",
|
||||
[DNS_R_BADCDNSKEY] = "bad CDNSKEY",
|
||||
[DNS_R_OPTERR] = "malformed OPT option",
|
||||
|
|
@ -229,7 +213,6 @@ static const char *description[ISC_R_NRESULTS] = {
|
|||
|
||||
[DST_R_UNSUPPORTEDALG] = "algorithm is unsupported",
|
||||
[DST_R_CRYPTOFAILURE] = "crypto failure",
|
||||
[DST_R_NOCRYPTO] = "built with no crypto support",
|
||||
[DST_R_NULLKEY] = "illegal operation for a null key",
|
||||
[DST_R_INVALIDPUBLICKEY] = "public key is invalid",
|
||||
[DST_R_INVALIDPRIVATEKEY] = "private key is invalid",
|
||||
|
|
@ -240,8 +223,6 @@ static const char *description[ISC_R_NRESULTS] = {
|
|||
[DST_R_NOTPUBLICKEY] = "not a public key",
|
||||
[DST_R_NOTPRIVATEKEY] = "not a private key",
|
||||
[DST_R_KEYCANNOTCOMPUTESECRET] = "not a key that can compute a secret",
|
||||
[DST_R_COMPUTESECRETFAILURE] = "failure computing a shared secret",
|
||||
[DST_R_NORANDOMNESS] = "no randomness available",
|
||||
[DST_R_BADKEYTYPE] = "bad key type",
|
||||
[DST_R_NOENGINE] = "OpenSSL Engine support has been removed; "
|
||||
"use OpenSSL Providers for PKCS#11",
|
||||
|
|
@ -267,10 +248,7 @@ static const char *description[ISC_R_NRESULTS] = {
|
|||
[DNS_R_BADCOOKIE] = "BADCOOKIE",
|
||||
|
||||
[ISCCC_R_UNKNOWNVERSION] = "unknown version",
|
||||
[ISCCC_R_SYNTAX] = "syntax error",
|
||||
[ISCCC_R_BADAUTH] = "bad auth",
|
||||
[ISCCC_R_EXPIRED] = "expired",
|
||||
[ISCCC_R_CLOCKSKEW] = "clock skew",
|
||||
[ISCCC_R_DUPLICATE] = "duplicate",
|
||||
[ISCCC_R_MAXDEPTH] = "max depth",
|
||||
};
|
||||
|
|
@ -279,7 +257,6 @@ static const char *identifier[ISC_R_NRESULTS] = {
|
|||
[ISC_R_SUCCESS] = "ISC_R_SUCCESS",
|
||||
[ISC_R_NOMEMORY] = "ISC_R_NOMEMORY",
|
||||
[ISC_R_TIMEDOUT] = "ISC_R_TIMEDOUT",
|
||||
[ISC_R_NOTHREADS] = "ISC_R_NOTHREADS",
|
||||
[ISC_R_ADDRNOTAVAIL] = "ISC_R_ADDRNOTAVAIL",
|
||||
[ISC_R_ADDRINUSE] = "ISC_R_ADDRINUSE",
|
||||
[ISC_R_NOPERM] = "ISC_R_NOPERM",
|
||||
|
|
@ -291,13 +268,11 @@ static const char *identifier[ISC_R_NRESULTS] = {
|
|||
[ISC_R_CONNREFUSED] = "ISC_R_CONNREFUSED",
|
||||
[ISC_R_NORESOURCES] = "ISC_R_NORESOURCES",
|
||||
[ISC_R_EOF] = "ISC_R_EOF",
|
||||
[ISC_R_BOUND] = "ISC_R_BOUND",
|
||||
[ISC_R_RELOAD] = "ISC_R_RELOAD",
|
||||
[ISC_R_LOCKBUSY] = "ISC_R_LOCKBUSY",
|
||||
[ISC_R_EXISTS] = "ISC_R_EXISTS",
|
||||
[ISC_R_NOSPACE] = "ISC_R_NOSPACE",
|
||||
[ISC_R_CANCELED] = "ISC_R_CANCELED",
|
||||
[ISC_R_NOTBOUND] = "ISC_R_NOTBOUND",
|
||||
[ISC_R_SHUTTINGDOWN] = "ISC_R_SHUTTINGDOWN",
|
||||
[ISC_R_NOTFOUND] = "ISC_R_NOTFOUND",
|
||||
[ISC_R_UNEXPECTEDEND] = "ISC_R_UNEXPECTEDEND",
|
||||
|
|
@ -321,15 +296,11 @@ static const char *identifier[ISC_R_NRESULTS] = {
|
|||
[ISC_R_NOENTROPY] = "ISC_R_NOENTROPY",
|
||||
[ISC_R_MULTICAST] = "ISC_R_MULTICAST",
|
||||
[ISC_R_NOTFILE] = "ISC_R_NOTFILE",
|
||||
[ISC_R_NOTDIRECTORY] = "ISC_R_NOTDIRECTORY",
|
||||
[ISC_R_EMPTY] = "ISC_R_EMPTY",
|
||||
[ISC_R_FAMILYMISMATCH] = "ISC_R_FAMILYMISMATCH",
|
||||
[ISC_R_FAMILYNOSUPPORT] = "ISC_R_FAMILYNOSUPPORT",
|
||||
[ISC_R_BADHEX] = "ISC_R_BADHEX",
|
||||
[ISC_R_TOOMANYOPENFILES] = "ISC_R_TOOMANYOPENFILES",
|
||||
[ISC_R_NOTBLOCKING] = "ISC_R_NOTBLOCKING",
|
||||
[ISC_R_UNBALANCEDQUOTES] = "ISC_R_UNBALANCEDQUOTES",
|
||||
[ISC_R_INPROGRESS] = "ISC_R_INPROGRESS",
|
||||
[ISC_R_CONNECTIONRESET] = "ISC_R_CONNECTIONRESET",
|
||||
[ISC_R_SOFTQUOTA] = "ISC_R_SOFTQUOTA",
|
||||
[ISC_R_BADNUMBER] = "ISC_R_BADNUMBER",
|
||||
|
|
@ -339,7 +310,6 @@ static const char *identifier[ISC_R_NRESULTS] = {
|
|||
[ISC_R_BADBASE32] = "ISC_R_BADBASE32",
|
||||
[ISC_R_UNSET] = "ISC_R_UNSET",
|
||||
[ISC_R_MULTIPLE] = "ISC_R_MULTIPLE",
|
||||
[ISC_R_WOULDBLOCK] = "ISC_R_WOULDBLOCK",
|
||||
[ISC_R_COMPLETE] = "ISC_R_COMPLETE",
|
||||
[ISC_R_CRYPTOFAILURE] = "ISC_R_CRYPTOFAILURE",
|
||||
[ISC_R_DISCQUOTA] = "ISC_R_DISCQUOTA",
|
||||
|
|
@ -358,14 +328,12 @@ static const char *identifier[ISC_R_NRESULTS] = {
|
|||
[DNS_R_UNKNOWN] = "DNS_R_UNKNOWN",
|
||||
[DNS_R_BADLABELTYPE] = "DNS_R_BADLABELTYPE",
|
||||
[DNS_R_BADPOINTER] = "DNS_R_BADPOINTER",
|
||||
[DNS_R_TOOMANYHOPS] = "DNS_R_TOOMANYHOPS",
|
||||
[DNS_R_DISALLOWED] = "DNS_R_DISALLOWED",
|
||||
[DNS_R_EXTRATOKEN] = "DNS_R_EXTRATOKEN",
|
||||
[DNS_R_EXTRADATA] = "DNS_R_EXTRADATA",
|
||||
[DNS_R_TEXTTOOLONG] = "DNS_R_TEXTTOOLONG",
|
||||
[DNS_R_NOTZONETOP] = "DNS_R_NOTZONETOP",
|
||||
[DNS_R_SYNTAX] = "DNS_R_SYNTAX",
|
||||
[DNS_R_BADCKSUM] = "DNS_R_BADCKSUM",
|
||||
[DNS_R_BADAAAA] = "DNS_R_BADAAAA",
|
||||
[DNS_R_NOOWNER] = "DNS_R_NOOWNER",
|
||||
[DNS_R_NOTTL] = "DNS_R_NOTTL",
|
||||
|
|
@ -375,7 +343,6 @@ static const char *identifier[ISC_R_NRESULTS] = {
|
|||
[DNS_R_NEWORIGIN] = "DNS_R_NEWORIGIN",
|
||||
[DNS_R_UNCHANGED] = "DNS_R_UNCHANGED",
|
||||
[DNS_R_BADTTL] = "DNS_R_BADTTL",
|
||||
[DNS_R_NOREDATA] = "DNS_R_NOREDATA",
|
||||
[DNS_R_CONTINUE] = "DNS_R_CONTINUE",
|
||||
[DNS_R_DELEGATION] = "DNS_R_DELEGATION",
|
||||
[DNS_R_GLUE] = "DNS_R_GLUE",
|
||||
|
|
@ -384,7 +351,6 @@ static const char *identifier[ISC_R_NRESULTS] = {
|
|||
[DNS_R_BADDB] = "DNS_R_BADDB",
|
||||
[DNS_R_ZONECUT] = "DNS_R_ZONECUT",
|
||||
[DNS_R_BADZONE] = "DNS_R_BADZONE",
|
||||
[DNS_R_MOREDATA] = "DNS_R_MOREDATA",
|
||||
[DNS_R_UPTODATE] = "DNS_R_UPTODATE",
|
||||
[DNS_R_TSIGVERIFYFAILURE] = "DNS_R_TSIGVERIFYFAILURE",
|
||||
[DNS_R_TSIGERRORSET] = "DNS_R_TSIGERRORSET",
|
||||
|
|
@ -412,7 +378,6 @@ static const char *identifier[ISC_R_NRESULTS] = {
|
|||
[DNS_R_NOTINSECURE] = "DNS_R_NOTINSECURE",
|
||||
[DNS_R_UNKNOWNSERVICE] = "DNS_R_UNKNOWNSERVICE",
|
||||
[DNS_R_RECOVERABLE] = "DNS_R_RECOVERABLE",
|
||||
[DNS_R_UNKNOWNOPT] = "DNS_R_UNKNOWNOPT",
|
||||
[DNS_R_UNEXPECTEDID] = "DNS_R_UNEXPECTEDID",
|
||||
[DNS_R_SEENINCLUDE] = "DNS_R_SEENINCLUDE",
|
||||
[DNS_R_NOTEXACT] = "DNS_R_NOTEXACT",
|
||||
|
|
@ -427,12 +392,10 @@ static const char *identifier[ISC_R_NRESULTS] = {
|
|||
[DNS_R_CLOCKSKEW] = "DNS_R_CLOCKSKEW",
|
||||
[DNS_R_BADIXFR] = "DNS_R_BADIXFR",
|
||||
[DNS_R_NOTAUTHORITATIVE] = "DNS_R_NOTAUTHORITATIVE",
|
||||
[DNS_R_NOVALIDKEY] = "DNS_R_NOVALIDKEY",
|
||||
[DNS_R_OBSOLETE] = "DNS_R_OBSOLETE",
|
||||
[DNS_R_FROZEN] = "DNS_R_FROZEN",
|
||||
[DNS_R_UNKNOWNFLAG] = "DNS_R_UNKNOWNFLAG",
|
||||
[DNS_R_EXPECTEDRESPONSE] = "DNS_R_EXPECTEDRESPONSE",
|
||||
[DNS_R_NOVALIDDS] = "DNS_R_NOVALIDDS",
|
||||
[DNS_R_NSISADDRESS] = "DNS_R_NSISADDRESS",
|
||||
[DNS_R_REMOTEFORMERR] = "DNS_R_REMOTEFORMERR",
|
||||
[DNS_R_TRUNCATEDTCP] = "DNS_R_TRUNCATEDTCP",
|
||||
|
|
@ -457,7 +420,6 @@ static const char *identifier[ISC_R_NRESULTS] = {
|
|||
[DNS_R_EXPIRED] = "DNS_R_EXPIRED",
|
||||
[DNS_R_NOTDYNAMIC] = "DNS_R_NOTDYNAMIC",
|
||||
[DNS_R_BADEUI] = "DNS_R_BADEUI",
|
||||
[DNS_R_NTACOVERED] = "DNS_R_NTACOVERED",
|
||||
[DNS_R_BADCDS] = "DNS_R_BADCDS",
|
||||
[DNS_R_BADCDNSKEY] = "DNS_R_BADCDNSKEY",
|
||||
[DNS_R_OPTERR] = "DNS_R_OPTERR",
|
||||
|
|
@ -483,7 +445,6 @@ static const char *identifier[ISC_R_NRESULTS] = {
|
|||
|
||||
[DST_R_UNSUPPORTEDALG] = "DST_R_UNSUPPORTEDALG",
|
||||
[DST_R_CRYPTOFAILURE] = "DST_R_CRYPTOFAILURE",
|
||||
[DST_R_NOCRYPTO] = "DST_R_NOCRYPTO",
|
||||
[DST_R_NULLKEY] = "DST_R_NULLKEY",
|
||||
[DST_R_INVALIDPUBLICKEY] = "DST_R_INVALIDPUBLICKEY",
|
||||
[DST_R_INVALIDPRIVATEKEY] = "DST_R_INVALIDPRIVATEKEY",
|
||||
|
|
@ -494,8 +455,6 @@ static const char *identifier[ISC_R_NRESULTS] = {
|
|||
[DST_R_NOTPUBLICKEY] = "DST_R_NOTPUBLICKEY",
|
||||
[DST_R_NOTPRIVATEKEY] = "DST_R_NOTPRIVATEKEY",
|
||||
[DST_R_KEYCANNOTCOMPUTESECRET] = "DST_R_KEYCANNOTCOMPUTESECRET",
|
||||
[DST_R_COMPUTESECRETFAILURE] = "DST_R_COMPUTESECRETFAILURE",
|
||||
[DST_R_NORANDOMNESS] = "DST_R_NORANDOMNESS",
|
||||
[DST_R_BADKEYTYPE] = "DST_R_BADKEYTYPE",
|
||||
[DST_R_NOENGINE] = "DST_R_NOENGINE",
|
||||
[DST_R_EXTERNALKEY] = "DST_R_EXTERNALKEY",
|
||||
|
|
@ -520,10 +479,7 @@ static const char *identifier[ISC_R_NRESULTS] = {
|
|||
[DNS_R_BADCOOKIE] = "DNS_R_BADCOOKIE",
|
||||
|
||||
[ISCCC_R_UNKNOWNVERSION] = "ISCCC_R_UNKNOWNVERSION",
|
||||
[ISCCC_R_SYNTAX] = "ISCCC_R_SYNTAX",
|
||||
[ISCCC_R_BADAUTH] = "ISCCC_R_BADAUTH",
|
||||
[ISCCC_R_EXPIRED] = "ISCCC_R_EXPIRED",
|
||||
[ISCCC_R_CLOCKSKEW] = "ISCCC_R_CLOCKSKEW",
|
||||
[ISCCC_R_DUPLICATE] = "ISCCC_R_DUPLICATE",
|
||||
[ISCCC_R_MAXDEPTH] = "ISCCC_R_MAXDEPTH",
|
||||
};
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ struct isc_symtab {
|
|||
bool case_sensitive;
|
||||
};
|
||||
|
||||
isc_result_t
|
||||
void
|
||||
isc_symtab_create(isc_mem_t *mctx, unsigned int size,
|
||||
isc_symtabaction_t undefine_action, void *undefine_arg,
|
||||
bool case_sensitive, isc_symtab_t **symtabp) {
|
||||
|
|
@ -75,8 +75,6 @@ isc_symtab_create(isc_mem_t *mctx, unsigned int size,
|
|||
symtab->magic = SYMTAB_MAGIC;
|
||||
|
||||
*symtabp = symtab;
|
||||
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -530,7 +530,7 @@ value_fromwire(isccc_region_t *source, unsigned int depth,
|
|||
} else if (msgtype == ISCCC_CCMSGTYPE_LIST) {
|
||||
result = list_fromwire(&active, depth + 1, valuep);
|
||||
} else {
|
||||
result = ISCCC_R_SYNTAX;
|
||||
result = DNS_R_SYNTAX;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -2102,13 +2102,11 @@ check_remoteserverlist(const cfg_obj_t *cctx, const char *list,
|
|||
*/
|
||||
static isc_result_t
|
||||
check_remoteserverlists(const cfg_obj_t *cctx, isc_mem_t *mctx) {
|
||||
isc_result_t result, tresult;
|
||||
isc_result_t result = ISC_R_SUCCESS, tresult;
|
||||
isc_symtab_t *symtab = NULL;
|
||||
|
||||
result = isc_symtab_create(mctx, 100, freekey, mctx, false, &symtab);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
isc_symtab_create(mctx, 100, freekey, mctx, false, &symtab);
|
||||
|
||||
tresult = check_remoteserverlist(cctx, "remote-servers", symtab, mctx);
|
||||
if (tresult != ISC_R_SUCCESS) {
|
||||
result = tresult;
|
||||
|
|
@ -2200,10 +2198,7 @@ check_httpservers(const cfg_obj_t *config, isc_mem_t *mctx) {
|
|||
const cfg_listelt_t *elt = NULL;
|
||||
isc_symtab_t *symtab = NULL;
|
||||
|
||||
result = isc_symtab_create(mctx, 100, NULL, NULL, false, &symtab);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
isc_symtab_create(mctx, 100, NULL, NULL, false, &symtab);
|
||||
|
||||
result = cfg_map_get(config, "http", &obj);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
|
|
@ -2373,10 +2368,7 @@ check_tls_definitions(const cfg_obj_t *config, isc_mem_t *mctx) {
|
|||
return result;
|
||||
}
|
||||
|
||||
result = isc_symtab_create(mctx, 100, NULL, NULL, false, &symtab);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
isc_symtab_create(mctx, 100, NULL, NULL, false, &symtab);
|
||||
|
||||
for (elt = cfg_list_first(obj); elt != NULL; elt = cfg_list_next(elt)) {
|
||||
const char *name;
|
||||
|
|
@ -2457,11 +2449,7 @@ validate_remotes(const cfg_obj_t *obj, const cfg_obj_t *config,
|
|||
const cfg_obj_t *listobj;
|
||||
|
||||
REQUIRE(countp != NULL);
|
||||
result = isc_symtab_create(mctx, 100, NULL, NULL, false, &symtab);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
*countp = count;
|
||||
return result;
|
||||
}
|
||||
isc_symtab_create(mctx, 100, NULL, NULL, false, &symtab);
|
||||
|
||||
newlist:
|
||||
listobj = cfg_tuple_get(obj, "addresses");
|
||||
|
|
@ -4895,20 +4883,13 @@ record_ds_keys(isc_symtab_t *symtab, isc_mem_t *mctx,
|
|||
static isc_result_t
|
||||
check_ta_conflicts(const cfg_obj_t *global_ta, const cfg_obj_t *view_ta,
|
||||
bool autovalidation, isc_mem_t *mctx) {
|
||||
isc_result_t result, tresult;
|
||||
isc_result_t result = ISC_R_SUCCESS, tresult;
|
||||
const cfg_listelt_t *elt = NULL;
|
||||
const cfg_obj_t *keylist = NULL;
|
||||
isc_symtab_t *statictab = NULL, *dstab = NULL;
|
||||
|
||||
result = isc_symtab_create(mctx, 100, freekey, mctx, false, &statictab);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
result = isc_symtab_create(mctx, 100, freekey, mctx, false, &dstab);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
isc_symtab_create(mctx, 100, freekey, mctx, false, &statictab);
|
||||
isc_symtab_create(mctx, 100, freekey, mctx, false, &dstab);
|
||||
|
||||
/*
|
||||
* First we record all the static keys (trust-anchors configured with
|
||||
|
|
@ -4970,7 +4951,6 @@ check_ta_conflicts(const cfg_obj_t *global_ta, const cfg_obj_t *view_ta,
|
|||
}
|
||||
}
|
||||
|
||||
cleanup:
|
||||
if (statictab != NULL) {
|
||||
isc_symtab_destroy(&statictab);
|
||||
}
|
||||
|
|
@ -5116,7 +5096,7 @@ check_catz(const cfg_obj_t *catz_obj, const char *viewname, isc_mem_t *mctx) {
|
|||
const cfg_obj_t *obj, *nameobj, *primariesobj;
|
||||
const char *zonename;
|
||||
const char *forview = " for view ";
|
||||
isc_result_t result, tresult;
|
||||
isc_result_t result = ISC_R_SUCCESS, tresult;
|
||||
isc_symtab_t *symtab = NULL;
|
||||
dns_fixedname_t fixed;
|
||||
dns_name_t *name = dns_fixedname_initname(&fixed);
|
||||
|
|
@ -5126,10 +5106,7 @@ check_catz(const cfg_obj_t *catz_obj, const char *viewname, isc_mem_t *mctx) {
|
|||
forview = "";
|
||||
}
|
||||
|
||||
result = isc_symtab_create(mctx, 100, freekey, mctx, false, &symtab);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
isc_symtab_create(mctx, 100, freekey, mctx, false, &symtab);
|
||||
|
||||
obj = cfg_tuple_get(catz_obj, "zone list");
|
||||
|
||||
|
|
@ -5310,10 +5287,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
|
|||
* Check that all zone statements are syntactically correct and
|
||||
* there are no duplicate zones.
|
||||
*/
|
||||
tresult = isc_symtab_create(mctx, 1000, freekey, mctx, false, &symtab);
|
||||
if (tresult != ISC_R_SUCCESS) {
|
||||
return ISC_R_NOMEMORY;
|
||||
}
|
||||
isc_symtab_create(mctx, 1000, freekey, mctx, false, &symtab);
|
||||
|
||||
cfg_aclconfctx_create(mctx, &actx);
|
||||
|
||||
|
|
@ -5426,10 +5400,7 @@ check_viewconf(const cfg_obj_t *config, const cfg_obj_t *voptions,
|
|||
* Check that all key statements are syntactically correct and
|
||||
* there are no duplicate keys.
|
||||
*/
|
||||
tresult = isc_symtab_create(mctx, 1000, freekey, mctx, false, &symtab);
|
||||
if (tresult != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
isc_symtab_create(mctx, 1000, freekey, mctx, false, &symtab);
|
||||
|
||||
(void)cfg_map_get(config, "key", &keys);
|
||||
tresult = check_keylist(keys, symtab, mctx);
|
||||
|
|
@ -5659,10 +5630,7 @@ check_logging(const cfg_obj_t *config, isc_mem_t *mctx) {
|
|||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
result = isc_symtab_create(mctx, 100, NULL, NULL, false, &symtab);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
isc_symtab_create(mctx, 100, NULL, NULL, false, &symtab);
|
||||
|
||||
symvalue.as_cpointer = NULL;
|
||||
for (i = 0; default_channels[i] != NULL; i++) {
|
||||
|
|
@ -5796,10 +5764,7 @@ check_controls(const cfg_obj_t *config, isc_mem_t *mctx) {
|
|||
|
||||
cfg_aclconfctx_create(mctx, &actx);
|
||||
|
||||
result = isc_symtab_create(mctx, 100, freekey, mctx, true, &symtab);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
isc_symtab_create(mctx, 100, freekey, mctx, true, &symtab);
|
||||
|
||||
/*
|
||||
* INET: Check allow clause.
|
||||
|
|
@ -5858,7 +5823,7 @@ check_controls(const cfg_obj_t *config, isc_mem_t *mctx) {
|
|||
result = ISC_R_FAMILYNOSUPPORT;
|
||||
}
|
||||
}
|
||||
cleanup:
|
||||
|
||||
cfg_aclconfctx_detach(&actx);
|
||||
if (symtab != NULL) {
|
||||
isc_symtab_destroy(&symtab);
|
||||
|
|
@ -5935,23 +5900,9 @@ isccfg_check_namedconf(const cfg_obj_t *config, unsigned int flags,
|
|||
* case sensitive. This will prevent people using FOO.DB and foo.db
|
||||
* on case sensitive file systems but that shouldn't be a major issue.
|
||||
*/
|
||||
tresult = isc_symtab_create(mctx, 100, NULL, NULL, false, &files);
|
||||
if (tresult != ISC_R_SUCCESS) {
|
||||
result = tresult;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
tresult = isc_symtab_create(mctx, 100, freekey, mctx, false, &keydirs);
|
||||
if (tresult != ISC_R_SUCCESS) {
|
||||
result = tresult;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
tresult = isc_symtab_create(mctx, 100, freekey, mctx, true, &inview);
|
||||
if (tresult != ISC_R_SUCCESS) {
|
||||
result = tresult;
|
||||
goto cleanup;
|
||||
}
|
||||
isc_symtab_create(mctx, 100, NULL, NULL, false, &files);
|
||||
isc_symtab_create(mctx, 100, freekey, mctx, false, &keydirs);
|
||||
isc_symtab_create(mctx, 100, freekey, mctx, true, &inview);
|
||||
|
||||
if (views == NULL) {
|
||||
tresult = check_viewconf(config, NULL, NULL, dns_rdataclass_in,
|
||||
|
|
@ -5980,11 +5931,8 @@ isccfg_check_namedconf(const cfg_obj_t *config, unsigned int flags,
|
|||
}
|
||||
}
|
||||
|
||||
tresult = isc_symtab_create(mctx, 100, NULL, NULL, true, &symtab);
|
||||
if (tresult != ISC_R_SUCCESS) {
|
||||
result = tresult;
|
||||
goto cleanup;
|
||||
}
|
||||
isc_symtab_create(mctx, 100, NULL, NULL, true, &symtab);
|
||||
|
||||
for (velement = cfg_list_first(views); velement != NULL;
|
||||
velement = cfg_list_next(velement))
|
||||
{
|
||||
|
|
@ -6108,7 +6056,6 @@ isccfg_check_namedconf(const cfg_obj_t *config, unsigned int flags,
|
|||
}
|
||||
}
|
||||
|
||||
cleanup:
|
||||
if (symtab != NULL) {
|
||||
isc_symtab_destroy(&symtab);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,7 +152,6 @@ cfg_parse_buffer(cfg_parser_t *pctx, isc_buffer_t *buffer, const char *file,
|
|||
*
|
||||
* Returns:
|
||||
* \li #ISC_R_SUCCESS - success
|
||||
*\li #ISC_R_NOMEMORY - no memory available
|
||||
*\li #ISC_R_INVALIDFILE - file doesn't exist or is unreadable
|
||||
*\li others - file contains errors
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ cfg_kasp_fromconfig(const cfg_obj_t *config, dns_kasp_t *default_kasp,
|
|||
*
|
||||
*\li #ISC_R_SUCCESS If creating and configuring the KASP succeeds.
|
||||
*\li #ISC_R_EXISTS If 'kasplist' already has a kasp structure with 'name'.
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*
|
||||
*\li Other errors are possible.
|
||||
*/
|
||||
|
|
@ -79,7 +78,6 @@ cfg_keystore_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx,
|
|||
*
|
||||
*\li #ISC_R_SUCCESS If creating and configuring the keystore succeeds.
|
||||
*\li #ISC_R_EXISTS If 'keystorelist' already has a keystore with 'name'.
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*
|
||||
*\li Other errors are possible.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -120,10 +120,7 @@ cfg_kaspkey_fromconfig(const cfg_obj_t *config, dns_kasp_t *kasp,
|
|||
const cfg_obj_t *tagrange = NULL;
|
||||
|
||||
/* Create a new key reference. */
|
||||
result = dns_kasp_key_create(kasp, &key);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
dns_kasp_key_create(kasp, &key);
|
||||
|
||||
if (config == NULL) {
|
||||
/* We are creating a key reference for the default kasp. */
|
||||
|
|
@ -484,12 +481,11 @@ cfg_kasp_fromconfig(const cfg_obj_t *config, dns_kasp_t *default_kasp,
|
|||
return result;
|
||||
}
|
||||
|
||||
result = ISC_R_SUCCESS;
|
||||
|
||||
/* No kasp with configured name was found in list, create new one. */
|
||||
INSIST(kasp == NULL);
|
||||
result = dns_kasp_create(mctx, kaspname, &kasp);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
dns_kasp_create(mctx, kaspname, &kasp);
|
||||
INSIST(kasp != NULL);
|
||||
|
||||
/* Now configure. */
|
||||
|
|
@ -719,14 +715,7 @@ cfg_kasp_fromconfig(const cfg_obj_t *config, dns_kasp_t *default_kasp,
|
|||
{
|
||||
/* Create a new key reference. */
|
||||
new_key = NULL;
|
||||
result = dns_kasp_key_create(kasp, &new_key);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
cfg_obj_log(config, ISC_LOG_ERROR,
|
||||
"dnssec-policy: failed to "
|
||||
"configure keys (%s)",
|
||||
isc_result_totext(result));
|
||||
goto cleanup;
|
||||
}
|
||||
dns_kasp_key_create(kasp, &new_key);
|
||||
if (dns_kasp_key_ksk(key)) {
|
||||
new_key->role |= DNS_KASP_KEY_ROLE_KSK;
|
||||
}
|
||||
|
|
@ -832,10 +821,7 @@ cfg_keystore_fromconfig(const cfg_obj_t *config, isc_mem_t *mctx,
|
|||
* No key-store with configured name was found in list, create new one.
|
||||
*/
|
||||
INSIST(keystore == NULL);
|
||||
result = dns_keystore_create(mctx, name, &keystore);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
dns_keystore_create(mctx, name, &keystore);
|
||||
INSIST(keystore != NULL);
|
||||
|
||||
/* Now configure. */
|
||||
|
|
|
|||
|
|
@ -3797,8 +3797,8 @@ create_map(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret) {
|
|||
cfg_obj_t *obj = NULL;
|
||||
|
||||
CHECK(cfg_create_obj(pctx, type, &obj));
|
||||
CHECK(isc_symtab_create(pctx->mctx, 5, /* XXX */
|
||||
map_symtabitem_destroy, pctx, false, &symtab));
|
||||
isc_symtab_create(pctx->mctx, 5, /* XXX */
|
||||
map_symtabitem_destroy, pctx, false, &symtab);
|
||||
obj->value.map.symtab = symtab;
|
||||
obj->value.map.id = NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -3181,9 +3181,6 @@ ns_client_findversion(ns_client_t *client, dns_db_t *db) {
|
|||
* the active list.
|
||||
*/
|
||||
dbversion = client_getdbversion(client);
|
||||
if (dbversion == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
dns_db_attach(db, &dbversion->db);
|
||||
dns_db_currentversion(db, &dbversion->version);
|
||||
dbversion->acl_checked = false;
|
||||
|
|
|
|||
|
|
@ -474,7 +474,6 @@ ns_plugin_register_t(const char *parameters, const void *cfg, const char *file,
|
|||
*
|
||||
* Returns:
|
||||
*\li #ISC_R_SUCCESS
|
||||
*\li #ISC_R_NOMEMORY
|
||||
*\li Other errors are possible
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1507,15 +1507,12 @@ query_getdb(ns_client_t *client, dns_name_t *name, dns_rdatatype_t qtype,
|
|||
*versionp = NULL;
|
||||
|
||||
dbversion = ns_client_findversion(client, tdbp);
|
||||
if (dbversion == NULL) {
|
||||
tresult = ISC_R_NOMEMORY;
|
||||
} else {
|
||||
/*
|
||||
* Be sure to return our database.
|
||||
*/
|
||||
*dbp = tdbp;
|
||||
*versionp = dbversion->version;
|
||||
}
|
||||
|
||||
/*
|
||||
* Be sure to return our database.
|
||||
*/
|
||||
*dbp = tdbp;
|
||||
*versionp = dbversion->version;
|
||||
|
||||
/*
|
||||
* We return a null zone, No stats for DLZ zones.
|
||||
|
|
@ -7619,7 +7616,7 @@ query_addnoqnameproof(query_ctx_t *qctx) {
|
|||
isc_buffer_t *dbuf, b;
|
||||
dns_name_t *fname = NULL;
|
||||
dns_rdataset_t *neg = NULL, *negsig = NULL;
|
||||
isc_result_t result = ISC_R_NOMEMORY;
|
||||
isc_result_t result;
|
||||
|
||||
CTRACE(ISC_LOG_DEBUG(3), "query_addnoqnameproof");
|
||||
|
||||
|
|
@ -9179,23 +9176,15 @@ query_sign_nodata(query_ctx_t *qctx) {
|
|||
dns_name_getlabelsequence(qname, skip, count,
|
||||
found);
|
||||
|
||||
/*
|
||||
* These ensure fname, rdataset, and
|
||||
* sigrdataset are non-NULL
|
||||
*/
|
||||
fixfname(qctx->client, &qctx->fname,
|
||||
&qctx->dbuf, &b);
|
||||
fixrdataset(qctx->client, &qctx->rdataset);
|
||||
fixrdataset(qctx->client, &qctx->sigrdataset);
|
||||
if (qctx->fname == NULL ||
|
||||
qctx->rdataset == NULL ||
|
||||
qctx->sigrdataset == NULL)
|
||||
{
|
||||
CCTRACE(ISC_LOG_ERROR, "query_sign_"
|
||||
"nodata: "
|
||||
"failure "
|
||||
"getting "
|
||||
"closest "
|
||||
"encloser");
|
||||
QUERY_ERROR(qctx, ISC_R_NOMEMORY);
|
||||
return ns_query_done(qctx);
|
||||
}
|
||||
|
||||
/*
|
||||
* 'nearest' doesn't exist so
|
||||
* 'exist' is set to false.
|
||||
|
|
|
|||
|
|
@ -117,10 +117,8 @@ nsec3param_change_test(const nsec3param_change_test_params_t *test) {
|
|||
result = dns_test_makezone("nsec3", &zone, NULL, false);
|
||||
assert_int_equal(result, ISC_R_SUCCESS);
|
||||
|
||||
result = dns_zone_setfile(
|
||||
zone, TESTS_DIR "/testdata/nsec3param/nsec3.db.signed",
|
||||
dns_masterformat_text, &dns_master_style_default);
|
||||
assert_int_equal(result, ISC_R_SUCCESS);
|
||||
dns_zone_setfile(zone, TESTS_DIR "/testdata/nsec3param/nsec3.db.signed",
|
||||
dns_masterformat_text, &dns_master_style_default);
|
||||
|
||||
result = dns_zone_load(zone, false);
|
||||
assert_int_equal(result, ISC_R_SUCCESS);
|
||||
|
|
|
|||
|
|
@ -285,8 +285,7 @@ ISC_RUN_TEST_IMPL(updatesigs_next) {
|
|||
"testdata/master/master18.data");
|
||||
assert_int_equal(result, DNS_R_SEENINCLUDE);
|
||||
|
||||
result = dns_zone_setkeydirectory(zone, TESTS_DIR "/testkeys");
|
||||
assert_int_equal(result, ISC_R_SUCCESS);
|
||||
dns_zone_setkeydirectory(zone, TESTS_DIR "/testkeys");
|
||||
|
||||
result = dns_zone_findkeys(zone, db, NULL, now, mctx, DNS_MAXZONEKEYS,
|
||||
zone_keys, &nkeys);
|
||||
|
|
|
|||
|
|
@ -47,8 +47,7 @@ ISC_RUN_TEST_IMPL(symtab_grow) {
|
|||
|
||||
UNUSED(state);
|
||||
|
||||
result = isc_symtab_create(mctx, 3, undefine, NULL, false, &st);
|
||||
assert_int_equal(result, ISC_R_SUCCESS);
|
||||
isc_symtab_create(mctx, 3, undefine, NULL, false, &st);
|
||||
assert_non_null(st);
|
||||
|
||||
/* Nothing should be in the table yet */
|
||||
|
|
|
|||
|
|
@ -72,17 +72,13 @@ dns_test_makeview(const char *name, bool with_dispatchmgr, bool with_cache,
|
|||
}
|
||||
}
|
||||
|
||||
result = dns_view_create(mctx, loopmgr, dispatchmgr, dns_rdataclass_in,
|
||||
name, &view);
|
||||
dns_view_create(mctx, loopmgr, dispatchmgr, dns_rdataclass_in, name,
|
||||
&view);
|
||||
|
||||
if (dispatchmgr != NULL) {
|
||||
dns_dispatchmgr_detach(&dispatchmgr);
|
||||
}
|
||||
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
return result;
|
||||
}
|
||||
|
||||
if (with_cache) {
|
||||
result = dns_cache_create(loopmgr, dns_rdataclass_in, "", mctx,
|
||||
&cache);
|
||||
|
|
@ -129,10 +125,7 @@ dns_test_makezone(const char *name, dns_zone_t **zonep, dns_view_t *view,
|
|||
if (result != ISC_R_SUCCESS) {
|
||||
goto detach_zone;
|
||||
}
|
||||
result = dns_zone_setorigin(zone, origin);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
goto detach_zone;
|
||||
}
|
||||
dns_zone_setorigin(zone, origin);
|
||||
|
||||
/*
|
||||
* If requested, create a view.
|
||||
|
|
|
|||
|
|
@ -396,11 +396,7 @@ create_qctx_for_client(ns_client_t *client, query_ctx_t **qctxp) {
|
|||
|
||||
isc_nmhandle_detach(&client->reqhandle);
|
||||
|
||||
if (*qctxp == NULL) {
|
||||
return ISC_R_NOMEMORY;
|
||||
} else {
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
return ISC_R_SUCCESS;
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
|
|
|
|||
Loading…
Reference in a new issue