2013-07-15 17:43:30 -05:00
|
|
|
/**
|
|
|
|
*
|
2014-02-10 18:59:45 -06:00
|
|
|
* \file general.c
|
|
|
|
* @brief getdns_general and related support functions
|
2013-07-15 17:43:30 -05:00
|
|
|
*
|
2013-11-04 17:37:54 -06:00
|
|
|
* The getdns_general function is called by most of the other public entry
|
|
|
|
* points to the library. Private support functions are also included in this
|
|
|
|
* file where they are directly logically related to the getdns_general implementation.
|
2013-07-15 17:43:30 -05:00
|
|
|
*/
|
2013-11-04 17:37:54 -06:00
|
|
|
|
|
|
|
/*
|
2014-02-25 07:12:33 -06:00
|
|
|
* Copyright (c) 2013, NLnet Labs, Verisign, Inc.
|
2013-11-04 17:37:54 -06:00
|
|
|
* All rights reserved.
|
2014-01-10 09:28:28 -06:00
|
|
|
*
|
2013-11-04 17:37:54 -06:00
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions are met:
|
|
|
|
* * Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* * Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
2014-02-25 07:23:19 -06:00
|
|
|
* * Neither the names of the copyright holders nor the
|
2013-11-04 17:37:54 -06:00
|
|
|
* names of its contributors may be used to endorse or promote products
|
|
|
|
* derived from this software without specific prior written permission.
|
2013-10-16 17:33:12 -05:00
|
|
|
*
|
2013-11-04 17:37:54 -06:00
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
|
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
* DISCLAIMED. IN NO EVENT SHALL Verisign, Inc. BE LIABLE FOR ANY
|
|
|
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
|
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
|
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
2013-07-15 17:43:30 -05:00
|
|
|
*/
|
|
|
|
|
2014-05-19 08:50:34 -05:00
|
|
|
#include <stdio.h>
|
2013-10-15 16:28:23 -05:00
|
|
|
#include <string.h>
|
2014-05-19 08:50:34 -05:00
|
|
|
#include "config.h"
|
2016-01-05 05:38:35 -06:00
|
|
|
#include "general.h"
|
2015-06-29 16:32:49 -05:00
|
|
|
#include "gldns/wire2str.h"
|
2013-10-15 16:28:23 -05:00
|
|
|
#include "context.h"
|
2013-10-16 17:33:12 -05:00
|
|
|
#include "types-internal.h"
|
2013-08-15 11:33:05 -05:00
|
|
|
#include "util-internal.h"
|
2014-02-19 09:56:00 -06:00
|
|
|
#include "dnssec.h"
|
2014-10-15 08:12:16 -05:00
|
|
|
#include "stub.h"
|
2016-01-05 05:38:35 -06:00
|
|
|
#include "dict.h"
|
2013-11-05 12:31:29 -06:00
|
|
|
|
2013-10-18 12:55:31 -05:00
|
|
|
/* cancel, cleanup and send timeout to callback */
|
2014-10-08 08:42:33 -05:00
|
|
|
static void
|
2014-01-31 13:43:02 -06:00
|
|
|
ub_resolve_timeout(void *arg)
|
2013-11-05 14:03:44 -06:00
|
|
|
{
|
|
|
|
getdns_dns_req *dns_req = (getdns_dns_req *) arg;
|
2015-08-19 09:30:15 -05:00
|
|
|
(void) _getdns_context_request_timed_out(dns_req);
|
2013-10-18 12:55:31 -05:00
|
|
|
}
|
2013-10-16 17:33:12 -05:00
|
|
|
|
2015-08-19 09:22:38 -05:00
|
|
|
void _getdns_call_user_callback(getdns_dns_req *dns_req,
|
2014-01-27 15:01:37 -06:00
|
|
|
struct getdns_dict *response)
|
2013-11-05 14:03:44 -06:00
|
|
|
{
|
2013-12-06 08:54:06 -06:00
|
|
|
struct getdns_context *context = dns_req->context;
|
2013-11-05 14:03:44 -06:00
|
|
|
getdns_transaction_t trans_id = dns_req->trans_id;
|
|
|
|
getdns_callback_t cb = dns_req->user_callback;
|
|
|
|
void *user_arg = dns_req->user_pointer;
|
|
|
|
|
|
|
|
/* clean up */
|
2015-08-19 09:30:15 -05:00
|
|
|
_getdns_context_clear_outbound_request(dns_req);
|
2015-08-19 09:33:19 -05:00
|
|
|
_getdns_dns_req_free(dns_req);
|
2013-11-05 14:03:44 -06:00
|
|
|
|
2015-09-03 08:07:29 -05:00
|
|
|
context->processing = 1;
|
2014-01-27 15:01:37 -06:00
|
|
|
cb(context,
|
|
|
|
(response ? GETDNS_CALLBACK_COMPLETE : GETDNS_CALLBACK_ERROR),
|
|
|
|
response, user_arg, trans_id);
|
2015-09-03 08:07:29 -05:00
|
|
|
context->processing = 0;
|
2013-10-16 17:33:12 -05:00
|
|
|
}
|
|
|
|
|
2015-12-29 16:06:02 -06:00
|
|
|
static int
|
|
|
|
no_answer(getdns_dns_req *dns_req)
|
|
|
|
{
|
|
|
|
getdns_network_req **netreq_p, *netreq;
|
|
|
|
int new_canonical = 0;
|
|
|
|
uint8_t canon_spc[256];
|
|
|
|
const uint8_t *canon;
|
|
|
|
size_t canon_len;
|
|
|
|
uint8_t owner_spc[256];
|
|
|
|
const uint8_t *owner;
|
|
|
|
size_t owner_len;
|
|
|
|
|
|
|
|
_getdns_rr_iter rr_spc, *rr;
|
|
|
|
_getdns_rdf_iter rdf_spc, *rdf;
|
|
|
|
|
|
|
|
for (netreq_p = dns_req->netreqs; (netreq = *netreq_p); netreq_p++) {
|
|
|
|
if (netreq->response_len == 0 ||
|
|
|
|
GLDNS_ANCOUNT(netreq->response) == 0)
|
|
|
|
continue;
|
|
|
|
canon = netreq->owner->name;
|
|
|
|
canon_len = netreq->owner->name_len;
|
|
|
|
if (netreq->request_type != GETDNS_RRTYPE_CNAME
|
|
|
|
&& GLDNS_ANCOUNT(netreq->response) > 1) do {
|
|
|
|
new_canonical = 0;
|
|
|
|
for ( rr = _getdns_rr_iter_init(&rr_spc
|
|
|
|
, netreq->response
|
|
|
|
, netreq->response_len)
|
|
|
|
; rr && _getdns_rr_iter_section(rr)
|
|
|
|
<= GLDNS_SECTION_ANSWER
|
|
|
|
; rr = _getdns_rr_iter_next(rr)) {
|
|
|
|
|
|
|
|
if (_getdns_rr_iter_section(rr) !=
|
|
|
|
GLDNS_SECTION_ANSWER)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if (gldns_read_uint16(rr->rr_type) !=
|
|
|
|
GETDNS_RRTYPE_CNAME)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
owner = _getdns_owner_if_or_as_decompressed(
|
|
|
|
rr, owner_spc, &owner_len);
|
|
|
|
if (!_getdns_dname_equal(canon, owner))
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if (!(rdf = _getdns_rdf_iter_init(
|
|
|
|
&rdf_spc, rr)))
|
|
|
|
continue;
|
|
|
|
|
|
|
|
canon = _getdns_rdf_if_or_as_decompressed(
|
|
|
|
rdf, canon_spc, &canon_len);
|
|
|
|
new_canonical = 1;
|
|
|
|
}
|
|
|
|
} while (new_canonical);
|
|
|
|
for ( rr = _getdns_rr_iter_init(&rr_spc
|
|
|
|
, netreq->response
|
|
|
|
, netreq->response_len)
|
|
|
|
; rr && _getdns_rr_iter_section(rr)
|
|
|
|
<= GLDNS_SECTION_ANSWER
|
|
|
|
; rr = _getdns_rr_iter_next(rr)) {
|
|
|
|
|
|
|
|
if (_getdns_rr_iter_section(rr) !=
|
|
|
|
GLDNS_SECTION_ANSWER)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if (gldns_read_uint16(rr->rr_type) !=
|
|
|
|
netreq->request_type)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
owner = _getdns_owner_if_or_as_decompressed(
|
|
|
|
rr, owner_spc, &owner_len);
|
|
|
|
if (_getdns_dname_equal(canon, owner))
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
2014-10-15 16:04:39 -05:00
|
|
|
void
|
2015-08-19 09:22:38 -05:00
|
|
|
_getdns_check_dns_req_complete(getdns_dns_req *dns_req)
|
2014-01-27 15:01:37 -06:00
|
|
|
{
|
2015-01-29 05:30:40 -06:00
|
|
|
getdns_network_req **netreq_p, *netreq;
|
2014-10-17 17:25:41 -05:00
|
|
|
int results_found = 0;
|
2014-10-15 16:04:39 -05:00
|
|
|
|
2015-01-29 05:30:40 -06:00
|
|
|
for (netreq_p = dns_req->netreqs; (netreq = *netreq_p); netreq_p++)
|
2014-10-15 16:04:39 -05:00
|
|
|
if (netreq->state != NET_REQ_FINISHED &&
|
|
|
|
netreq->state != NET_REQ_CANCELED)
|
|
|
|
return;
|
2015-02-11 07:55:22 -06:00
|
|
|
else if (netreq->response_len > 0)
|
2014-10-17 17:25:41 -05:00
|
|
|
results_found = 1;
|
2014-10-15 16:04:39 -05:00
|
|
|
|
2015-12-29 16:06:02 -06:00
|
|
|
/* Do we have to check more suffixes on nxdomain/nodata?
|
|
|
|
*/
|
|
|
|
if (dns_req->suffix_appended && /* Something was appended */
|
|
|
|
dns_req->suffix_len > 1 && /* Next suffix available */
|
|
|
|
no_answer(dns_req)) {
|
|
|
|
/* Remove suffix from name */
|
|
|
|
dns_req->name_len -= dns_req->suffix_len - 1;
|
|
|
|
dns_req->name[dns_req->name_len - 1] = 0;
|
|
|
|
do {
|
|
|
|
dns_req->suffix += dns_req->suffix_len;
|
|
|
|
dns_req->suffix_len = *dns_req->suffix++;
|
|
|
|
if (dns_req->suffix_len + dns_req->name_len - 1 <
|
|
|
|
sizeof(dns_req->name)) {
|
|
|
|
memcpy(dns_req->name + dns_req->name_len - 1,
|
|
|
|
dns_req->suffix, dns_req->suffix_len);
|
|
|
|
dns_req->name_len += dns_req->suffix_len - 1;
|
|
|
|
dns_req->suffix_appended = 1;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
} while (dns_req->suffix_len > 1 && *dns_req->suffix);
|
|
|
|
if (dns_req->append_name == GETDNS_APPEND_NAME_ALWAYS ||
|
|
|
|
(dns_req->suffix_len > 1 && *dns_req->suffix)) {
|
|
|
|
for ( netreq_p = dns_req->netreqs
|
|
|
|
; (netreq = *netreq_p)
|
|
|
|
; netreq_p++ ) {
|
|
|
|
_getdns_netreq_reinit(netreq);
|
|
|
|
if (_getdns_submit_netreq(netreq))
|
|
|
|
netreq->state = NET_REQ_FINISHED;
|
|
|
|
}
|
|
|
|
_getdns_check_dns_req_complete(dns_req);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
} else if (
|
|
|
|
( dns_req->append_name ==
|
|
|
|
GETDNS_APPEND_NAME_ONLY_TO_SINGLE_LABEL_AFTER_FAILURE ||
|
|
|
|
dns_req->append_name ==
|
|
|
|
GETDNS_APPEND_NAME_ONLY_TO_MULTIPLE_LABEL_NAME_AFTER_FAILURE
|
|
|
|
) &&
|
|
|
|
!dns_req->suffix_appended &&
|
|
|
|
dns_req->suffix_len > 1 &&
|
|
|
|
no_answer(dns_req)) {
|
|
|
|
/* Initial suffix append */
|
|
|
|
for (
|
|
|
|
; dns_req->suffix_len > 1 && *dns_req->suffix
|
|
|
|
; dns_req->suffix += dns_req->suffix_len
|
|
|
|
, dns_req->suffix_len = *dns_req->suffix++) {
|
|
|
|
|
|
|
|
if (dns_req->suffix_len + dns_req->name_len - 1 <
|
|
|
|
sizeof(dns_req->name)) {
|
|
|
|
memcpy(dns_req->name + dns_req->name_len - 1,
|
|
|
|
dns_req->suffix, dns_req->suffix_len);
|
|
|
|
dns_req->name_len += dns_req->suffix_len - 1;
|
|
|
|
dns_req->suffix_appended = 1;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (dns_req->suffix_appended) {
|
|
|
|
for ( netreq_p = dns_req->netreqs
|
|
|
|
; (netreq = *netreq_p)
|
|
|
|
; netreq_p++ ) {
|
|
|
|
_getdns_netreq_reinit(netreq);
|
|
|
|
if (_getdns_submit_netreq(netreq))
|
|
|
|
netreq->state = NET_REQ_FINISHED;
|
|
|
|
}
|
|
|
|
_getdns_check_dns_req_complete(dns_req);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
2015-03-18 17:45:26 -05:00
|
|
|
if (dns_req->internal_cb)
|
|
|
|
dns_req->internal_cb(dns_req);
|
|
|
|
else if (! results_found)
|
2015-08-19 09:22:38 -05:00
|
|
|
_getdns_call_user_callback(dns_req, NULL);
|
2015-03-18 08:45:06 -05:00
|
|
|
else if (dns_req->dnssec_return_validation_chain
|
2015-10-31 22:28:43 -05:00
|
|
|
#ifdef DNSSEC_ROADBLOCK_AVOIDANCE
|
|
|
|
|| ( dns_req->dnssec_roadblock_avoidance
|
|
|
|
&& !dns_req->avoid_dnssec_roadblocks)
|
|
|
|
#endif
|
|
|
|
|
2015-03-18 08:45:06 -05:00
|
|
|
#ifdef STUB_NATIVE_DNSSEC
|
|
|
|
|| (dns_req->context->resolution_type == GETDNS_RESOLUTION_STUB
|
|
|
|
&& (dns_req->dnssec_return_status ||
|
2015-10-31 22:28:43 -05:00
|
|
|
dns_req->dnssec_return_only_secure
|
|
|
|
))
|
2015-03-18 08:45:06 -05:00
|
|
|
#endif
|
|
|
|
)
|
2015-08-19 09:22:38 -05:00
|
|
|
_getdns_get_validation_chain(dns_req);
|
2014-01-27 15:01:37 -06:00
|
|
|
else
|
2015-08-19 09:22:38 -05:00
|
|
|
_getdns_call_user_callback(
|
2015-08-19 09:33:19 -05:00
|
|
|
dns_req, _getdns_create_getdns_response(dns_req));
|
2013-10-16 17:33:12 -05:00
|
|
|
}
|
|
|
|
|
2015-08-19 03:47:46 -05:00
|
|
|
#ifdef HAVE_LIBUNBOUND
|
2014-10-15 08:12:16 -05:00
|
|
|
static void
|
2014-10-15 16:04:39 -05:00
|
|
|
ub_resolve_callback(void* arg, int err, struct ub_result* ub_res)
|
2014-10-15 08:12:16 -05:00
|
|
|
{
|
2014-10-15 16:04:39 -05:00
|
|
|
getdns_network_req *netreq = (getdns_network_req *) arg;
|
2014-10-15 08:12:16 -05:00
|
|
|
getdns_dns_req *dns_req = netreq->owner;
|
|
|
|
|
|
|
|
netreq->state = NET_REQ_FINISHED;
|
2014-10-15 16:04:39 -05:00
|
|
|
if (err != 0) {
|
2015-08-19 09:22:38 -05:00
|
|
|
_getdns_call_user_callback(dns_req, NULL);
|
2014-10-15 16:04:39 -05:00
|
|
|
return;
|
2014-10-15 08:12:16 -05:00
|
|
|
}
|
2014-10-15 16:04:39 -05:00
|
|
|
/* parse */
|
|
|
|
if (getdns_apply_network_result(netreq, ub_res)) {
|
|
|
|
ub_resolve_free(ub_res);
|
2015-08-19 09:22:38 -05:00
|
|
|
_getdns_call_user_callback(dns_req, NULL);
|
2014-10-15 16:04:39 -05:00
|
|
|
return;
|
2014-10-15 08:12:16 -05:00
|
|
|
}
|
2014-10-15 16:04:39 -05:00
|
|
|
ub_resolve_free(ub_res);
|
2014-10-15 08:12:16 -05:00
|
|
|
|
2015-08-19 09:22:38 -05:00
|
|
|
_getdns_check_dns_req_complete(dns_req);
|
2014-10-15 16:04:39 -05:00
|
|
|
|
|
|
|
} /* ub_resolve_callback */
|
2015-08-19 03:47:46 -05:00
|
|
|
#endif
|
2014-10-15 08:12:16 -05:00
|
|
|
|
|
|
|
|
2015-10-31 07:04:08 -05:00
|
|
|
getdns_return_t
|
|
|
|
_getdns_submit_netreq(getdns_network_req *netreq)
|
2014-10-15 08:12:16 -05:00
|
|
|
{
|
|
|
|
getdns_return_t r;
|
|
|
|
getdns_dns_req *dns_req = netreq->owner;
|
2015-06-29 16:32:49 -05:00
|
|
|
char name[1024];
|
2014-10-15 08:12:16 -05:00
|
|
|
|
2015-10-31 22:28:43 -05:00
|
|
|
|
2015-10-31 07:04:08 -05:00
|
|
|
#ifdef STUB_NATIVE_DNSSEC
|
2015-10-31 22:28:43 -05:00
|
|
|
# ifdef DNSSEC_ROADBLOCK_AVOIDANCE
|
|
|
|
|
|
|
|
if ((dns_req->context->resolution_type == GETDNS_RESOLUTION_RECURSING
|
|
|
|
&& !dns_req->dnssec_roadblock_avoidance)
|
|
|
|
|| dns_req->avoid_dnssec_roadblocks) {
|
|
|
|
# else
|
|
|
|
if ( dns_req->context->resolution_type == GETDNS_RESOLUTION_RECURSING) {
|
|
|
|
# endif
|
|
|
|
#else
|
|
|
|
if ( dns_req->context->resolution_type == GETDNS_RESOLUTION_RECURSING
|
2015-03-18 08:45:06 -05:00
|
|
|
|| dns_req->dnssec_return_status
|
|
|
|
|| dns_req->dnssec_return_only_secure
|
2015-10-31 22:28:43 -05:00
|
|
|
|| dns_req->dnssec_return_validation_chain) {
|
2015-03-18 08:45:06 -05:00
|
|
|
#endif
|
2014-10-15 08:12:16 -05:00
|
|
|
/* schedule the timeout */
|
|
|
|
if (! dns_req->timeout.timeout_cb) {
|
|
|
|
dns_req->timeout.userarg = dns_req;
|
|
|
|
dns_req->timeout.read_cb = NULL;
|
|
|
|
dns_req->timeout.write_cb = NULL;
|
|
|
|
dns_req->timeout.timeout_cb = ub_resolve_timeout;
|
|
|
|
dns_req->timeout.ev = NULL;
|
|
|
|
if ((r = dns_req->loop->vmt->schedule(dns_req->loop, -1,
|
|
|
|
dns_req->context->timeout, &dns_req->timeout)))
|
|
|
|
return r;
|
|
|
|
}
|
2015-06-29 16:32:49 -05:00
|
|
|
(void) gldns_wire2str_dname_buf(dns_req->name,
|
|
|
|
dns_req->name_len, name, sizeof(name));
|
2014-10-15 08:12:16 -05:00
|
|
|
|
2015-08-19 03:47:46 -05:00
|
|
|
#ifdef HAVE_LIBUNBOUND
|
2014-10-15 08:12:16 -05:00
|
|
|
return ub_resolve_async(dns_req->context->unbound_ctx,
|
2015-12-29 10:34:14 -06:00
|
|
|
name, netreq->request_type, netreq->owner->request_class,
|
2014-10-15 08:12:16 -05:00
|
|
|
netreq, ub_resolve_callback, &(netreq->unbound_id)) ?
|
|
|
|
GETDNS_RETURN_GENERIC_ERROR : GETDNS_RETURN_GOOD;
|
2015-08-19 03:47:46 -05:00
|
|
|
#else
|
2015-10-22 05:13:40 -05:00
|
|
|
return GETDNS_RETURN_NOT_IMPLEMENTED;
|
2015-08-19 03:47:46 -05:00
|
|
|
#endif
|
2014-10-15 08:12:16 -05:00
|
|
|
}
|
|
|
|
/* Submit with stub resolver */
|
2015-08-19 09:22:38 -05:00
|
|
|
return _getdns_submit_stub_request(netreq);
|
2013-08-15 16:51:26 -05:00
|
|
|
}
|
|
|
|
|
2016-01-05 05:38:35 -06:00
|
|
|
|
|
|
|
/**
|
|
|
|
* structure used by validate_extensions() to check extension formats
|
|
|
|
*/
|
|
|
|
typedef struct getdns_extension_format
|
|
|
|
{
|
|
|
|
char *extstring;
|
|
|
|
getdns_data_type exttype;
|
|
|
|
int implemented;
|
|
|
|
} getdns_extension_format;
|
|
|
|
|
|
|
|
static int
|
|
|
|
extformatcmp(const void *a, const void *b)
|
|
|
|
{
|
|
|
|
return strcmp(((getdns_extension_format *) a)->extstring,
|
|
|
|
((getdns_extension_format *) b)->extstring);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*---------------------------------------- validate_extensions */
|
|
|
|
static getdns_return_t
|
|
|
|
validate_extensions(struct getdns_dict * extensions)
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* this is a comprehensive list of extensions and their data types
|
|
|
|
* used by validate_extensions()
|
|
|
|
* The list has to be in sorted order for bsearch lookup in function
|
|
|
|
* validate_extensions.
|
|
|
|
*/
|
|
|
|
static getdns_extension_format extformats[] = {
|
|
|
|
{"add_opt_parameters" , t_dict, 1},
|
|
|
|
{"add_warning_for_bad_dns" , t_int , 1},
|
|
|
|
{"dnssec_return_only_secure" , t_int , 1},
|
|
|
|
{"dnssec_return_status" , t_int , 1},
|
|
|
|
{"dnssec_return_validation_chain", t_int , 1},
|
|
|
|
{"dnssec_roadblock_avoidance" , t_int ,
|
|
|
|
#if defined(DNSSEC_ROADBLOCK_AVOIDANCE) && defined(HAVE_LIBUNBOUND)
|
|
|
|
1},
|
|
|
|
#else
|
|
|
|
0},
|
|
|
|
#endif
|
|
|
|
{"edns_cookies" , t_int ,
|
|
|
|
#ifdef EDNS_COOKIES
|
|
|
|
1},
|
|
|
|
#else
|
|
|
|
0},
|
|
|
|
#endif
|
|
|
|
{"return_api_information" , t_int , 1},
|
|
|
|
{"return_both_v4_and_v6" , t_int , 1},
|
|
|
|
{"return_call_reporting" , t_int , 1},
|
|
|
|
{"specify_class" , t_int , 1},
|
|
|
|
};
|
|
|
|
|
|
|
|
struct getdns_dict_item *item;
|
|
|
|
getdns_extension_format *extformat;
|
|
|
|
|
|
|
|
if (extensions)
|
|
|
|
RBTREE_FOR(item, struct getdns_dict_item *,
|
|
|
|
&(extensions->root)) {
|
|
|
|
|
|
|
|
getdns_extension_format key;
|
|
|
|
key.extstring = (char *) item->node.key;
|
|
|
|
extformat = bsearch(&key, extformats,
|
|
|
|
sizeof(extformats) /
|
|
|
|
sizeof(getdns_extension_format),
|
|
|
|
sizeof(getdns_extension_format), extformatcmp);
|
|
|
|
if (!extformat)
|
|
|
|
return GETDNS_RETURN_NO_SUCH_EXTENSION;
|
|
|
|
|
|
|
|
if (!extformat->implemented)
|
|
|
|
return GETDNS_RETURN_NOT_IMPLEMENTED;
|
|
|
|
|
|
|
|
if (item->i.dtype != extformat->exttype)
|
|
|
|
return GETDNS_RETURN_EXTENSION_MISFORMAT;
|
|
|
|
}
|
|
|
|
return GETDNS_RETURN_GOOD;
|
|
|
|
} /* _getdns_validate_extensions */
|
|
|
|
|
|
|
|
|
2014-10-15 16:04:39 -05:00
|
|
|
static getdns_return_t
|
2014-10-13 17:14:25 -05:00
|
|
|
getdns_general_ns(getdns_context *context, getdns_eventloop *loop,
|
|
|
|
const char *name, uint16_t request_type, getdns_dict *extensions,
|
2015-06-22 17:00:20 -05:00
|
|
|
void *userarg, getdns_dns_req **dnsreq_p,
|
2015-03-18 17:45:26 -05:00
|
|
|
getdns_callback_t callbackfn, internal_cb_t internal_cb, int usenamespaces)
|
2013-11-04 17:37:54 -06:00
|
|
|
{
|
2014-10-13 17:14:25 -05:00
|
|
|
getdns_return_t r = GETDNS_RETURN_GOOD;
|
2015-01-29 05:30:40 -06:00
|
|
|
getdns_network_req *netreq, **netreq_p;
|
2014-10-13 17:14:25 -05:00
|
|
|
getdns_dns_req *req;
|
|
|
|
getdns_dict *localnames_response;
|
|
|
|
size_t i;
|
2013-11-05 14:03:44 -06:00
|
|
|
|
2015-03-18 17:45:26 -05:00
|
|
|
if (!context || !name || (!callbackfn && !internal_cb))
|
2014-01-15 15:25:46 -06:00
|
|
|
return GETDNS_RETURN_INVALID_PARAMETER;
|
2014-10-13 17:14:25 -05:00
|
|
|
|
2015-08-19 09:22:38 -05:00
|
|
|
if ((r = _getdns_validate_dname(name)))
|
2014-10-13 17:14:25 -05:00
|
|
|
return r;
|
2013-11-05 14:03:44 -06:00
|
|
|
|
2016-01-05 05:38:35 -06:00
|
|
|
if (extensions && (r = validate_extensions(extensions)))
|
2014-10-13 17:14:25 -05:00
|
|
|
return r;
|
2013-11-05 14:03:44 -06:00
|
|
|
|
2014-10-13 17:14:25 -05:00
|
|
|
/* Set up the context assuming we won't use the specified namespaces.
|
|
|
|
This is (currently) identical to setting up a pure DNS namespace */
|
2015-08-19 09:30:15 -05:00
|
|
|
if ((r = _getdns_context_prepare_for_resolution(context, 0)))
|
2014-10-13 17:14:25 -05:00
|
|
|
return r;
|
|
|
|
|
|
|
|
/* create the request */
|
2015-08-19 09:33:19 -05:00
|
|
|
if (!(req = _getdns_dns_req_new(context, loop, name, request_type, extensions)))
|
2014-10-13 17:14:25 -05:00
|
|
|
return GETDNS_RETURN_MEMORY_ERROR;
|
2013-11-05 14:03:44 -06:00
|
|
|
|
|
|
|
req->user_pointer = userarg;
|
|
|
|
req->user_callback = callbackfn;
|
2015-03-18 17:45:26 -05:00
|
|
|
req->internal_cb = internal_cb;
|
2013-11-05 14:03:44 -06:00
|
|
|
|
2015-06-22 17:00:20 -05:00
|
|
|
if (dnsreq_p)
|
|
|
|
*dnsreq_p = req;
|
2013-11-05 14:03:44 -06:00
|
|
|
|
2015-08-19 09:30:15 -05:00
|
|
|
_getdns_context_track_outbound_request(req);
|
2013-11-05 14:03:44 -06:00
|
|
|
|
2014-10-13 17:14:25 -05:00
|
|
|
if (!usenamespaces)
|
|
|
|
/* issue all network requests */
|
2015-01-29 05:30:40 -06:00
|
|
|
for ( netreq_p = req->netreqs
|
|
|
|
; !r && (netreq = *netreq_p)
|
|
|
|
; netreq_p++)
|
2015-10-31 07:04:08 -05:00
|
|
|
r = _getdns_submit_netreq(netreq);
|
2014-10-13 17:14:25 -05:00
|
|
|
|
|
|
|
else for (i = 0; i < context->namespace_count; i++) {
|
|
|
|
if (context->namespaces[i] == GETDNS_NAMESPACE_LOCALNAMES) {
|
|
|
|
|
2015-08-19 09:30:15 -05:00
|
|
|
if (!(r = _getdns_context_local_namespace_resolve(
|
2014-10-23 16:00:30 -05:00
|
|
|
req, &localnames_response))) {
|
2014-10-13 17:14:25 -05:00
|
|
|
|
2015-08-19 09:22:38 -05:00
|
|
|
_getdns_call_user_callback
|
2014-10-13 17:14:25 -05:00
|
|
|
( req, localnames_response);
|
2014-10-14 18:13:39 -05:00
|
|
|
break;
|
|
|
|
}
|
2014-10-13 17:14:25 -05:00
|
|
|
} else if (context->namespaces[i] == GETDNS_NAMESPACE_DNS) {
|
|
|
|
|
|
|
|
/* TODO: We will get a good return code here even if
|
|
|
|
the name is not found (NXDOMAIN). We should consider
|
|
|
|
if this means we go onto the next namespace instead
|
|
|
|
of returning */
|
2014-10-14 18:13:39 -05:00
|
|
|
r = GETDNS_RETURN_GOOD;
|
2015-01-29 05:30:40 -06:00
|
|
|
for ( netreq_p = req->netreqs
|
|
|
|
; !r && (netreq = *netreq_p)
|
|
|
|
; netreq_p++)
|
2015-10-31 07:04:08 -05:00
|
|
|
r = _getdns_submit_netreq(netreq);
|
2014-10-13 17:14:25 -05:00
|
|
|
break;
|
|
|
|
} else
|
|
|
|
r = GETDNS_RETURN_BAD_CONTEXT;
|
|
|
|
}
|
|
|
|
|
2013-11-05 14:03:44 -06:00
|
|
|
if (r != 0) {
|
|
|
|
/* clean up the request */
|
2015-08-19 09:30:15 -05:00
|
|
|
_getdns_context_clear_outbound_request(req);
|
2015-08-19 09:33:19 -05:00
|
|
|
_getdns_dns_req_free(req);
|
2014-10-13 17:14:25 -05:00
|
|
|
return r;
|
2013-11-05 14:03:44 -06:00
|
|
|
}
|
|
|
|
return GETDNS_RETURN_GOOD;
|
2014-10-13 17:14:25 -05:00
|
|
|
} /* getdns_general_ns */
|
2013-08-14 16:19:06 -05:00
|
|
|
|
2013-11-05 14:03:44 -06:00
|
|
|
getdns_return_t
|
2015-08-19 09:22:38 -05:00
|
|
|
_getdns_general_loop(getdns_context *context, getdns_eventloop *loop,
|
2014-10-13 17:14:25 -05:00
|
|
|
const char *name, uint16_t request_type, getdns_dict *extensions,
|
2015-06-22 17:00:20 -05:00
|
|
|
void *userarg, getdns_dns_req **dnsreq_p,
|
2015-03-18 17:45:26 -05:00
|
|
|
getdns_callback_t callback, internal_cb_t internal_cb)
|
2013-11-04 17:37:54 -06:00
|
|
|
{
|
2014-10-13 17:14:25 -05:00
|
|
|
return getdns_general_ns(context, loop,
|
|
|
|
name, request_type, extensions,
|
2015-06-22 17:00:20 -05:00
|
|
|
userarg, dnsreq_p, callback, internal_cb, 0);
|
2013-11-05 14:03:44 -06:00
|
|
|
|
2014-10-13 17:14:25 -05:00
|
|
|
} /* getdns_general_loop */
|
2014-01-10 09:28:28 -06:00
|
|
|
|
2014-10-13 17:14:25 -05:00
|
|
|
getdns_return_t
|
2015-08-19 09:22:38 -05:00
|
|
|
_getdns_address_loop(getdns_context *context, getdns_eventloop *loop,
|
2014-10-13 17:14:25 -05:00
|
|
|
const char *name, getdns_dict *extensions, void *userarg,
|
|
|
|
getdns_transaction_t *transaction_id, getdns_callback_t callback)
|
|
|
|
{
|
2015-04-02 06:58:27 -05:00
|
|
|
getdns_dict *my_extensions = extensions;
|
2014-10-13 17:14:25 -05:00
|
|
|
getdns_return_t r;
|
2015-04-02 06:58:27 -05:00
|
|
|
uint32_t value;
|
2015-06-22 17:00:20 -05:00
|
|
|
getdns_dns_req *dnsreq = NULL;
|
2014-01-27 18:32:54 -06:00
|
|
|
|
2015-04-02 06:58:27 -05:00
|
|
|
if (!my_extensions) {
|
|
|
|
if (!(my_extensions=getdns_dict_create_with_context(context)))
|
2014-10-13 17:14:25 -05:00
|
|
|
return GETDNS_RETURN_MEMORY_ERROR;
|
2015-04-02 06:58:27 -05:00
|
|
|
} else if (
|
|
|
|
getdns_dict_get_int(my_extensions, "return_both_v4_and_v6", &value)
|
2015-08-19 09:30:15 -05:00
|
|
|
&& (r = _getdns_dict_copy(extensions, &my_extensions)))
|
2014-10-13 17:14:25 -05:00
|
|
|
return r;
|
2015-04-02 06:58:27 -05:00
|
|
|
|
|
|
|
if (my_extensions != extensions && (r = getdns_dict_set_int(
|
|
|
|
my_extensions, "return_both_v4_and_v6", GETDNS_EXTENSION_TRUE)))
|
|
|
|
return r;
|
|
|
|
|
2014-10-13 17:14:25 -05:00
|
|
|
r = getdns_general_ns(context, loop,
|
2015-04-02 06:58:27 -05:00
|
|
|
name, GETDNS_RRTYPE_AAAA, my_extensions,
|
2015-06-22 17:00:20 -05:00
|
|
|
userarg, &dnsreq, callback, NULL, 1);
|
|
|
|
if (dnsreq && transaction_id)
|
|
|
|
*transaction_id = dnsreq->trans_id;
|
2013-11-05 14:03:44 -06:00
|
|
|
|
2015-04-02 06:58:27 -05:00
|
|
|
if (my_extensions != extensions)
|
|
|
|
getdns_dict_destroy(my_extensions);
|
2013-11-05 14:03:44 -06:00
|
|
|
|
2014-10-13 17:14:25 -05:00
|
|
|
return r;
|
|
|
|
} /* getdns_address_loop */
|
|
|
|
|
2014-10-15 16:04:39 -05:00
|
|
|
getdns_return_t
|
2015-08-19 09:22:38 -05:00
|
|
|
_getdns_hostname_loop(getdns_context *context, getdns_eventloop *loop,
|
2014-10-15 16:04:39 -05:00
|
|
|
getdns_dict *address, getdns_dict *extensions, void *userarg,
|
|
|
|
getdns_transaction_t *transaction_id, getdns_callback_t callback)
|
|
|
|
{
|
|
|
|
struct getdns_bindata *address_data;
|
|
|
|
struct getdns_bindata *address_type;
|
|
|
|
uint16_t req_type;
|
2015-03-12 17:09:04 -05:00
|
|
|
char name[1024];
|
2014-10-15 16:04:39 -05:00
|
|
|
getdns_return_t retval;
|
2015-06-22 17:00:20 -05:00
|
|
|
getdns_dns_req *dnsreq = NULL;
|
2014-10-15 16:04:39 -05:00
|
|
|
|
|
|
|
if ((retval =
|
|
|
|
getdns_dict_get_bindata(address, "address_data",
|
|
|
|
&address_data)) != GETDNS_RETURN_GOOD)
|
|
|
|
return retval;
|
|
|
|
if ((retval =
|
|
|
|
getdns_dict_get_bindata(address, "address_type",
|
|
|
|
&address_type)) != GETDNS_RETURN_GOOD)
|
|
|
|
return retval;
|
|
|
|
if ((strncmp(GETDNS_STR_IPV4, (char *) address_type->data,
|
|
|
|
( strlen(GETDNS_STR_IPV4) < address_type->size
|
|
|
|
? strlen(GETDNS_STR_IPV4) : address_type->size )) == 0
|
|
|
|
&& address_data->size == 4)
|
|
|
|
|| (strncmp(GETDNS_STR_IPV6, (char *) address_type->data,
|
|
|
|
( strlen(GETDNS_STR_IPV6) < address_type->size
|
|
|
|
? strlen(GETDNS_STR_IPV6) : address_type->size )) == 0
|
|
|
|
&& address_data->size == 16))
|
|
|
|
req_type = GETDNS_RRTYPE_PTR;
|
|
|
|
else
|
|
|
|
return GETDNS_RETURN_INVALID_PARAMETER;
|
2015-03-12 17:09:04 -05:00
|
|
|
|
|
|
|
switch (address_data->size) {
|
|
|
|
case 4:
|
|
|
|
(void)snprintf(name, sizeof(name),
|
2015-12-24 07:41:50 -06:00
|
|
|
"%d.%d.%d.%d.in-addr.arpa.",
|
|
|
|
(int)((uint8_t *)address_data->data)[3],
|
|
|
|
(int)((uint8_t *)address_data->data)[2],
|
|
|
|
(int)((uint8_t *)address_data->data)[1],
|
|
|
|
(int)((uint8_t *)address_data->data)[0]);
|
2015-03-12 17:09:04 -05:00
|
|
|
break;
|
|
|
|
case 16:
|
|
|
|
(void)snprintf(name, sizeof(name),
|
2015-12-24 07:41:50 -06:00
|
|
|
"%x.%x.%x.%x.%x.%x.%x.%x."
|
|
|
|
"%x.%x.%x.%x.%x.%x.%x.%x."
|
|
|
|
"%x.%x.%x.%x.%x.%x.%x.%x."
|
|
|
|
"%x.%x.%x.%x.%x.%x.%x.%x.ip6.arpa.",
|
|
|
|
(int)(((uint8_t *)address_data->data)[15] & 0x0F),
|
|
|
|
(int)(((uint8_t *)address_data->data)[15] >> 4),
|
|
|
|
(int)(((uint8_t *)address_data->data)[14] & 0x0F),
|
|
|
|
(int)(((uint8_t *)address_data->data)[14] >> 4),
|
|
|
|
(int)(((uint8_t *)address_data->data)[13] & 0x0F),
|
|
|
|
(int)(((uint8_t *)address_data->data)[13] >> 4),
|
|
|
|
(int)(((uint8_t *)address_data->data)[12] & 0x0F),
|
|
|
|
(int)(((uint8_t *)address_data->data)[12] >> 4),
|
|
|
|
(int)(((uint8_t *)address_data->data)[11] & 0x0F),
|
|
|
|
(int)(((uint8_t *)address_data->data)[11] >> 4),
|
|
|
|
(int)(((uint8_t *)address_data->data)[10] & 0x0F),
|
|
|
|
(int)(((uint8_t *)address_data->data)[10] >> 4),
|
|
|
|
(int)(((uint8_t *)address_data->data)[9] & 0x0F),
|
|
|
|
(int)(((uint8_t *)address_data->data)[9] >> 4),
|
|
|
|
(int)(((uint8_t *)address_data->data)[8] & 0x0F),
|
|
|
|
(int)(((uint8_t *)address_data->data)[8] >> 4),
|
|
|
|
(int)(((uint8_t *)address_data->data)[7] & 0x0F),
|
|
|
|
(int)(((uint8_t *)address_data->data)[7] >> 4),
|
|
|
|
(int)(((uint8_t *)address_data->data)[6] & 0x0F),
|
|
|
|
(int)(((uint8_t *)address_data->data)[6] >> 4),
|
|
|
|
(int)(((uint8_t *)address_data->data)[5] & 0x0F),
|
|
|
|
(int)(((uint8_t *)address_data->data)[5] >> 4),
|
|
|
|
(int)(((uint8_t *)address_data->data)[4] & 0x0F),
|
|
|
|
(int)(((uint8_t *)address_data->data)[4] >> 4),
|
|
|
|
(int)(((uint8_t *)address_data->data)[3] & 0x0F),
|
|
|
|
(int)(((uint8_t *)address_data->data)[3] >> 4),
|
|
|
|
(int)(((uint8_t *)address_data->data)[2] & 0x0F),
|
|
|
|
(int)(((uint8_t *)address_data->data)[2] >> 4),
|
|
|
|
(int)(((uint8_t *)address_data->data)[1] & 0x0F),
|
|
|
|
(int)(((uint8_t *)address_data->data)[1] >> 4),
|
|
|
|
(int)(((uint8_t *)address_data->data)[0] & 0x0F),
|
|
|
|
(int)(((uint8_t *)address_data->data)[0] >> 4));
|
2015-03-12 17:09:04 -05:00
|
|
|
break;
|
|
|
|
default:
|
2014-10-15 16:04:39 -05:00
|
|
|
return GETDNS_RETURN_INVALID_PARAMETER;
|
2015-03-12 17:09:04 -05:00
|
|
|
}
|
2015-08-19 09:22:38 -05:00
|
|
|
retval = _getdns_general_loop(context, loop, name, req_type,
|
2015-06-22 17:00:20 -05:00
|
|
|
extensions, userarg, &dnsreq, callback, NULL);
|
|
|
|
if (dnsreq && transaction_id)
|
|
|
|
*transaction_id = dnsreq->trans_id;
|
2014-10-15 16:04:39 -05:00
|
|
|
return retval;
|
|
|
|
} /* getdns_hostname_loop */
|
|
|
|
|
|
|
|
getdns_return_t
|
2015-08-19 09:22:38 -05:00
|
|
|
_getdns_service_loop(getdns_context *context, getdns_eventloop *loop,
|
2014-10-15 16:04:39 -05:00
|
|
|
const char *name, getdns_dict *extensions, void *userarg,
|
|
|
|
getdns_transaction_t * transaction_id, getdns_callback_t callback)
|
|
|
|
{
|
2015-06-22 17:00:20 -05:00
|
|
|
getdns_return_t r;
|
|
|
|
getdns_dns_req *dnsreq = NULL;
|
|
|
|
r = getdns_general_ns(context, loop, name, GETDNS_RRTYPE_SRV,
|
|
|
|
extensions, userarg, &dnsreq, callback, NULL, 1);
|
|
|
|
if (dnsreq && transaction_id)
|
|
|
|
*transaction_id = dnsreq->trans_id;
|
|
|
|
return r;
|
2014-10-15 16:04:39 -05:00
|
|
|
} /* getdns_service_loop */
|
|
|
|
|
2014-10-13 17:14:25 -05:00
|
|
|
/**
|
|
|
|
* getdns_general
|
|
|
|
*/
|
|
|
|
getdns_return_t
|
|
|
|
getdns_general(getdns_context *context,
|
|
|
|
const char *name, uint16_t request_type, getdns_dict *extensions,
|
|
|
|
void *userarg, getdns_transaction_t * transaction_id,
|
|
|
|
getdns_callback_t callback)
|
|
|
|
{
|
2015-06-22 17:00:20 -05:00
|
|
|
getdns_return_t r;
|
|
|
|
getdns_dns_req *dnsreq = NULL;
|
|
|
|
|
2014-10-14 18:13:39 -05:00
|
|
|
if (!context) return GETDNS_RETURN_INVALID_PARAMETER;
|
2015-08-19 09:22:38 -05:00
|
|
|
r = _getdns_general_loop(context, context->extension,
|
2014-10-13 17:14:25 -05:00
|
|
|
name, request_type, extensions,
|
2015-06-22 17:00:20 -05:00
|
|
|
userarg, &dnsreq, callback, NULL);
|
|
|
|
if (dnsreq && transaction_id)
|
|
|
|
*transaction_id = dnsreq->trans_id;
|
|
|
|
return r;
|
2013-11-05 14:03:44 -06:00
|
|
|
} /* getdns_general */
|
2013-07-15 17:43:30 -05:00
|
|
|
|
2013-08-13 09:02:09 -05:00
|
|
|
/*
|
|
|
|
* getdns_address
|
|
|
|
*
|
|
|
|
*/
|
2013-11-05 14:03:44 -06:00
|
|
|
getdns_return_t
|
2014-10-13 17:14:25 -05:00
|
|
|
getdns_address(getdns_context *context,
|
|
|
|
const char *name, getdns_dict *extensions, void *userarg,
|
|
|
|
getdns_transaction_t *transaction_id, getdns_callback_t callback)
|
2013-11-05 14:03:44 -06:00
|
|
|
{
|
2014-10-14 18:13:39 -05:00
|
|
|
if (!context) return GETDNS_RETURN_INVALID_PARAMETER;
|
2015-08-19 09:22:38 -05:00
|
|
|
return _getdns_address_loop(context, context->extension,
|
2014-10-13 17:14:25 -05:00
|
|
|
name, extensions, userarg,
|
|
|
|
transaction_id, callback);
|
2014-02-10 18:59:45 -06:00
|
|
|
} /* getdns_address */
|
2013-08-13 09:02:09 -05:00
|
|
|
|
2014-10-15 16:04:39 -05:00
|
|
|
/*
|
|
|
|
* getdns_hostname
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
getdns_return_t
|
|
|
|
getdns_hostname(getdns_context *context,
|
|
|
|
getdns_dict *address, getdns_dict *extensions, void *userarg,
|
|
|
|
getdns_transaction_t *transaction_id, getdns_callback_t callback)
|
|
|
|
{
|
|
|
|
if (!context) return GETDNS_RETURN_INVALID_PARAMETER;
|
2015-08-19 09:22:38 -05:00
|
|
|
return _getdns_hostname_loop(context, context->extension,
|
2014-10-15 16:04:39 -05:00
|
|
|
address, extensions, userarg, transaction_id, callback);
|
|
|
|
} /* getdns_hostname */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* getdns_service
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
getdns_return_t
|
|
|
|
getdns_service(getdns_context *context,
|
|
|
|
const char *name, getdns_dict *extensions, void *userarg,
|
|
|
|
getdns_transaction_t *transaction_id, getdns_callback_t callback)
|
|
|
|
{
|
|
|
|
if (!context) return GETDNS_RETURN_INVALID_PARAMETER;
|
2015-08-19 09:22:38 -05:00
|
|
|
return _getdns_service_loop(context, context->extension,
|
2014-10-15 16:04:39 -05:00
|
|
|
name, extensions, userarg, transaction_id, callback);
|
|
|
|
} /* getdns_service */
|
2014-10-13 17:14:25 -05:00
|
|
|
|
2013-07-15 17:43:30 -05:00
|
|
|
/* getdns_general.c */
|