server.c revision 21991bd14e8b59000dfc2acf2ce614596cf28cba
7d32c065c7bb56f281651ae3dd2888f32ce4f1d9Bob Halley * Copyright (C) 2004-2010 Internet Systems Consortium, Inc. ("ISC")
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence * Copyright (C) 1999-2003 Internet Software Consortium.
1ccbfca64ae86ace521053773001cb995352f96fBob Halley * Permission to use, copy, modify, and/or distribute this software for any
1ccbfca64ae86ace521053773001cb995352f96fBob Halley * purpose with or without fee is hereby granted, provided that the above
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence * copyright notice and this permission notice appear in all copies.
15a44745412679c30a6d022733925af70a38b715David Lawrence * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
15a44745412679c30a6d022733925af70a38b715David Lawrence * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15a44745412679c30a6d022733925af70a38b715David Lawrence * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
15a44745412679c30a6d022733925af70a38b715David Lawrence * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15a44745412679c30a6d022733925af70a38b715David Lawrence * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15a44745412679c30a6d022733925af70a38b715David Lawrence * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15a44745412679c30a6d022733925af70a38b715David Lawrence * PERFORMANCE OF THIS SOFTWARE.
0deebcd15ad440c7ecaaa77f8e06232b331aae79Mark Andrews/* $Id: server.c,v 1.565 2010/05/14 03:24:24 marka Exp $ */
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley * Check an operation for failure. Assumes that the function
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff * using it has a 'result' variable and a 'cleanup' label.
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington } while (0) \
1ccbfca64ae86ace521053773001cb995352f96fBob Halley } while (0) \
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley * Maximum ADB size for views that share a cache. Use this limit to suppress
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley * the total of memory footprint, which should be the main reason for sharing
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley * a cache. Only effective when a finite max-cache-size is specified.
1ccbfca64ae86ace521053773001cb995352f96fBob Halley * This is currently defined to be 8MB.
1ccbfca64ae86ace521053773001cb995352f96fBob Halley * These zones should not leak onto the Internet.
1ccbfca64ae86ace521053773001cb995352f96fBob Halleystatic const struct {
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley const char *zone;
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence /* RFC 1918 */
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley /* RFC 5735 and RFC 5737 */
1ccbfca64ae86ace521053773001cb995352f96fBob Halley { "0.IN-ADDR.ARPA", ISC_FALSE }, /* THIS NETWORK */
1ccbfca64ae86ace521053773001cb995352f96fBob Halley { "127.IN-ADDR.ARPA", ISC_FALSE }, /* LOOPBACK */
b3e2e7c4d6b5c5ee90ba5bb775d635834dccec81Bob Halley { "254.169.IN-ADDR.ARPA", ISC_FALSE }, /* LINK LOCAL */
b3e2e7c4d6b5c5ee90ba5bb775d635834dccec81Bob Halley { "2.0.192.IN-ADDR.ARPA", ISC_FALSE }, /* TEST NET */
b3e2e7c4d6b5c5ee90ba5bb775d635834dccec81Bob Halley { "100.51.198.IN-ADDR.ARPA", ISC_FALSE }, /* TEST NET 2 */
b3e2e7c4d6b5c5ee90ba5bb775d635834dccec81Bob Halley { "113.0.203.IN-ADDR.ARPA", ISC_FALSE }, /* TEST NET 3 */
b3e2e7c4d6b5c5ee90ba5bb775d635834dccec81Bob Halley { "255.255.255.255.IN-ADDR.ARPA", ISC_FALSE }, /* BROADCAST */
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence /* Local IPv6 Unicast Addresses */
b3e2e7c4d6b5c5ee90ba5bb775d635834dccec81Bob Halley { "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA", ISC_FALSE },
b3e2e7c4d6b5c5ee90ba5bb775d635834dccec81Bob Halley { "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA", ISC_FALSE },
b3e2e7c4d6b5c5ee90ba5bb775d635834dccec81Bob Halley /* LOCALLY ASSIGNED LOCAL ADDRESS SCOPE */
b3e2e7c4d6b5c5ee90ba5bb775d635834dccec81Bob Halley { "8.E.F.IP6.ARPA", ISC_FALSE }, /* LINK LOCAL */
b3e2e7c4d6b5c5ee90ba5bb775d635834dccec81Bob Halley { "9.E.F.IP6.ARPA", ISC_FALSE }, /* LINK LOCAL */
fe12eb4fc27f49c6b3e42b1d7a6b40310e41e6dfBrian Wellington { "A.E.F.IP6.ARPA", ISC_FALSE }, /* LINK LOCAL */
fe12eb4fc27f49c6b3e42b1d7a6b40310e41e6dfBrian Wellington { "B.E.F.IP6.ARPA", ISC_FALSE }, /* LINK LOCAL */
fe12eb4fc27f49c6b3e42b1d7a6b40310e41e6dfBrian Wellington /* Example Prefix, RFC 3849. */
fe12eb4fc27f49c6b3e42b1d7a6b40310e41e6dfBrian Wellington /* ORCHID Prefix, RFC 4843. */
a99979c686ae04efd55ba8f0aacf32493b4aa7faBob Halleyfatal(const char *msg, isc_result_t result) ISC_PLATFORM_NORETURN_POST;
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halleyns_server_reload(isc_task_t *task, isc_event_t *event);
a99979c686ae04efd55ba8f0aacf32493b4aa7faBob Halleyns_listenelt_fromconfig(const cfg_obj_t *listener, const cfg_obj_t *config,
48481c9b6e19501457bcbc2995555412f352b99fBob Halleyns_listenlist_fromconfig(const cfg_obj_t *listenlist, const cfg_obj_t *config,
48481c9b6e19501457bcbc2995555412f352b99fBob Halleyconfigure_forward(const cfg_obj_t *config, dns_view_t *view, dns_name_t *origin,
48481c9b6e19501457bcbc2995555412f352b99fBob Halley const cfg_obj_t *forwarders, const cfg_obj_t *forwardtype);
48481c9b6e19501457bcbc2995555412f352b99fBob Halleyconfigure_alternates(const cfg_obj_t *config, dns_view_t *view,
7d44d8aacda98eb2b526af34757a6bbcc97cd388Bob Halleyconfigure_zone(const cfg_obj_t *config, const cfg_obj_t *zconfig,
7d44d8aacda98eb2b526af34757a6bbcc97cd388Bob Halley const cfg_obj_t *vconfig, isc_mem_t *mctx, dns_view_t *view,
7d44d8aacda98eb2b526af34757a6bbcc97cd388Bob Halleyadd_keydata_zone(dns_view_t *view, isc_mem_t *mctx);
7d44d8aacda98eb2b526af34757a6bbcc97cd388Bob Halleyend_reserved_dispatches(ns_server_t *server, isc_boolean_t all);
7d44d8aacda98eb2b526af34757a6bbcc97cd388Bob Halley * Configure a single view ACL at '*aclp'. Get its configuration from
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff * 'vconfig' (for per-view configuration) and maybe from 'config'
7d44d8aacda98eb2b526af34757a6bbcc97cd388Bob Halleyconfigure_view_acl(const cfg_obj_t *vconfig, const cfg_obj_t *config,
7d44d8aacda98eb2b526af34757a6bbcc97cd388Bob Halley cfg_aclconfctx_t *actx, isc_mem_t *mctx, dns_acl_t **aclp)
7d44d8aacda98eb2b526af34757a6bbcc97cd388Bob Halley * No value available. *aclp == NULL.
0deebcd15ad440c7ecaaa77f8e06232b331aae79Mark Andrews * If the ACL is given in an optional tuple, retrieve it.
27ffc5a69779c3c7224580a89aa2bf0a3ff8c16dBob Halley * The parser should have ensured that a valid object be
7d44d8aacda98eb2b526af34757a6bbcc97cd388Bob Halley result = cfg_acl_fromconfig(aclobj, config, ns_g_lctx,
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff * Configure a sortlist at '*aclp'. Essentially the same as
bad8294771671374e811afac79a20cc6927e3e2fBob Halley * configure_view_acl() except it calls cfg_acl_fromconfig with a
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafsson * nest_level value of 2.
5fc7ba3e1ac5d72239e9971e0f469dd5796738f9Andreas Gustafssonconfigure_view_sortlist(const cfg_obj_t *vconfig, const cfg_obj_t *config,
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence maps[i++] = cfg_tuple_get(vconfig, "options");
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence * Use a nest level of 3 for the "top level" of the sortlist;
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley * this means each entry in the top three levels will be stored
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley * as lists of separate, nested ACLs, rather than merged together
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley * into IP tables as is usually done with ACLs.
1ccbfca64ae86ace521053773001cb995352f96fBob Halley result = cfg_acl_fromconfig(aclobj, config, ns_g_lctx,
b8862d5130b88e7b1a257997d7909f769716d51cBob Halleyconfigure_view_nametable(const cfg_obj_t *vconfig, const cfg_obj_t *config,
b8862d5130b88e7b1a257997d7909f769716d51cBob Halley const char *str;
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley * No value available. *rbtp == NULL.
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff result = dns_rbt_create(mctx, NULL, NULL, rbtp);
1ccbfca64ae86ace521053773001cb995352f96fBob Halley CHECK(dns_name_fromtext(name, &b, dns_rootname, 0, NULL));
1ccbfca64ae86ace521053773001cb995352f96fBob Halley * We don't need the node data, but need to set dummy data to
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graff * avoid a partial match with an empty node. For example, if
ced5499494f8afba75c056eb2f3933de24a5f360Bob Halley * we have foo.example.com and bar.example.com, we'd get a match
63e6086ef99eca768a4cd69871038181251905bbBob Halley * for baz.example.com, which is not the expected result.
ced5499494f8afba75c056eb2f3933de24a5f360Bob Halley * We simply use (void *)1 as the dummy data.
d2615909402705135d0560ad9d11f4302053c17cBob Halley result = dns_rbt_addname(*rbtp, name, (void *)1);
e7e2e948e37a0eeb93b0d4f2390f38ed2d9dcd82Bob Halley "failed to add %s for %s: %s",
732e0731dec1922747bb3b3147cf2c3d16b22eaaBob Halleydstkey_fromconfig(const cfg_obj_t *vconfig, const cfg_obj_t *key,
ced5499494f8afba75c056eb2f3933de24a5f360Bob Halley isc_boolean_t managed, dst_key_t **target, isc_mem_t *mctx)
9acbfdb6a2f70d84107ccd99b24a2e523a48259bBob Halley flags = cfg_obj_asuint32(cfg_tuple_get(key, "flags"));
9acbfdb6a2f70d84107ccd99b24a2e523a48259bBob Halley proto = cfg_obj_asuint32(cfg_tuple_get(key, "protocol"));
9acbfdb6a2f70d84107ccd99b24a2e523a48259bBob Halley alg = cfg_obj_asuint32(cfg_tuple_get(key, "algorithm"));
9acbfdb6a2f70d84107ccd99b24a2e523a48259bBob Halley keynamestr = cfg_obj_asstring(cfg_tuple_get(key, "name"));
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley initmethod = cfg_obj_asstring(cfg_tuple_get(key, "init"));
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley if (strcasecmp(initmethod, "initial-key") != 0) {
1ccbfca64ae86ace521053773001cb995352f96fBob Halley "managed key '%s': "
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley "invalid initialization method '%s'",
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley const cfg_obj_t *classobj = cfg_tuple_get(vconfig, "class");
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley CHECK(ns_config_getclass(classobj, dns_rdataclass_in,
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley * The key data in keystruct is not dynamically allocated.
6e8ec359a45b7e991d7bcc97ed8547eac725a506Bob Halley isc_buffer_init(&keydatabuf, keydata, sizeof(keydata));
6e8ec359a45b7e991d7bcc97ed8547eac725a506Bob Halley isc_buffer_init(&rrdatabuf, rrdata, sizeof(rrdata));
097c31fdea44383b7ce95345a66489040ad5e333Bob Halley keystr = cfg_obj_asstring(cfg_tuple_get(key, "key"));
097c31fdea44383b7ce95345a66489040ad5e333Bob Halley CHECK(isc_base64_decodestring(keystr, &keydatabuf));
097c31fdea44383b7ce95345a66489040ad5e333Bob Halley r.length > 1 && r.base[0] == 1 && r.base[1] == 3)
097c31fdea44383b7ce95345a66489040ad5e333Bob Halley "%s key '%s' has a weak exponent",
8c65ae482a50bed3184026301c6f99f32a683dbfBob Halley isc_buffer_init(&namebuf, keynamestr, strlen(keynamestr));
8c65ae482a50bed3184026301c6f99f32a683dbfBob Halley CHECK(dns_name_fromtext(keyname, &namebuf, dns_rootname, 0, NULL));
8c65ae482a50bed3184026301c6f99f32a683dbfBob Halley CHECK(dst_key_fromdns(keyname, viewclass, &rrdatabuf,
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley "ignoring %s key for '%s': no crypto support",
732e0731dec1922747bb3b3147cf2c3d16b22eaaBob Halley "skipping %s key for '%s': %s",
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley "configuring %s key for '%s': %s",
1ccbfca64ae86ace521053773001cb995352f96fBob Halleyload_view_keys(const cfg_obj_t *keys, const cfg_obj_t *vconfig,
732e0731dec1922747bb3b3147cf2c3d16b22eaaBob Halley dns_view_t *view, isc_boolean_t managed, isc_mem_t *mctx)
efe6d8f0665b466052910e8efd4b031dc048f196Bob Halley result = dstkey_fromconfig(vconfig, key, managed,
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley CHECK(dns_keytable_add(secroots, managed, &dstkey));
b77f76be2d114ad1abecf7e6e6c1414a4ade44c1David Lawrence * Configure DNSSEC keys for a view.
7f705ac9a20e82264113e561a515d54dde5bcea3Bob Halley * The per-view configuration values and the server-global defaults are read
64e829fffb8d95e7507079767ef68327b4a7b4caBob Halley * from 'vconfig' and 'config'.
3ddd814a97de1d152ba0913c592d6e6dc83d38a6Michael Graffconfigure_view_dnsseckeys(dns_view_t *view, const cfg_obj_t *vconfig,
a7e185ff3f7db73e282bf53b9f84a95ff8f8cb27Bob Halley const cfg_obj_t *config, const cfg_obj_t *bindkeys,
a7e185ff3f7db73e282bf53b9f84a95ff8f8cb27Bob Halley /* We don't need trust anchors for the _bind view */
1ccbfca64ae86ace521053773001cb995352f96fBob Halley meta = ISC_TF(strcmp(view->name, "_meta") == 0 &&
6cac2e0f7a1ab207a64127bef11bb93404523c15Brian Wellington voptions = cfg_tuple_get(vconfig, "options");
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley (void)cfg_map_get(config, "trusted-keys", &global_keys);
a3e2ec2dfec1a8171eaf584bb957b80c04de1e0bBob Halley (void)cfg_map_get(config, "managed-keys", &global_managed_keys);
3a34b87c878990c6303358efd22265c2c5980c65Mark Andrews isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
3a34b87c878990c6303358efd22265c2c5980c65Mark Andrews "couldn't create keytable");
341323e0e7ef69f7c425cd3462afe06d0930c528Michael Graff isc_log_write(ns_g_lctx, DNS_LOGCATEGORY_SECURITY,
a6733246eafeb43755ce6d7ec3627ac4209cbccbMark Andrews "using built-in trusted-keys for view %s",
341323e0e7ef69f7c425cd3462afe06d0930c528Michael Graff * If bind.keys exists, it overrides the managed-keys
341323e0e7ef69f7c425cd3462afe06d0930c528Michael Graff * clause hard-coded in ns_g_config.
341323e0e7ef69f7c425cd3462afe06d0930c528Michael Graff (void)cfg_map_get(ns_g_config, "trusted-keys",
341323e0e7ef69f7c425cd3462afe06d0930c528Michael Graff (void)cfg_map_get(ns_g_config, "managed-keys",
341323e0e7ef69f7c425cd3462afe06d0930c528Michael Graff CHECK(load_view_keys(builtin_keys, vconfig, view,
341323e0e7ef69f7c425cd3462afe06d0930c528Michael Graff CHECK(load_view_keys(builtin_managed_keys, vconfig,
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence CHECK(load_view_keys(view_keys, vconfig, view, ISC_FALSE, mctx));
341323e0e7ef69f7c425cd3462afe06d0930c528Michael Graff CHECK(load_view_keys(global_keys, vconfig, view, ISC_FALSE, mctx));
341323e0e7ef69f7c425cd3462afe06d0930c528Michael Graff CHECK(load_view_keys(global_managed_keys, vconfig, view,
77ac297199fc44809d9628558223627c10ae3f31Brian Wellingtonmustbesecure(const cfg_obj_t *mbs, dns_resolver_t *resolver) {
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington str = cfg_obj_asstring(cfg_tuple_get(obj, "name"));
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington CHECK(dns_name_fromtext(name, &b, dns_rootname, 0, NULL));
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington value = cfg_obj_asboolean(cfg_tuple_get(obj, "value"));
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington CHECK(dns_resolver_setmustbesecure(resolver, name, value));
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington * Get a dispatch appropriate for the resolver of a given view.
77ac297199fc44809d9628558223627c10ae3f31Brian Wellingtonget_view_querysource_dispatch(const cfg_obj_t **maps,
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington * Make compiler happy.
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington result = ns_config_get(maps, "query-source", &obj);
case AF_INET6:
INSIST(0);
switch (af) {
case AF_INET:
case AF_INET6:
INSIST(0);
return (ISC_R_SUCCESS);
attrs = 0;
switch (af) {
case AF_INET:
case AF_INET6:
if (is_firstview) {
attrmask = 0;
switch (af) {
case AF_INET:
case AF_INET6:
return (ISC_R_SUCCESS);
buf);
return (result);
return (ISC_R_SUCCESS);
static isc_result_t
unsigned int mode = 0;
const char *str;
isc_buffer_t b;
return (result);
return (result);
return (result);
mode = 0;
INSIST(0);
if (addroot) {
return (result);
static isc_result_t
const char *str;
unsigned int prefixlen;
return (result);
INSIST(0);
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
return (ISC_R_SUCCESS);
return (result);
static isc_result_t
const char *str;
isc_buffer_t b;
return (result);
static isc_boolean_t
const char *str;
isc_buffer_t b;
0, NULL);
return (ISC_TRUE);
return (ISC_FALSE);
for (i = 0; i < dbtypec; i++)
static isc_result_t
if (on) {
return (result);
return (ISC_R_SUCCESS);
static ns_cache_t *
return (nsc);
return (NULL);
static isc_boolean_t
return (ISC_FALSE);
return (ISC_TRUE);
static isc_boolean_t
unsigned int new_cleaning_interval,
return (ISC_FALSE);
return (ISC_FALSE);
return (ISC_TRUE);
static isc_result_t
#ifdef DLZ
unsigned int dlzargc;
char **dlzargv;
unsigned int cleaning_interval;
const char *str;
unsigned int resopts = 0;
value);
goto cleanup;
actx));
#ifdef DLZ
if (s == NULL) {
goto cleanup;
goto cleanup;
goto cleanup;
value);
goto cleanup;
INSIST(0);
goto cleanup;
&pview);
goto cleanup;
zero_no_soattl)) {
&cache));
goto cleanup;
== NULL)));
== NULL)));
goto cleanup;
max_adb_size = 0;
if (max_cache_size != 0) {
if (max_adb_size == 0)
if (need_hints)
INSIST(0);
* configured in named.conf.
#ifdef ALLOW_FILTER_AAAA_ON_V4
INSIST(0);
const char *str;
isc_buffer_t b;
0, NULL));
isc_buffer_t b;
const char *str;
0, NULL));
name));
if (empty_zones_enable) {
const char *empty;
int empty_zone = 0;
const char *str;
NULL));
NULL));
NULL));
&forwarders);
if (logit) {
&pview);
goto cleanup;
zonestats_on));
empty_dbtype));
ISC_TRUE);
return (result);
static isc_result_t
return (result);
static isc_result_t
return (ISC_R_RANGE);
NULL));
val);
return (ISC_R_RANGE);
NULL, 0));
return (result);
static isc_result_t
return (ISC_R_RANGE);
goto cleanup;
INSIST(0);
goto cleanup;
return (result);
static isc_result_t
const char *viewname;
&viewclass);
return (ISC_R_EXISTS);
return (result);
return (result);
return (ISC_R_SUCCESS);
static isc_result_t
const char *zname;
const char *ztypestr;
goto cleanup;
return (ISC_R_FAILURE);
zname);
goto cleanup;
goto cleanup;
&only);
zname);
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
&pview);
goto cleanup;
goto cleanup;
forwardtype));
return (result);
static isc_result_t
return (ISC_R_SUCCESS);
return (result);
static isc_result_t
const char *directory;
return (result);
return (ISC_R_SUCCESS);
static isc_result_t
return (result);
goto clean;
goto clean;
return (ISC_R_SUCCESS);
return (result);
goto fail;
goto fail;
goto fail;
goto fail;
fail:
goto clean;
static unsigned int oldrequests = 0;
static isc_result_t
char *copy;
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
static isc_result_t
const char *resource;
if (positive)
if (positive)
hiport);
static isc_result_t
const char *type;
return (ISC_R_SUCCESS);
case dns_zone_master:
case dns_zone_slave:
case dns_zone_stub:
return (ISC_R_SUCCESS);
static isc_result_t
return (result);
&tsigkey));
goto cleanup;
return (ISC_R_SUCCESS);
return (result);
static isc_result_t
unsigned int algtype;
return (result);
return (result);
if (need_deleteold) {
if (need_createnew) {
goto cleanup;
goto cleanup;
return (result);
return (result);
static isc_result_t
unsigned int maxsocks;
if (first_time) {
filename);
* option where the above parsing failed, parse resolv.conf.
if (ns_g_lwresdonly &&
&config);
&bindkeys_parser));
maxsocks = 0;
if (maxsocks != 0) {
reserved = 0;
&udpport_high),
&udpport_high),
if (ns_g_port != 0)
&listenon);
} else if (!ns_g_lwresdonly) {
listenon);
&listenon);
} else if (!ns_g_lwresdonly) {
listenon);
if (interface_interval == 0) {
if (heartbeat_interval == 0) {
else if (ns_g_lwresdonly)
&aclconfctx),
if (first_time) {
#ifdef PATH_RANDOMDEV
&ns_g_entropy);
if (first_time)
* files specified in named.conf get created by the
if (ns_g_logstderr) {
if (first_time) {
&categories);
const char *str;
else if (ns_g_memstatistics)
return (result);
static isc_result_t
return (result);
static isc_result_t
return (result);
if (ns_g_lwresdonly)
ISC_TRUE),
if (flush)
sizeof(isc_event_t));
goto cleanup;
attrs = 0;
case AF_INET:
case AF_INET6:
goto cleanup;
attrmask = 0;
goto cleanup;
static isc_result_t
return (result);
static isc_result_t
return (result);
cleanup: ;
char *res;
return (res);
static isc_result_t
const char *zonetxt;
char *classtxt;
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_SUCCESS);
goto fail1;
goto fail1;
goto fail1;
return (result);
return (result);
return (ISC_R_UNEXPECTEDEND);
return (result);
return (result);
switch (result) {
case ISC_R_SUCCESS:
case DNS_R_CONTINUE:
case DNS_R_UPTODATE:
return (result);
return (ISC_R_SUCCESS);
return (result);
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_SUCCESS);
return (result);
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_SUCCESS);
return (ISC_R_FAILURE);
return (ISC_R_SUCCESS);
static isc_result_t
return (result);
goto cleanup;
return (ISC_R_SUCCESS);
return (result);
static isc_result_t
if (ns_g_port != 0) {
return (result);
return (ISC_R_RANGE);
return (result);
return (result);
return (ISC_R_SUCCESS);
return (result);
static isc_result_t
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
static isc_result_t
return (ISC_R_SUCCESS);
return (ISC_R_NOMEMORY);
return (result);
goto cleanup;
goto done;
goto resume;
goto cleanup;
goto nextzone;
goto nextzone;
goto cleanup;
goto nextview;
done:
char *ptr;
const char *sep;
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_NOMEMORY);
goto nextview;
return (ISC_R_SUCCESS);
return (result);
return (result);
char *ptr;
char *levelstr;
char *endp;
long newlevel;
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_RANGE);
return (ISC_R_SUCCESS);
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_UNEXPECTEDEND);
return (DNS_R_SYNTAX);
goto out;
if (changed)
out:
return (result);
return (ISC_R_UNEXPECTEDEND);
viewname);
if (!found) {
return (result);
isc_buffer_t b;
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_UNEXPECTEDEND);
return (result);
if (!found)
viewname);
return (result);
#ifdef ISC_PLATFORM_USETHREADS
#ifdef ISC_PLATFORM_USETHREADS
return (ISC_R_NOSPACE);
return (ISC_R_SUCCESS);
static isc_result_t
unsigned int *foundkeys)
origin);
return (ISC_R_SUCCESS);
return (result);
goto nextkey;
(*foundkeys)++;
goto again;
return (result);
return (ISC_R_SUCCESS);
unsigned int foundkeys = 0;
char *target;
char *viewname;
return (ISC_R_UNEXPECTEDEND);
&foundkeys);
return (result);
return (ISC_R_NOSPACE);
return (ISC_R_SUCCESS);
static isc_result_t
unsigned int *foundkeys)
const char *viewname;
origin);
return (ISC_R_SUCCESS);
return (result);
(*foundkeys)++;
sizeof(creatorstr));
return (ISC_R_NOSPACE);
return (result);
return (ISC_R_SUCCESS);
unsigned int foundkeys = 0;
&foundkeys);
return (result);
&foundkeys);
return (result);
if (foundkeys == 0) {
return (ISC_R_NOSPACE);
return (ISC_R_SUCCESS);
return (result);
return (DNS_R_NOTMASTER);
return (result);
char *journal;
return (result);
return (tresult);
return (DNS_R_NOTMASTER);
if (freeze) {
if (frozen) {
if (frozen) {
switch (result) {
case ISC_R_SUCCESS:
case DNS_R_UPTODATE:
case DNS_R_CONTINUE:
sizeof(classstr));
return (result);
#ifdef HAVE_LIBSCF
return (ISC_R_NOSPACE);
return (ISC_R_SUCCESS);