resolver.c revision 7dbeb5e7f067585abfb12fac314a0d2a8f0dd040
1d1d0a8384626213f99cf5b7e12aad81145c96b6pquerna * Copyright (C) 1999-2017 Internet Systems Consortium, Inc. ("ISC")
1d1d0a8384626213f99cf5b7e12aad81145c96b6pquerna * This Source Code Form is subject to the terms of the Mozilla Public
1d1d0a8384626213f99cf5b7e12aad81145c96b6pquerna * License, v. 2.0. If a copy of the MPL was not distributed with this
1d1d0a8384626213f99cf5b7e12aad81145c96b6pquerna * file, You can obtain one at http://mozilla.org/MPL/2.0/.
1d1d0a8384626213f99cf5b7e12aad81145c96b6pquerna/*! \file */
11e076839c8d5a82d55e710194d0daac51390dbdsf "res %p: %s", (r), (m))
11e076839c8d5a82d55e710194d0daac51390dbdsf#define FCTXTRACE(m) \
11e076839c8d5a82d55e710194d0daac51390dbdsf "fctx %p(%s): %s", \
11e076839c8d5a82d55e710194d0daac51390dbdsf "fctx %p(%s): %s %s", \
11e076839c8d5a82d55e710194d0daac51390dbdsf "fctx %p(%s): [result: %s] %s", \
11e076839c8d5a82d55e710194d0daac51390dbdsf "fctx %p(%s): [result: %s] %s %s", \
11e076839c8d5a82d55e710194d0daac51390dbdsf "fctx %p(%s): %s %s%u", \
11e076839c8d5a82d55e710194d0daac51390dbdsf "fetch %p (fctx %p(%s)): %s", \
11e076839c8d5a82d55e710194d0daac51390dbdsf "resquery %p (fctx %p(%s)): %s", \
11e076839c8d5a82d55e710194d0daac51390dbdsf#define RRTRACE(r, m) do { UNUSED(r); UNUSED(m); } while (0)
11e076839c8d5a82d55e710194d0daac51390dbdsf#define FCTXTRACE2(m1, m2) do { UNUSED(m1); UNUSED(m2); } while (0)
11e076839c8d5a82d55e710194d0daac51390dbdsf#define FCTXTRACE3(m1, res) do { UNUSED(m1); UNUSED(res); } while (0)
11e076839c8d5a82d55e710194d0daac51390dbdsf#endif /* WANT_QUERYTRACE */
11e076839c8d5a82d55e710194d0daac51390dbdsf * The maximum time we will wait for a single query.
11e076839c8d5a82d55e710194d0daac51390dbdsf#define MAX_SINGLE_QUERY_TIMEOUT_US (MAX_SINGLE_QUERY_TIMEOUT*US_PER_SEC)
11e076839c8d5a82d55e710194d0daac51390dbdsf * We need to allow a individual query time to complete / timeout.
11e076839c8d5a82d55e710194d0daac51390dbdsf#define MINIMUM_QUERY_TIMEOUT (MAX_SINGLE_QUERY_TIMEOUT + 1U)
11e076839c8d5a82d55e710194d0daac51390dbdsf/* The default time in seconds for the whole query to live. */
11e076839c8d5a82d55e710194d0daac51390dbdsf/* The maximum time in seconds for the whole query to live. */
11e076839c8d5a82d55e710194d0daac51390dbdsf/* The default maximum number of recursions to follow before giving up. */
11e076839c8d5a82d55e710194d0daac51390dbdsf/* The default maximum number of iterative queries to allow before giving up. */
11e076839c8d5a82d55e710194d0daac51390dbdsf/* Number of hash buckets for zone counters */
11e076839c8d5a82d55e710194d0daac51390dbdsf * Maximum EDNS0 input packet size.
11e076839c8d5a82d55e710194d0daac51390dbdsf * This defines the maximum number of timeouts we will permit before we
11e076839c8d5a82d55e710194d0daac51390dbdsf * disable EDNS0 on the query.
11e076839c8d5a82d55e710194d0daac51390dbdsf (((fctx)->res->lame_ttl > 30 ) ? (fctx)->res->lame_ttl : 30)
11e076839c8d5a82d55e710194d0daac51390dbdsftypedef struct query {
11e076839c8d5a82d55e710194d0daac51390dbdsf /* Locked by task event serialization. */
11e076839c8d5a82d55e710194d0daac51390dbdsf unsigned int magic;
11e076839c8d5a82d55e710194d0daac51390dbdsf unsigned int options;
11e076839c8d5a82d55e710194d0daac51390dbdsf unsigned int attributes;
11e076839c8d5a82d55e710194d0daac51390dbdsf unsigned int sends;
11e076839c8d5a82d55e710194d0daac51390dbdsf unsigned int connects;
11e076839c8d5a82d55e710194d0daac51390dbdsf unsigned int udpsize;
11e076839c8d5a82d55e710194d0daac51390dbdsf unsigned int count;
11e076839c8d5a82d55e710194d0daac51390dbdsf#define VALID_QUERY(query) ISC_MAGIC_VALID(query, QUERY_MAGIC)
11e076839c8d5a82d55e710194d0daac51390dbdsftypedef enum {
11e076839c8d5a82d55e710194d0daac51390dbdsf fetchstate_init = 0, /*%< Start event has not run yet. */
11e076839c8d5a82d55e710194d0daac51390dbdsftypedef enum {
11e076839c8d5a82d55e710194d0daac51390dbdsf /*% Not locked. */
11e076839c8d5a82d55e710194d0daac51390dbdsf unsigned int magic;
11e076839c8d5a82d55e710194d0daac51390dbdsf unsigned int options;
11e076839c8d5a82d55e710194d0daac51390dbdsf unsigned int bucketnum;
11e076839c8d5a82d55e710194d0daac51390dbdsf unsigned int dbucketnum;
11e076839c8d5a82d55e710194d0daac51390dbdsf /*% Locked by appropriate bucket lock. */
11e076839c8d5a82d55e710194d0daac51390dbdsf unsigned int references;
11e076839c8d5a82d55e710194d0daac51390dbdsf /*% Locked by task event serialization. */
11e076839c8d5a82d55e710194d0daac51390dbdsf unsigned int attributes;
11e076839c8d5a82d55e710194d0daac51390dbdsf * The number of events we're waiting for.
11e076839c8d5a82d55e710194d0daac51390dbdsf unsigned int pending;
11e076839c8d5a82d55e710194d0daac51390dbdsf * The number of times we've "restarted" the current
11e076839c8d5a82d55e710194d0daac51390dbdsf * nameserver set. This acts as a failsafe to prevent
11e076839c8d5a82d55e710194d0daac51390dbdsf * us from pounding constantly on a particular set of
11e076839c8d5a82d55e710194d0daac51390dbdsf * servers that, for whatever reason, are not giving
11e076839c8d5a82d55e710194d0daac51390dbdsf * us useful responses, but are responding in such a
11e076839c8d5a82d55e710194d0daac51390dbdsf * way that they are not marked "bad".
11e076839c8d5a82d55e710194d0daac51390dbdsf unsigned int restarts;
11e076839c8d5a82d55e710194d0daac51390dbdsf * The number of timeouts that have occurred since we
11e076839c8d5a82d55e710194d0daac51390dbdsf * last successfully received a response packet. This
11e076839c8d5a82d55e710194d0daac51390dbdsf * is used for EDNS0 black hole detection.
11e076839c8d5a82d55e710194d0daac51390dbdsf unsigned int timeouts;
11e076839c8d5a82d55e710194d0daac51390dbdsf * Look aside state for DS lookups.
11e076839c8d5a82d55e710194d0daac51390dbdsf * Number of queries that reference this context.
11e076839c8d5a82d55e710194d0daac51390dbdsf unsigned int nqueries;
11e076839c8d5a82d55e710194d0daac51390dbdsf * The reason to print when logging a successful
11e076839c8d5a82d55e710194d0daac51390dbdsf * response to a query.
1d1d0a8384626213f99cf5b7e12aad81145c96b6pquerna const char * reason;
int exitline;
unsigned int querysent;
unsigned int referrals;
unsigned int lamecount;
unsigned int quotacount;
unsigned int neterr;
unsigned int badresp;
unsigned int adberr;
unsigned int findfail;
unsigned int valfail;
unsigned int depth;
} dns_valarg_t;
struct dns_fetch {
unsigned int magic;
typedef struct fctxbucket {
} fctxbucket_t;
struct fctxcount {
typedef struct zonebucket {
} zonebucket_t;
typedef struct alternate {
} _n;
} _u;
} alternate_t;
struct dns_resolver {
unsigned int magic;
unsigned int options;
unsigned int nbuckets;
#if USE_ALGLOCK
#if USE_MBSLOCK
unsigned int spillatmax;
unsigned int spillatmin;
unsigned int query_timeout;
unsigned int maxdepth;
unsigned int maxqueries;
unsigned int references;
unsigned int activebuckets;
unsigned int nfctx;
FCTX_ADDRINFO_FORWARDER) != 0)
FCTX_ADDRINFO_NOCOOKIE) != 0)
FCTX_ADDRINFO_EDNSOK) != 0)
FCTX_ADDRINFO_BADCOOKIE) != 0)
#ifdef ENABLE_AFL
void dns_resolver_setfuzzing() {
static isc_result_t
return (ISC_R_NOMEMORY);
&validator);
return (result);
static isc_boolean_t
int order;
unsigned int labels;
return (ISC_TRUE);
return (ISC_FALSE);
static isc_boolean_t
return (ISC_FALSE);
&name);
return (ISC_FALSE);
return (ISC_FALSE);
return (ISC_FALSE);
return (ISC_FALSE);
goto munge;
return (ISC_FALSE);
return (ISC_FALSE);
return (ISC_FALSE);
if (!keep_auth)
return (ISC_TRUE);
static inline isc_result_t
static inline isc_result_t
unsigned int bucket;
if (empty)
unsigned int factor;
now);
now);
static isc_result_t
return (result);
unsigned int count = 0;
unsigned int old_spillat;
count++;
&i, ISC_TRUE);
if (logit)
* isc_socket_sendto/connect() was in progress.
case ISC_R_SUCCESS:
case ISC_R_HOSTUNREACH:
case ISC_R_NETUNREACH:
case ISC_R_NOPERM:
case ISC_R_ADDRNOTAVAIL:
case ISC_R_CONNREFUSED:
if (retry) {
if (destroy_query)
static inline isc_result_t
return (result);
unsigned int seconds;
unsigned int us;
static isc_result_t
unsigned int options)
unsigned int srtt;
return (result);
goto stop_idle_timer;
int pf;
if (!have_addr) {
switch (pf) {
case PF_INET:
&addr);
case PF_INET6:
&addr);
goto cleanup_query;
goto cleanup_query;
#ifndef BROKEN_TCP_BIND_BEFORE_CONNECT
goto cleanup_socket;
if (have_addr) {
case AF_INET:
case AF_INET6:
goto cleanup_query;
goto cleanup_query;
case PF_INET:
case PF_INET6:
goto cleanup_query;
goto cleanup_socket;
goto cleanup_dispatch;
goto cleanup_dispatch;
return (ISC_R_SUCCESS);
return (result);
static isc_boolean_t
return (ISC_TRUE);
return (ISC_FALSE);
#ifdef ENABLE_AFL
if (fuzzing_resolver)
static struct tried *
return (tried);
return (NULL);
static struct tried *
return (tried);
return (NULL);
#ifdef AES_CC
case AF_INET:
case AF_INET6:
#ifdef HMAC_SHA1_CC
case AF_INET:
case AF_INET6:
#ifdef HMAC_SHA256_CC
case AF_INET:
case AF_INET6:
static isc_result_t
unsigned int labels;
static isc_boolean_t
return (ISC_FALSE);
return (ISC_TRUE);
return (ISC_FALSE);
return (secure_domain);
static isc_result_t
isc_region_t r;
unsigned ednsopt = 0;
#ifdef HAVE_DNSTAP
goto cleanup_temps;
goto cleanup_temps;
task,
goto cleanup_temps;
if (secure_domain)
goto cleanup_message;
goto cleanup_message;
DNS_SECTION_QUESTION, 0);
goto cleanup_message;
!useedns)
if (hint != 0U)
if (udpsize == 0U)
&sendcookie);
&ednsversion);
if (reqnsid) {
ednsopt++;
#if DNS_EDNS_VERSION > 0
if (sendcookie) {
sizeof(cookie));
ednsopt++;
udpsize = 0;
goto cleanup_message;
goto cleanup_message;
goto cleanup_message;
goto cleanup_message;
goto cleanup_message;
#ifdef HAVE_DNSTAP
goto cleanup_message;
query);
goto cleanup_message;
if (connecting) {
goto cleanup_message;
#ifdef HAVE_DNSTAP
return (ISC_R_SUCCESS);
if (cleanup_cctx)
return (result);
unsigned int attrs;
case ISC_R_SUCCESS:
attrs = 0;
case ISC_R_NETUNREACH:
case ISC_R_HOSTUNREACH:
case ISC_R_CONNREFUSED:
case ISC_R_NOPERM:
case ISC_R_ADDRNOTAVAIL:
case ISC_R_CONNECTIONRESET:
if (retry) {
unsigned int bucketnum;
if (want_try) {
} else if (want_done) {
} else if (dodestroy) {
if (bucket_empty)
static inline isc_boolean_t
return (ISC_TRUE);
return (ISC_FALSE);
static inline isc_boolean_t
#ifdef ENABLE_AFL
if (fuzzing_resolver)
return ISC_FALSE;
return (all_bad);
isc_buffer_t b;
#ifdef ENABLE_AFL
if (fuzzing_resolver)
switch (badtype) {
case badns_unreachable:
case badns_response:
case badns_validation:
if (port != 0)
port);
static isc_boolean_t
int order;
unsigned int nlabels;
static isc_result_t
unsigned int stdoptions = 0;
return (DNS_R_SERVFAIL);
return (DNS_R_SERVFAIL);
unsigned int labels;
return (result);
return (result);
goto out;
return (DNS_R_SERVFAIL);
if (!overquota)
return (result);
if (need_alternate) {
int family;
alternate_t *a;
a != NULL;
if (!a->isaddress) {
&ai, 0);
publink);
out:
if (all_bad) {
if (badcache &&
if (all_spilled) {
return (result);
int match;
match > 0)
if (aborted) {
static inline dns_adbaddrinfo_t *
return (addrinfo);
return (addrinfo);
return (addrinfo);
unsigned int bucketnum;
if (bucket_empty)
} else if (retrying)
static isc_boolean_t
unsigned int bucketnum;
return (ISC_TRUE);
return (ISC_FALSE);
&cevent);
unsigned int bucketnum;
if (dodestroy) {
if (bucket_empty)
unsigned int bucketnum;
if (!done) {
} else if (dodestroy) {
if (bucket_empty)
static inline isc_result_t
return (ISC_R_NOMEMORY);
return (ISC_R_SUCCESS);
static isc_result_t
unsigned int findoptions = 0;
return (ISC_R_NOMEMORY);
goto cleanup_fetch;
goto cleanup_counter;
goto cleanup_info;
unsigned int labels;
NULL);
goto cleanup_nameservers;
goto cleanup_nameservers;
goto cleanup_name;
goto cleanup_name;
goto cleanup_domain;
goto cleanup_fcount;
goto cleanup_qmessage;
goto cleanup_rmessage;
goto cleanup_rmessage;
return (ISC_R_SUCCESS);
return (result);
static inline isc_boolean_t
return (ISC_FALSE);
return (ISC_FALSE);
return (ISC_FALSE);
int order;
unsigned int labels;
return (ISC_FALSE);
return (ISC_FALSE);
return (ISC_TRUE);
return (ISC_FALSE);
static inline isc_result_t
return (DNS_R_FORMERR);
return (result);
return (DNS_R_FORMERR);
return (ISC_R_SUCCESS);
static isc_boolean_t
unsigned int bucketnum;
if (!locked)
goto unlock;
if (!locked)
if (dodestroy)
return (bucket_empty);
unsigned options;
if (bucket_empty)
goto cleanup_event;
!negative &&
NULL,
NULL,
NULL);
0, NULL);
else if (sentresponse)
if (negative &&
if (negative) {
&node);
goto noanswer_response;
ttl = 0;
goto noanswer_response;
goto answer_response;
noqname);
goto noanswer_response;
options = 0;
goto noanswer_response;
goto noanswer_response;
if (sentresponse) {
if (bucket_empty)
goto cleanup_event;
goto cleanup_event;
&name);
&nsnode);
sigrdataset, 0,
NULL);
== ISC_R_SUCCESS);
static inline isc_result_t
unsigned int labels;
return (ISC_R_NOTFOUND);
return (ISC_R_NOTFOUND);
return (result);
fctx)))
if (!exists) {
return (result);
static inline isc_result_t
unsigned int options;
unsigned int valoptions = 0;
return (result);
!need_validation) {
return (result);
return (result);
sizeof(typebuf));
sizeof(classbuf));
if (fail) {
return (DNS_R_BADNAME);
* Cache this rdataset/sigrdataset pair as
options = 0;
&noqname);
(void) dns_rdataset_addnoqname(
DNS_FETCHOPT_PREFETCH) != 0)
if (!need_validation &&
eresult =
eresult =
options = 0;
(void) dns_rdataset_addnoqname(
return (result);
static inline isc_result_t
section++) {
&name);
return (result);
static isc_result_t
if (secure)
return (result);
static inline isc_result_t
unsigned int valoptions = 0;
return (result);
if (secure_domain) {
&tname);
return (result);
if (need_validation) {
return (result);
goto unlock;
goto unlock;
ttl = 0;
goto unlock;
return (result);
if (gluing) {
if (external)
static isc_result_t
return (ISC_R_SUCCESS);
gluing);
&rdataset);
gluing);
return (ISC_R_SUCCESS);
static isc_result_t
#ifndef CHECK_FOR_GLUE_IN_ANSWER
#define CHECK_FOR_GLUE_IN_ANSWER 0
static isc_result_t
&name);
fctx);
if (rescan)
goto again;
static isc_boolean_t
int match;
return (ISC_TRUE);
return (ISC_TRUE);
sizeof(typebuf));
sizeof(classbuf));
return (ISC_FALSE);
return (ISC_TRUE);
static isc_boolean_t
unsigned int nlabels;
return (ISC_TRUE);
case dns_rdatatype_cname:
case dns_rdatatype_dname:
NULL);
return (ISC_TRUE);
INSIST(0);
return (ISC_TRUE);
return (ISC_TRUE);
return (ISC_TRUE);
sizeof(classbuf));
return (ISC_FALSE);
return (ISC_TRUE);
static isc_result_t
unsigned int look_in_options)
return (ISC_R_SUCCESS);
sizeof(tbuf));
sizeof(nbuf));
sizeof(qbuf));
goto nextname;
return (DNS_R_FORMERR);
return (DNS_R_FORMERR);
if (aa)
return (result);
if (negative_response) {
if (aa)
return (DNS_R_FORMERR);
return (DNS_R_FORMERR);
if (aa)
return (result);
return (DNS_R_CHASEDSSERVERS);
return (ISC_R_SUCCESS);
return (DNS_R_FORMERR);
sizeof(tbuf));
sizeof(dbuf));
return (DNS_R_FORMERR);
return (DNS_R_FORMERR);
return (DNS_R_FORMERR);
return (DNS_R_FORMERR);
fctx);
return (result);
return (result);
return (DNS_R_DELEGATION);
return (ISC_R_SUCCESS);
static isc_boolean_t
return (ISC_FALSE);
return (ISC_FALSE);
return (ISC_FALSE);
return (ISC_TRUE);
static isc_result_t
int order;
unsigned int nlabels;
switch (namereln) {
case dns_namereln_equal:
case dns_namereln_subdomain:
return (DNS_R_FORMERR);
return (DNS_R_SERVFAIL);
return (DNS_R_SERVFAIL);
fctx);
return (DNS_R_FORMERR);
return (DNS_R_SERVFAIL);
NULL))
return (DNS_R_SERVFAIL);
fctx);
return (DNS_R_FORMERR);
return (DNS_R_FORMERR);
return (DNS_R_FORMERR);
NULL))
return (DNS_R_SERVFAIL);
return (DNS_R_FORMERR);
return (DNS_R_FORMERR);
&chaining)) {
return (DNS_R_SERVFAIL);
return (DNS_R_FORMERR);
return (DNS_R_FORMERR);
if (chaining) {
return (ISC_R_SUCCESS);
return (DNS_R_FORMERR);
if (!external) {
(void)dns_rdataset_additionaldata(
fctx);
return (result);
static isc_boolean_t
return (bucket_empty);
unsigned int bucketnum;
goto cleanup;
goto cleanup;
goto cleanup;
&nameservers);
if (!locked)
if (bucket_empty)
ISC_FALSE) ||
unsigned char *p, *nsid;
goto cleanup;
goto cleanup;
p = buf;
for (i = 0; i < nsid_len; i++) {
p = pbuf;
for (i = 0; i < nsid_len; i++) {
*p++ = nsid[i];
sizeof(addrbuf));
static isc_boolean_t
static isc_boolean_t
return (ISC_TRUE);
return (ISC_FALSE);
unsigned char *optvalue;
switch (optcode) {
case DNS_OPT_NSID:
if (!seen_nsid &&
case DNS_OPT_COOKIE:
if (seen_cookie) {
optlen);
unsigned int options;
unsigned int findoptions;
unsigned int bucketnum;
#ifdef HAVE_DNSTAP
goto done;
goto done;
goto done;
goto done;
switch (result) {
case ISC_R_UNEXPECTEDEND:
goto done;
case DNS_R_FORMERR:
goto done;
goto done;
#ifdef HAVE_DNSTAP
goto done;
goto done;
case dns_rcode_notimp:
case dns_rcode_formerr:
case dns_rcode_badcookie:
case dns_rcode_noerror:
case dns_rcode_nxdomain:
case dns_rcode_yxdomain:
case dns_rcode_refused:
case dns_rcode_servfail:
goto done;
goto done;
if (truncated) {
goto done;
goto done;
case dns_rcode_nxdomain:
case dns_rcode_servfail:
case dns_rcode_formerr:
case dns_rcode_refused:
case dns_rcode_badvers:
case dns_rcode_badcookie:
isc_buffer_t b;
unsigned int version;
#if DNS_EDNS_VERSION > 0
#if DNS_EDNS_VERSION > 0
#if DNS_EDNS_VERSION > 0
goto done;
goto done;
sizeof(classbuf));
sizeof(addrbuf));
result);
result);
goto done;
goto force_referral;
goto done;
switch (result) {
case ISC_R_SUCCESS:
case DNS_R_CHASEDSSERVERS:
case DNS_R_DELEGATION:
goto done;
goto done;
goto done;
done:
result);
if (!nextitem)
#ifdef ENABLE_AFL
if (keep_trying) {
if (get_nameservers) {
findoptions = 0;
NULL);
} else if (resend) {
if (bucket_empty)
} else if (nextitem) {
alternate_t *a;
for (i = 0; i < RES_DOMAIN_BUCKETS; i++) {
if (!a->isaddress)
#if USE_ALGLOCK
#if USE_MBSLOCK
unsigned int count;
if (logit)
unsigned int options,
unsigned dispattr;
return (ISC_R_NOMEMORY);
goto cleanup_res;
for (i = 0; i < ntasks; i++) {
goto cleanup_buckets;
goto cleanup_buckets;
#ifdef ISC_PLATFORM_USETHREADS
goto cleanup_buckets;
goto cleanup_buckets;
for (i = 0; i < RES_DOMAIN_BUCKETS; i++) {
goto cleanup_dbuckets;
goto cleanup_dispatches;
goto cleanup_lock;
goto cleanup_nlock;
goto cleanup_primelock;
goto cleanup_primelock;
#if USE_ALGLOCK
goto cleanup_spillattimer;
#if USE_MBSLOCK
goto cleanup_alglock;
return (ISC_R_SUCCESS);
#if USE_MBSLOCK
#if USE_ALGLOCK
for (i = 0; i < dbuckets_created; i++) {
for (i = 0; i < buckets_created; i++) {
return (result);
if (want_priming) {
if (need_destroy)
static inline isc_boolean_t
unsigned int options)
return (ISC_FALSE);
return (ISC_FALSE);
unsigned int bucketnum;
unsigned int count = 0;
unsigned int spillat;
unsigned int spillatmin;
return (ISC_R_NOMEMORY);
goto unlock;
goto unlock;
count++;
goto unlock;
goto unlock;
if (new_fctx) {
if (dodestroy)
return (result);
unsigned int bucketnum;
if (bucket_empty)
alternate_t *a;
if (a == NULL)
return (ISC_R_NOMEMORY);
return (result);
return (ISC_R_SUCCESS);
#ifdef ENABLE_AFL
if (!fuzzing_resolver)
#if USE_ALGLOCK
#if USE_ALGLOCK
unsigned int alg)
unsigned char *tmp;
unsigned char *algorithms;
return (ISC_R_RANGE);
#if USE_ALGLOCK
goto cleanup;
goto cleanup;
*algorithms);
#if USE_ALGLOCK
return (result);
unsigned int alg)
unsigned char *algorithms;
return (ISC_FALSE);
#if USE_ALGLOCK
goto unlock;
#if USE_ALGLOCK
if (found)
return (ISC_FALSE);
#if USE_ALGLOCK
#if USE_ALGLOCK
unsigned int digest_type)
unsigned char *tmp;
unsigned char *digests;
return (ISC_R_RANGE);
#if USE_ALGLOCK
goto cleanup;
goto cleanup;
*digests);
#if USE_ALGLOCK
return (result);
unsigned int digest_type)
unsigned char *digests;
#if USE_ALGLOCK
goto unlock;
#if USE_ALGLOCK
if (found)
return (ISC_FALSE);
#if USE_MBSLOCK
#if USE_MBSLOCK
#if USE_MBSLOCK
goto cleanup;
#if USE_MBSLOCK
return (result);
#if USE_MBSLOCK
goto unlock;
#if USE_MBSLOCK
return (value);
if (seconds == 0)
for (i = 0; i < RES_DOMAIN_BUCKETS; i++) {