dighost.c revision 141132c272ebc41da4c55d69c49810fafadbbc11
573d78f3d53859bc01ce5d5cebbaac9b8b90bfbaTinderbox User * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * Copyright (C) 2000-2003 Internet Software Consortium.
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater * Permission to use, copy, modify, and distribute this software for any
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson * purpose with or without fee is hereby granted, provided that the above
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson * copyright notice and this permission notice appear in all copies.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * PERFORMANCE OF THIS SOFTWARE.
313b4dc3b2e2be29994ce030c42c39c9eef9c46bAutomatic Updater/* $Id: dighost.c,v 1.290 2006/01/07 00:23:35 marka Exp $ */
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson * Notice to programmers: Do not use this code as an example of how to
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson * use the ISC library to perform DNS lookups. Dig and Host both operate
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson * on the request level, since they allow fine-tuning of output and are
69f3cb5abcb38f105c653c7b3df7cec33b87b292Mark Andrews * intended as debugging tools. As a result, they perform many of the
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence * functions which could be better handled using the dns_resolver
364a82f7c25b62967678027043425201a5e5171aBob Halley * functions in most applications.
c7e266b7e5675e12d1ca3cc929f24b3e86d41f8eEvan Huntunsigned int timeout = 0;
c7e266b7e5675e12d1ca3cc929f24b3e86d41f8eEvan Huntstatic void initialize_idn(void);
c7e266b7e5675e12d1ca3cc929f24b3e86d41f8eEvan Huntstatic isc_result_t output_filter(isc_buffer_t *buffer,
c7e266b7e5675e12d1ca3cc929f24b3e86d41f8eEvan Hunt unsigned int used_org,
c7e266b7e5675e12d1ca3cc929f24b3e86d41f8eEvan Huntstatic idn_result_t append_textname(char *name, const char *origin,
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrewsstatic void idn_check_result(idn_result_t r, const char *msg);
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrews * Exit Codes:
e80f661db8ec9596eb977d6fc537484aa3662e22Evan Hunt *\li 0 Everything went well, including things like NXDOMAIN
c7e266b7e5675e12d1ca3cc929f24b3e86d41f8eEvan Hunt *\li 1 Usage error
c7e266b7e5675e12d1ca3cc929f24b3e86d41f8eEvan Hunt *\li 7 Got too many RR's or Names
c7e266b7e5675e12d1ca3cc929f24b3e86d41f8eEvan Hunt *\li 8 Couldn't open batch file
e80f661db8ec9596eb977d6fc537484aa3662e22Evan Hunt *\li 9 No reply from server
106360491ad40eef9669fd792c35710d6af1dab0Evan Hunt *\li 10 Internal error
c7e266b7e5675e12d1ca3cc929f24b3e86d41f8eEvan Huntdns_rdataset_t * sigchase_scanname(dns_rdatatype_t type,
c7e266b7e5675e12d1ca3cc929f24b3e86d41f8eEvan Huntdns_rdataset_t * chase_scanname_section(dns_message_t *msg,
c7e266b7e5675e12d1ca3cc929f24b3e86d41f8eEvan Huntisc_result_t advanced_rrsearch(dns_rdataset_t **rdataset,
45e1bd63587102c3bb361eaca42ee7b714fb3542Mark Andrewsisc_result_t sigchase_verify_sig_key(dns_name_t *name,
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafssonvoid print_rdata(dns_rdata_t *rdata, isc_mem_t *mctx);
c7e266b7e5675e12d1ca3cc929f24b3e86d41f8eEvan Huntvoid dup_name(dns_name_t *source, dns_name_t* target,
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrewsvoid free_name(dns_name_t *name, isc_mem_t *mctx);
c7e266b7e5675e12d1ca3cc929f24b3e86d41f8eEvan Huntvoid dump_database_section(dns_message_t *msg, int section);
c7e266b7e5675e12d1ca3cc929f24b3e86d41f8eEvan Huntdns_rdataset_t * search_type(dns_name_t *name, dns_rdatatype_t type,
c7e266b7e5675e12d1ca3cc929f24b3e86d41f8eEvan Huntisc_result_t contains_trusted_key(dns_name_t *name,
c7e266b7e5675e12d1ca3cc929f24b3e86d41f8eEvan Huntisc_result_t prove_nx_type(dns_message_t * msg, dns_name_t *name,
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrewsisc_result_t prove_nx(dns_message_t * msg, dns_name_t * name,
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafssonstatic void nameFromString(const char *str, dns_name_t *p_ret);
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrenceint inf_name(dns_name_t * name1, dns_name_t * name2);
114c14f8adfc249cf2e5cdcb9007af46fed257e3Mark Andrewsisc_result_t opentmpkey(isc_mem_t *mctx, const char *file,
aeadcd63196f164b219629a53c0e0925519288f3Evan Huntisc_result_t removetmpkey(isc_mem_t *mctx, const char *file);
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrewsisc_result_t grandfather_pb_test(dns_name_t * zone_name,
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafssonisc_result_t child_of_zone(dns_name_t *name,
c7e266b7e5675e12d1ca3cc929f24b3e86d41f8eEvan Hunt * the current name is the parent name when we follow delegation
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrews * the child name is used for delegation (NS DS responses in AUTHORITY section)
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrewsstruct_tk_list tk_list = { {NULL, NULL, NULL, NULL, NULL}, 0};
262c39b2366bf79062f7f86b218947523dd1cbacEvan Hunt * Apply and clear locks at the event level in global task.
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrews * Can I get rid of these using shutdown events? XXX
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrews debug("lock_lookup %s:%d", __FILE__, __LINE__);\
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrews check_result(isc_mutex_lock((&lookup_lock)), "isc_mutex_lock");\
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrews debug("unlock_lookup %s:%d", __FILE__, __LINE__);\
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrews check_result(isc_mutex_unlock((&lookup_lock)),\
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrews "isc_mutex_unlock");\
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrewsrecv_done(isc_task_t *task, isc_event_t *event);
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrewsconnect_timeout(isc_task_t *task, isc_event_t *event);
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrewslaunch_next_query(dig_query_t *query, isc_boolean_t include_question);
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrewsstatic void *
febaa091847ab004f40500cc475a819f2c73fcddAndreas Gustafsson while (*s != '\0') {
febaa091847ab004f40500cc475a819f2c73fcddAndreas Gustafsson if (*s == '.')
501941f0b6cce74c2ff75b10aff3f230d5d37e4cEvan Hunt unsigned int len;
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrews * Append 'len' bytes of 'text' at '*p', failing with
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrews * ISC_R_NOSPACE if that would advance p past 'end'.
501941f0b6cce74c2ff75b10aff3f230d5d37e4cEvan Huntappend(const char *text, int len, char **p, char *end) {
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrewsreverse_octets(const char *in, char **p, char *end) {
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrewsget_reverse(char *reverse, size_t len, char *value, isc_boolean_t ip6_int,
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson r = inet_pton(AF_INET6, value, &addr.type.in6);
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson /* This is a valid IPv6 address. */
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson unsigned int options = 0;
e7220c9b841bbd3d16736726f786a86fec3c0e18Evan Hunt result = dns_byaddr_createptrname2(&addr, options, name);
12e0477d4e132c9122312246ed60aaa646f819b2Mark Andrews * Not a valid IPv6 address. Assume IPv4.
12e0477d4e132c9122312246ed60aaa646f819b2Mark Andrews * If 'strict' is not set, construct the
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson * in-addr.arpa name by blindly reversing
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson * octets whether or not they look like integers,
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson * so that this can be used for RFC2317 names
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrews if (strict && inet_pton(AF_INET, value, &addr.type.in) != 1)
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson /* Append .in-addr.arpa. and a terminating NUL. */
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson result = append(".in-addr.arpa.", 15, &p, end);
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrewscheck_result(isc_result_t result, const char *msg) {
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrews fatal("%s: %s", msg, isc_result_totext(result));
262c39b2366bf79062f7f86b218947523dd1cbacEvan Hunt * Create a server structure, which is part of the lookup structure.
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrews * This is little more than a linked list of servers to query in hopes
262c39b2366bf79062f7f86b218947523dd1cbacEvan Hunt * of finding the answer the user is looking for
9c566a852f31c3a5d0b9d6eaf11463114339c01dAndreas Gustafssonmake_server(const char *servname, const char *userarg) {
9c566a852f31c3a5d0b9d6eaf11463114339c01dAndreas Gustafsson srv = isc_mem_allocate(mctx, sizeof(struct dig_server));
69f3cb5abcb38f105c653c7b3df7cec33b87b292Mark Andrews * Create a copy of the server list from the lwres configuration structure.
69f3cb5abcb38f105c653c7b3df7cec33b87b292Mark Andrews * The dest list must have already had ISC_LIST_INIT applied.
2f012d936b5ccdf6520c96a4de23721dc58a2221Automatic Updatercopy_server_list(lwres_conf_t *confdata, dig_serverlist_t *dest) {
9c566a852f31c3a5d0b9d6eaf11463114339c01dAndreas Gustafsson char tmp[sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")];
9c566a852f31c3a5d0b9d6eaf11463114339c01dAndreas Gustafsson af = addr2af(confdata->nameservers[i].family);
604419a812b491cd35fb6fad129c3c39da7200a1Mark Andrews lwres_net_ntop(af, confdata->nameservers[i].address,
9c566a852f31c3a5d0b9d6eaf11463114339c01dAndreas Gustafsson while (s != NULL) {
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson isc_sockaddr_t sockaddrs[DIG_MAX_ADDRESSES];
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson result = bind9_getaddresses(opt, 0, sockaddrs,
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson for (i = 0; i < count; i++) {
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson isc_netaddr_fromsockaddr(&netaddr, &sockaddrs[i]);
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson isc_netaddr_format(&netaddr, tmp, sizeof(tmp));
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafssonadd_nameserver(lwres_conf_t *confdata, const char *addr, int af) {
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson if (confdata->nsnext >= LWRES_CONFMAXNAMESERVERS)
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson confdata->nameservers[i].family = LWRES_ADDRTYPE_V4;
case AF_INET6:
return (ISC_R_FAILURE);
return (ISC_R_SUCCESS);
return (ISC_R_FAILURE);
make_empty_lookup(void) {
#ifdef DIG_SIGCHASE
#if DIG_SIGCHASE_TD
return (looknew);
#if DIG_SIGCHASE_TD
#ifdef DIG_SIGCHASE
#if DIG_SIGCHASE_TD
if (servers)
return (looknew);
return (looknew);
setup_text_key(void) {
int secretsize;
unsigned char *secretstore;
goto failure;
namebuf);
goto failure;
setup_file_key(void) {
goto failure;
goto failure;
static dig_searchlist_t *
return (search);
* Setup the system as a whole, reading key information and resolv.conf
setup_system(void) {
if (have_ipv4) {
if (have_ipv6) {
#ifdef WITH_IDN
if (keyfile[0] != 0)
else if (keysecret[0] != 0)
#ifdef DIG_SIGCHASE
#if DIG_SIGCHASE_TD
#if DIG_SIGCHASE_BU
clear_searchlist(void) {
* Override the search list derived from resolv.conf by 'domain'.
setup_libs(void) {
if (dnssec)
* part of dig.c, host.c, or nslookup.c) to either shutdown the system as
check_if_done(void) {
sendcount == 0) {
link);
link);
sockcount--;
static isc_boolean_t
dig_server_t *s;
dig_query_t *q;
void *ptr;
if (debugging) {
while (q != NULL) {
return (ISC_FALSE);
while (s != NULL) {
ptr = s;
return (ISC_TRUE);
start_lookup(void) {
if (cancel_now)
#if DIG_SIGCHASE_TD
isc_region_t r;
goto novalidation;
goto novalidation;
ISC_FALSE, b);
isc_buffer_usedregion(b, &r);
MXNAME);
isc_buffer_free(&b);
&chase_name);
start_lookup();
int numLookups = 0;
0, &rdataset);
&rdataset);
unsigned int nlabels;
int order;
numLookups++;
if (!success) {
isc_uint32_t i, j;
for (i = numLookups; i > 0; i--) {
isc_random_get(&j);
return (numLookups);
static isc_boolean_t
if (!usesearch)
return (ISC_FALSE);
return (ISC_FALSE);
return (ISC_TRUE);
int len;
isc_buffer_t b;
#ifdef WITH_IDN
#ifdef WITH_IDN
lookup_counter = 0;
#ifdef WITH_IDN
* is TRUE or we got a domain line in the resolv.conf file.
#ifdef WITH_IDN
#ifdef WITH_IDN
sizeof(utf8_origin));
sizeof(utf8_textname));
#ifdef WITH_IDN
DNS_SECTION_QUESTION, 0);
extrabytes = 0;
ISC_TRUE);
sendcount--;
dig_lookup_t *l;
unsigned int local_timeout;
if (timeout == 0)
l, &l->timer);
dig_lookup_t *l;
if (specified_source &&
sockcount++;
if (specified_source)
sockcount++;
if (specified_source) {
link);
recvcount++;
link);
sendcount++;
if (!l->tcp_mode)
if (!l->tcp_mode) {
l->retries--;
l->retries);
l->retries--;
cancel_lookup(l);
cancel_lookup(l);
dig_lookup_t *l;
recvcount--;
sizeof(sockstr));
sockcount--;
if (length == 0) {
recvcount++;
dig_lookup_t *l;
sockcount--;
if (include_question) {
link);
recvcount++;
sendcount++;
dig_lookup_t *l;
sockcount--;
sockcount--;
static isc_boolean_t
return (ISC_TRUE);
&name);
return (ISC_TRUE);
goto next_rdata;
goto next_rdata;
goto doexit;
goto next_rdata;
goto doexit;
goto doexit;
goto next_rdata;
goto doexit;
goto next_rdata;
goto doexit;
return (ISC_FALSE);
return (ISC_TRUE);
#ifdef DIG_SIGCHASE
dig_lookup_t *n, *l;
unsigned int parseflags;
unsigned int msgflags;
#ifdef DIG_SIGCHASE
isc_region_t r;
recvcount--;
sockcount--;
if (!l->tcp_mode &&
sizeof(buf1));
sizeof(buf2));
if (l->tcp_mode) {
if (fail) {
if (!match) {
recvcount++;
&l->querysig);
if (l->msgcounter != 0)
l->msgcounter++;
#ifdef DIG_SIGCHASE
if (!l->sigchase) {
parseflags = 0;
if (l->besteffort) {
hex_dump(b);
cancel_lookup(l);
cancel_lookup(l);
if (l->tcp_mode)
unsigned int local_timeout;
if (timeout == 0) {
if (l->tcp_mode)
NULL,
&l->interval,
#ifdef DIG_SIGCHASE
if (!do_sigchase)
} else if (l->trace) {
if (!l->ns_search_only)
if (!l->trace_root)
} else if (count == 0)
if (l->trace_root) {
#ifdef DIG_SIGCHASE
if (!do_sigchase)
#ifdef DIG_SIGCHASE
if (do_sigchase) {
sizeof(dig_message_t));
link);
isc_buffer_usedregion(b, &r);
sizeof(dig_message_t));
link);
#ifdef DIG_SIGCHASE
if (l->pending)
if (l->doing_xfr) {
if (!docancel)
if (docancel) {
cancel_lookup(l);
#ifdef DIG_SIGCHASE
if (!l->sigchase)
#ifdef DIG_SIGCHASE
if (!do_sigchase)
cancel_lookup(l);
#ifdef DIG_SIGCHASE
if (do_sigchase)
int count;
start_lookup();
cancel_all(void) {
dig_lookup_t *l, *n;
if (free_now) {
while (q != NULL) {
q, current_lookup);
clear_query(q);
q = nq;
while (l != NULL) {
try_clear_lookup(l);
destroy_libs(void) {
#ifdef DIG_SIGCHASE
void * ptr;
#ifdef WITH_IDN
#ifdef WITH_IDN
if (is_dst_up) {
#ifdef DIG_SIGCHASE
#if DIG_SIGCHASE_TD
#if DIG_SIGCHASE_BU
if (memdebugging != 0)
#ifdef WITH_IDN
initialize_idn(void) {
idn_result_t r;
#ifdef HAVE_SETLOCALE
if (r != idn_success)
idn_result_tostring(r));
static isc_result_t
return (ISC_R_SUCCESS);
fromlen++;
return (ISC_R_SUCCESS);
return (ISC_R_SUCCESS);
tolen--;
return (ISC_R_NOSPACE);
return (ISC_R_SUCCESS);
static idn_result_t
return idn_success;
return idn_buffer_overflow;
return idn_success;
if (r != idn_success) {
#ifdef DIG_SIGCHASE
isc_region_t r;
isc_buffer_usedregion(b, &r);
isc_buffer_free(&b);
dump_database(void) {
== ISC_R_SUCCESS)
== ISC_R_SUCCESS)
== ISC_R_SUCCESS)
return (rdataset);
return (rdataset);
return (rdataset);
return (NULL);
int section)
return (rdataset);
return (NULL);
== ISC_R_SUCCESS)
return (rdataset);
== ISC_R_SUCCESS)
rdataset =
return (rdataset);
== ISC_R_SUCCESS)
rdataset =
return (rdataset);
return (NULL);
isc_region_t r;
return (temp);
return (NULL);
isc_buffer_usedregion(b, &r);
isc_buffer_free(&b);
return (NULL);
return (NULL);
for (i= 0; i < MAX_TRUSTED_KEY; i++) {
char alphnum[] =
int tempnamekeylen;
return (ISC_R_NOMEMORY);
return (result);
int tempnamelen;
int tempnamekeylen;
char *cp;
return (ISC_R_NOMEMORY);
goto cleanup;
cp++;
return (ISC_R_FAILURE);
x = cp--;
x = cp--;
return (ISC_R_NOMEMORY);
return (ISC_R_FAILURE);
*fp = f;
return (ISC_R_SUCCESS);
return (result);
return (ISC_R_FAILURE);
return (ISC_R_FAILURE);
filename);
return (ISC_R_FAILURE);
return (ISC_R_FAILURE);
return (ISC_R_FAILURE);
return (ISC_R_FAILURE);
return (ISC_R_SUCCESS);
#if DIG_SIGCHASE_TD
dig_server_t *s;
void *ptr;
while (s != NULL) {
s, lookup);
ptr = s;
#define __FOLLOW_GLUE__
#ifdef __FOLLOW_GLUE__
isc_region_t r;
#ifdef __FOLLOW_GLUE__
dns_rdatatype_any, &true);
isc_buffer_usedregion(b, &r);
isc_buffer_free(&b);
dns_rdatatype_any, &true);
isc_buffer_usedregion(b, &r);
isc_buffer_free(&b);
dns_rdata_reset(&a);
return (ISC_R_SUCCESS);
int orderp;
unsigned int nlabelsp;
return (ISC_R_FAILURE);
return (ISC_R_SUCCESS);
return (ISC_R_SUCCESS);
return (ISC_R_FAILURE);
dns_rdatatype_any, &true);
return (ISC_R_FAILURE);
return (ISC_R_SUCCESS);
isc_region_t r;
isc_buffer_usedregion(b, &r);
isc_buffer_free(&b);
return (ISC_R_FAILURE);
== ISC_TRUE) {
mctx)
== ISC_R_SUCCESS) {
return (ISC_R_SUCCESS);
return (ISC_R_NOTFOUND);
return (ISC_R_SUCCESS);
return (ISC_R_NOTFOUND);
return (result);
return (ISC_R_NOTFOUND);
return (result);
&newdsrdata) == 0) {
mctx);
return (result);
return (ISC_R_NOTFOUND);
return (ISC_R_SUCCESS);
if (tmplookedup)
return (ISC_R_FAILURE);
return (ISC_R_NOTFOUND);
return (ISC_R_SUCCESS);
#if DIG_SIGCHASE_TD
== ISC_R_SUCCESS) {
have_answer = true;
&name);
if (have_answer) {
goto cleanandgo;
goto cleanandgo;
if (!delegation_follow) {
mctx);
mctx);
goto cleanandgo;
if (have_response) {
goto cleanandgo;
goto cleanandgo;
&tmp_name);
if (have_response)
goto finalstep;
if (have_delegation_ns) {
goto cleanandgo;
goto cleanandgo;
goto cleanandgo;
goto cleanandgo;
goto cleanandgo;
goto cleanandgo;
goto cleanandgo;
goto cleanandgo;
goto cleanandgo;
goto cleanandgo;
goto cleanandgo;
#if DIG_SIGCHASE_BU
!= ISC_R_SUCCESS) {
return (ISC_R_ADDRNOTAVAIL);
dns_rdatatype_any, &true);
return (ISC_R_NOTFOUND);
return (ISC_R_NOTFOUND);
return (ISC_R_NOTFOUND);
return (ISC_R_NOTFOUND);
return (ISC_R_NOTFOUND);
return (ISC_R_NOTFOUND);
return (ISC_R_NOTFOUND);
return (ISC_R_NOTFOUND);
dns_rdatatype_ds, &true);
mctx);
int ret;
#if DIG_SIGCHASE_TD
#if DIG_SIGCHASE_BU
unsigned int nblabel1;
unsigned int nblabel2;
int min_lum_label;
if (ret < 0)
else if (ret > 0)
!= ISC_R_SUCCESS) {
return (ISC_R_FAILURE);
return (ISC_R_FAILURE);
return (ISC_R_SUCCESS);
== ISC_R_SUCCESS);
return (ISC_R_FAILURE);
return (ISC_R_FAILURE);
return (ret);
!= ISC_R_SUCCESS) {
return (ISC_R_FAILURE);
return (ret);
return (ISC_R_SUCCESS);
return (ret);