server.c revision 24231e53a5c3079431f84dcddfee1e761fec7329
279c6ec074be17dce62dd1b2c6ed7c2cc56a7b78David Lawrence * Copyright (C) 1999-2017 Internet Systems Consortium, Inc. ("ISC")
281bfa2a98f1d1721538086e1b550185559f1d8bMark Andrews * This Source Code Form is subject to the terms of the Mozilla Public
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence * License, v. 2.0. If a copy of the MPL was not distributed with this
279c6ec074be17dce62dd1b2c6ed7c2cc56a7b78David Lawrence * file, You can obtain one at http://mozilla.org/MPL/2.0/.
ed71ea51c6ecb5d7d659b6e6a20f6b3f5c2678c6David Lawrence#endif /* HAVE_GEOIP */
a14613fce99dee3cad5bf842fd6be78f8e463582Brian Wellington#define configure_newzones configure_newzones_db
a14613fce99dee3cad5bf842fd6be78f8e463582Brian Wellington#else /* HAVE_LMDB */
489b76292622f5bc18bf1a18845f8166a73bd797Brian Wellington#define configure_newzones configure_newzones_file
bff8ac12a8c099257bdbf7d0c55d2d5b77591926Mark Andrews#endif /* HAVE_LMDB */
f54d0c9c6e65de367d4ef08f51d22a2fb4c56208Mark Andrews#endif /* TUNE_LARGE */
f54d0c9c6e65de367d4ef08f51d22a2fb4c56208Mark Andrews * Check an operation for failure. Assumes that the function
f54d0c9c6e65de367d4ef08f51d22a2fb4c56208Mark Andrews * using it has a 'result' variable and a 'cleanup' label.
f54d0c9c6e65de367d4ef08f51d22a2fb4c56208Mark Andrews } while (0) \
2b50e0d877db0d668f363d50914232f82ad8c454Mark Andrews } while (0) \
134ba0e08a0ae9a564a8d8628fc633377d3fc239Bob Halley } while (0) \
203596d27c225ea195e4faad4f19388c6e96ac80Bob Halley * Maximum ADB size for views that share a cache. Use this limit to suppress
f54d0c9c6e65de367d4ef08f51d22a2fb4c56208Mark Andrews * the total of memory footprint, which should be the main reason for sharing
f54d0c9c6e65de367d4ef08f51d22a2fb4c56208Mark Andrews * a cache. Only effective when a finite max-cache-size is specified.
f54d0c9c6e65de367d4ef08f51d22a2fb4c56208Mark Andrews * This is currently defined to be 8MB.
fd837244be31850a764863688bce11df9ce972f4Andreas Gustafsson#define MAX_ADB_SIZE_FOR_CACHESHARE 8388608U
f54d0c9c6e65de367d4ef08f51d22a2fb4c56208Mark Andrews * Configuration context to retain for each view that allows
f54d0c9c6e65de367d4ef08f51d22a2fb4c56208Mark Andrews * new zones to be added at runtime.
f54d0c9c6e65de367d4ef08f51d22a2fb4c56208Mark Andrewstypedef struct ns_cfgctx {
} ns_cfgctx_t;
typedef struct catz_chgzone_event {
const char *empty_zones[] = {
ISC_PLATFORM_NORETURN_PRE static void
static isc_result_t
static isc_result_t
static isc_result_t
static isc_result_t
static isc_result_t
static isc_result_t
static isc_result_t
static inline isc_result_t
static isc_result_t
static isc_result_t
static inline isc_result_t
#ifdef HAVE_LMDB
static isc_result_t
static isc_result_t
static isc_result_t
static isc_result_t
static isc_result_t
static isc_result_t
static isc_result_t
static isc_result_t
return (ISC_R_SUCCESS);
return (result);
static isc_result_t
return (ISC_R_SUCCESS);
return (result);
static isc_result_t
isc_buffer_t b;
const char *str;
return (ISC_R_SUCCESS);
return (ISC_R_SUCCESS);
return (result);
* we have foo.example.com and bar.example.com, we'd get a match
* for baz.example.com, which is not the expected result.
goto cleanup;
return (result);
return (result);
static isc_result_t
isc_region_t r;
if (managed) {
const char *initmethod;
goto cleanup;
&viewclass));
return (ISC_R_SUCCESS);
return (result);
static isc_result_t
goto cleanup;
return (result);
static isc_boolean_t
return (ISC_FALSE);
static isc_result_t
const char *directory;
return (ISC_R_SUCCESS);
&view_keys);
return (ISC_R_UNEXPECTED);
return (ISC_R_UNEXPECTED);
&builtin_keys);
&builtin_keys);
mctx));
goto cleanup;
goto cleanup;
goto cleanup;
} else if (need_mkey_dir) {
goto cleanup;
goto cleanup;
return (result);
static isc_result_t
const char *str;
isc_buffer_t b;
return (result);
static isc_result_t
switch (af) {
case AF_INET:
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;
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;
goto cleanup;
goto cleanup;
goto cleanup;
return (ISC_R_SUCCESS);
return (result);
#ifdef HAVE_DLOPEN
static isc_result_t
return (result);
static isc_result_t
const char *str;
isc_buffer_t b;
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);
static isc_result_t
for (i = 0; i < dbtypec; i++)
return (result);
static isc_result_t
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
return (result);
static isc_result_t
const char *contact)
const unsigned char *s6;
isc_buffer_t b;
while (prefixlen > 0) {
return (result);
static isc_result_t
return (result);
static isc_result_t
return (result);
static isc_result_t
const char *str;
return (ISC_R_FAILURE);
return (ISC_R_NOMEMORY);
return (result);
return (result);
return (DNS_R_EMPTYLABEL);
return (result);
return (result);
return (result);
return (result);
return (result);
return (result);
return (result);
return (result);
return (result);
return (ISC_R_SUCCESS);
static isc_result_t
return (ISC_R_SUCCESS);
return (result);
return (result);
if (*old_rpz_okp) {
return (ISC_R_SUCCESS);
goto cleanup;
nameb);
goto cleanup;
nameb);
goto cleanup;
nameb);
goto cleanup;
nameb);
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
const char * file;
goto cleanup;
cname);
goto cleanup;
cname);
goto cleanup;
static isc_result_t
switch (type) {
case DNS_EVENT_CATZADDZONE:
case DNS_EVENT_CATZMODZONE:
case DNS_EVENT_CATZDELZONE:
REQUIRE(0);
sizeof(*event));
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
static isc_result_t
static isc_result_t
static isc_result_t
static isc_result_t
const char *str;
goto cleanup;
goto cleanup;
str);
goto cleanup;
return (result);
static isc_result_t
return (ISC_R_SUCCESS);
return (result);
if (!(cond)) { \
goto cleanup; \
static isc_result_t
int min_entries, i, j;
return (result);
i, min_entries);
i, DNS_RRL_MAX_PREFIX);
return (ISC_R_SUCCESS);
return (result);
static isc_result_t
return (result);
static isc_result_t
isc_buffer_t b;
&ns, &b));
return (result);
static isc_result_t
const char *str;
int order;
unsigned int nlabels;
0, NULL));
0, NULL));
unsigned int typec;
const char **dbargv;
empty_dbtype));
return (result);
#ifdef HAVE_DNSTAP
static isc_result_t
return (ISC_R_SUCCESS);
const char *str;
&obj);
&obj);
&obj);
&obj);
&obj);
return (ISC_R_SUCCESS);
return (result);
static isc_result_t
create_mapped_acl(void) {
return (result);
return (result);
static isc_result_t
unsigned int dlzargc;
char **dlzargv;
unsigned int cleaning_interval;
const char *str;
unsigned int resopts = 0;
max_acache_size = 0;
ISC_FALSE));
if (s == NULL) {
goto cleanup;
&dlzargv, 0);
goto cleanup;
&dlzdb);
goto cleanup;
goto cleanup;
max_cache_size = 0;
if (totalphys == 0) {
INSIST(0);
unsigned int prefixlen;
unsigned int dns64options = 0;
&prefixlen);
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
&pview);
goto cleanup;
zero_no_soattl)) {
&cache));
goto cleanup;
== NULL)));
== NULL)));
goto cleanup;
max_adb_size = 0;
if (max_cache_size != 0U) {
if (max_adb_size == 0U)
isc_result_t r;
r = DNS_R_DROP;
r = DNS_R_SERVFAIL;
INSIST(0);
dns_quotatype_server, r);
if (need_hints)
goto cleanup;
INSIST(0);
INSIST(0);
* configured in named.conf.
isc_result_t r;
r = DNS_R_DROP;
r = DNS_R_SERVFAIL;
INSIST(0);
dns_quotatype_zone, r);
#ifdef ALLOW_FILTER_AAAA
INSIST(0);
INSIST(0);
const char *dom;
dns_fixedname_init(&f);
0, NULL));
#ifdef HAVE_DLOPEN
const char *empty;
int empty_zone = 0;
0, NULL));
0, NULL));
INSIST(0);
&pview);
goto cleanup;
statlevel));
goto cleanup;
NULL));
#ifdef HAVE_DNSTAP
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);
return (ISC_R_RANGE);
goto cleanup;
INSIST(0);
goto cleanup;
return (result);
static isc_result_t
const char *viewname;
&viewclass));
viewname);
return (result);
static isc_result_t
return (result);
return (result);
return (ISC_R_SUCCESS);
static isc_result_t
return (result);
return (ISC_R_EXISTS);
return (result);
return (result);
return (result);
#ifdef HAVE_GEOIP
return (ISC_R_SUCCESS);
static isc_result_t
const char *zname;
const char *ztypestr;
goto cleanup;
goto cleanup;
&otherview);
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
zname);
goto cleanup;
&only);
zname);
goto cleanup;
forwardtype));
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
&zone));
zone));
goto cleanup;
if (!modify) {
goto cleanup;
goto cleanup;
goto cleanup;
zname);
goto cleanup;
if (zone_is_catz)
forwardtype));
if (!modify)
if (zone_is_catz) {
return (result);
static isc_result_t
&pview);
return (result);
return (ISC_R_SUCCESS);
return (result);
static isc_result_t
const char *directory;
return (result);
return (ISC_R_SUCCESS);
static isc_result_t
#ifdef HAVE_GEOIP
#ifdef HAVE_GEOIP
return (result);
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;
} ns_tat_t;
cid(const void *a, const void *b) {
struct dotat_arg {
label[0] = 0;
if (m < 0 || (unsigned)m > r.length)
isc_textregion_consume(&r, m);
if (m < 0 || (unsigned)m > r.length)
isc_textregion_consume(&r, m);
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:
case dns_zone_staticstub:
case dns_zone_redirect:
return (ISC_R_SUCCESS);
static isc_result_t
return (result);
&tsigkey));
goto cleanup;
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);
#ifndef HAVE_LMDB
static isc_result_t
*num_zonesp = 0;
return (ISC_R_SUCCESS);
int num_zones;
return (result);
static isc_result_t
*num_zonesp = n;
*num_zonesp = 0;
return (ISC_R_SUCCESS);
static isc_result_t
int *num_zones)
#ifdef HAVE_LMDB
mapsize);
return (ISC_R_FAILURE);
mapsize);
return (ISC_R_FAILURE);
if (!allow) {
const cfg_listelt_t *e =
if (e != NULL)
if (!allow) {
*num_zones = 0;
return (ISC_R_SUCCESS);
return (ISC_R_NOMEMORY);
return (result);
return (result);
const char *zname;
#ifndef HAVE_LMDB
static isc_result_t
return (ISC_R_SUCCESS);
return (result);
static isc_result_t
const char *zone_name;
const char *zone_config;
goto cleanup;
goto cleanup;
goto cleanup;
return (result);
static isc_result_t
int status;
return (ISC_R_SUCCESS);
return (ISC_R_SUCCESS);
if (status != 0) {
goto cleanup;
goto cleanup;
if (status != 0) {
goto cleanup2;
&zoneconf);
goto cleanup2;
goto cleanup2;
goto cleanup2;
return (result);
static isc_result_t
int status;
isc_buffer_t b;
if (status != 0)
return (result);
static isc_result_t
if (!first_time) {
return (ISC_R_SUCCESS);
return (ISC_R_SUCCESS);
} else if (ns_g_forcelock) {
filename);
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
return (ISC_R_SUCCESS);
return (ISC_R_FAILURE);
static isc_result_t
int num_zones = 0;
unsigned int maxsocks;
if (first_time) {
filename);
* option where the above parsing failed, parse resolv.conf.
if (ns_g_lwresdonly &&
&config);
&bindkeys_parser));
if (!exclusive) {
maxsocks = 0;
if (maxsocks != 0) {
reserved = 0;
#ifdef HAVE_GEOIP
char *dir;
&udpport_high),
if (!ns_g_disable4) {
&udpport_high),
if (!ns_g_disable6) {
if (ns_g_port != 0) {
&listenon);
} else if (!ns_g_lwresdonly) {
listenon);
&listenon);
} else if (!ns_g_lwresdonly) {
listenon);
goto cleanup;
if (interface_interval == 0) {
if (heartbeat_interval == 0) {
} else if (ns_g_lwresdonly) {
int nzf_num_zones;
int nzf_num_zones;
if (first_time) {
#ifdef PATH_RANDOMDEV
#ifdef PATH_RANDOMDEV
&ns_g_entropy);
#ifdef HAVE_LMDB
if (first_time) {
if (first_time) {
#ifdef HAVE_LMDB
if (first_time) {
* files specified in named.conf get created by the
if (ns_g_logstderr) {
goto cleanup;
if (first_time) {
&categories);
const char *str;
} else if (ns_g_memstatistics) {
INSIST(0);
INSIST(0);
isc_buffer_t b;
unsigned int usedlength;
goto cleanup;
case ns_cookiealg_aes:
case ns_cookiealg_sha1:
case ns_cookiealg_sha256:
NULL,
goto cleanup;
if (exclusive) {
return (result);
static isc_result_t
unsigned int refs;
if (refs != 0)
return (ISC_R_SUCCESS);
if (reconfig) {
return (ISC_R_SUCCESS);
static isc_result_t
unsigned int refs = 0;
return (ISC_R_NOMEMORY);
goto cleanup;
goto cleanup;
if (refs == 0) {
} else if (init) {
return (result);
if (ns_g_lwresdonly)
ISC_TRUE),
#ifdef ENABLE_AFL
if (flush)
#ifdef HAVE_DNSTAP
#ifdef HAVE_GEOIP
#ifdef HAVE_GEOIP
sizeof(isc_event_t));
#ifdef HAVE_DNSTAP
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);
&token);
switch (result) {
case ISC_R_NOMORE:
case ISC_R_SUCCESS:
case ISC_R_NOSPACE:
return (NULL);
return (NULL);
return (NULL);
static isc_result_t
char *ptr;
char *classtxt;
if (skip) {
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_SUCCESS);
zonebuf);
zonebuf);
goto report;
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 (result);
return (result);
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_SUCCESS);
return (result);
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_SUCCESS);
return (ISC_R_FAILURE);
char *ptr;
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_NOTFOUND);
return (ISC_R_SUCCESS);
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 (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);
if (!found) {
return (result);
goto nextview;
return (ISC_R_SUCCESS);
return (result);
char *ptr;
return (ISC_R_UNEXPECTEDEND);
return (result);
return (result);
char *ptr;
char *endp;
long newlevel;
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_RANGE);
return (ISC_R_SUCCESS);
char *ptr;
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_UNEXPECTEDEND);
return (DNS_R_SYNTAX);
if (set) {
if (!first)
if (!set)
else if (changed)
return (result);
char *ptr;
return (ISC_R_UNEXPECTEDEND);
ptr);
if (!found) {
return (result);
isc_buffer_t b;
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_UNEXPECTEDEND);
return (result);
target);
if (!found)
return (result);
unsigned int automatic;
sizeof(boottime));
sizeof(configtime));
#ifdef ISC_PLATFORM_USETHREADS
return (ISC_R_SUCCESS);
return (result);
char *ptr;
unsigned long count;
return (ISC_R_UNEXPECTEDEND);
for (i = 0; i < count; i++)
return (result);
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;
return (ISC_R_UNEXPECTEDEND);
&foundkeys);
return (result);
return (result);
static isc_result_t
unsigned int *foundkeys)
const char *viewname;
origin);
return (ISC_R_SUCCESS);
return (result);
sizeof(creatorstr));
if (*foundkeys != 0)
if (*foundkeys != 0)
(*foundkeys)++;
return (ISC_R_SUCCESS);
return (result);
unsigned int foundkeys = 0;
&foundkeys);
return (result);
&foundkeys);
return (result);
if (foundkeys == 0)
return (result);
char *ptr;
return (ISC_R_UNEXPECTEDEND);
return (result);
return (DNS_R_NOTMASTER);
return (result);
static isc_result_t
char *journal;
if (cleanup) {
return (result);
return (result);
return (tresult);
sizeof(classstr));
return (result);
return (result);
return (tresult);
return (DNS_R_NOTMASTER);
return (DNS_R_NOTDYNAMIC);
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
#ifndef HAVE_LMDB
static isc_result_t
return (result);
static isc_result_t
if (offset == 0)
if (offsetok) {
offset);
return (result);
static isc_result_t
return (result);
goto cleanup;
return (result);
return (result);
static isc_result_t
int status;
goto cleanup;
goto cleanup;
goto cleanup;
if (status != 0) {
goto cleanup;
if (status != 0) {
return (result);
static isc_result_t
int status;
if (status != 0) {
return (ISC_R_FAILURE);
if (status != 0) {
return (result);
static isc_result_t
int status;
if (status != 0) {
goto cleanup;
if (status != 0) {
goto cleanup;
if (status != 0) {
return (ISC_R_FAILURE);
return (ISC_R_SUCCESS);
int ret;
dbpath);
if (have_dbpath) {
static isc_result_t
int status;
return (ISC_R_SUCCESS);
if (status != 0) {
if (status != 0) {
if (status != 0) {
return (result);
static isc_result_t
int status;
if (commit) {
if (status != 0)
return (result);
static isc_result_t
int status;
goto cleanup;
if (status != 0) {
goto cleanup;
return (result);
static isc_result_t
int status, n;
goto cleanup;
goto cleanup;
goto cleanup;
const char *origin;
isc_buffer_t b;
goto cleanup;
goto cleanup;
if (status != 0) {
goto cleanup;
return (result);
static isc_result_t
const char *bn;
INSIST(0);
&view);
goto cleanup;
goto cleanup;
return (ISC_R_SUCCESS);
return (result);
static isc_result_t
const char *zn;
cfg_listelt_t *e;
return (result);
static isc_result_t
#ifndef HAVE_LMDB
goto cleanup;
goto cleanup;
#ifndef HAVE_LMDB
goto cleanup;
goto cleanup;
goto cleanup;
goto cleanup;
#ifndef HAVE_LMDB
cfg_obj_t *z;
goto cleanup;
#ifdef HAVE_LMDB
#ifndef HAVE_LMDB
return (result);
static isc_result_t
#ifndef HAVE_LMDB
cfg_obj_t *z;
goto cleanup;
#ifndef HAVE_LMDB
#ifndef HAVE_LMDB
goto cleanup;
goto cleanup;
goto cleanup;
#ifndef HAVE_LMDB
if (added) {
goto cleanup;
if (!added) {
NULL);
NULL);
goto cleanup;
goto cleanup;
#ifndef HAVE_LMDB
if (added) {
#ifdef HAVE_LMDB
goto cleanup;
if (exclusive)
#ifndef HAVE_LMDB
return (result);
const char *zonename;
#ifdef HAVE_LMDB
goto cleanup;
goto cleanup;
if (addzone)
return (result);
static isc_boolean_t
if (first)
return (ISC_FALSE);
return (first);
} ns_dzctx_t;
#ifdef HAVE_LMDB
#ifdef HAVE_LMDB
NULL);
NULL);
const char *file;
#ifdef HAVE_LMDB
const char *ptr;
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_UNEXPECTEDEND);
goto cleanup;
goto cleanup;
if (!added) {
} else if (cleanup) {
const char *file;
return (result);
static const cfg_obj_t *
const char *map_key_for_list,
const char *name)
const char *vname;
return (obj);
#ifdef HAVE_LMDB
goto cleanup;
goto cleanup;
#ifndef HAVE_LMDB
#ifdef HAVE_LMDB
if (exclusive)
return (result);
static isc_result_t
} rnd;
isc_region_t r;
return (ISC_R_RANGE);
return (ISC_R_SUCCESS);
const char *ptr;
size_t n;
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_UNEXPECTEDEND);
hash = 0;
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_UNEXPECTEDEND);
if (n == sizeof(nbuf))
return (ISC_R_NOSPACE);
return (ISC_R_BADNUMBER);
return (ISC_R_RANGE);
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_UNEXPECTEDEND);
if (clear) {
} else if (chain) {
ISC_TRUE));
} else if (setserial) {
} else if (list) {
goto cleanup;
if (!first)
if (!first)
return (result);
static isc_result_t
return (ISC_R_NOSPACE);
return (ISC_R_SUCCESS);
static inline isc_result_t
static isc_result_t
return (ISC_R_NOSPACE);
return (ISC_R_SUCCESS);
static inline isc_result_t
return (putuint8(b, 0));
int nfiles = 0;
goto cleanup;
switch (zonetype) {
case dns_zone_master:
case dns_zone_slave:
case dns_zone_stub:
case dns_zone_staticstub:
case dns_zone_redirect:
case dns_zone_key:
case dns_zone_dlz:
if (hasraw)
if (hasraw) {
DNS_ZONEKEY_MAINTAIN) != 0);
sizeof(kbuf));
sizeof(rtbuf));
for (i = 0; i < nfiles; i++) {
if (hasraw) {
if (secure) {
if (hasraw)
if (maintain) {
} else if (allow)
if (dynamic) {
if (frozen)
for (i = 0; i < nfiles; i++)
return (result);
static inline isc_boolean_t
size_t l;
return (ISC_FALSE);
cmd++;
return (ISC_FALSE);
return (ISC_TRUE);
isc_time_t t;
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_UNEXPECTEDEND);
ntattl = 0;
if (dump) {
goto cleanup;
if (readonly) {
return (ISC_R_UNEXPECTEDEND);
isc_buffer_t b;
if (!ttlset)
if (ntattl != 0) {
if (excl)
return (result);
return (ISC_R_SUCCESS);
return (ISC_R_SUCCESS);
static isc_result_t
return (result);
static isc_result_t
isc_region_t r;
isc_time_t t;
sizeof(tbuf));
else if (revoked)
return (result);
static isc_result_t
isc_time_t t;
if (isc_time_isepoch(&t)) {
return (result);
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_UNEXPECTEDEND);
goto cleanup;
goto cleanup;
goto cleanup;
switch (opt) {
case REFRESH:
case STATUS:
if (!first)
case SYNC:
INSIST(0);
if (!found)
return (result);
#if HAVE_DNSTAP
char *ptr;
int backups = 0;
return (ISC_R_NOTFOUND);
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_UNEXPECTEDEND);
return (ISC_R_BADNUMBER);
return (DNS_R_SYNTAX);
return (result);
return (ISC_R_NOTIMPLEMENTED);