aboutsummaryrefslogtreecommitdiffstats
path: root/drill
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2017-02-03 13:01:00 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2017-02-03 13:01:00 +0000
commitc6342fe2e90510d8d2296423f2ca92818a7b3d18 (patch)
tree0cc9064980c804a7bf5cc6d96c9249950c7e56a9 /drill
parent65be028f32ed37dce84f6328d4a7172132c8c224 (diff)
downloadsrc-c6342fe2e90510d8d2296423f2ca92818a7b3d18.tar.gz
src-c6342fe2e90510d8d2296423f2ca92818a7b3d18.zip
Notes
Notes: svn path=/vendor/ldns/dist/; revision=313156 svn path=/vendor/ldns/1.7.0/; revision=313157; tag=vendor/ldns/1.7.0
Diffstat (limited to 'drill')
-rw-r--r--drill/chasetrace.c328
-rw-r--r--drill/config.h.in7
-rwxr-xr-xdrill/configure375
-rw-r--r--drill/configure.ac5
-rw-r--r--drill/drill.1.in28
-rw-r--r--drill/drill.c181
-rw-r--r--drill/drill.h6
-rw-r--r--drill/error.c33
-rw-r--r--drill/securetrace.c15
-rw-r--r--drill/work.c4
10 files changed, 540 insertions, 442 deletions
diff --git a/drill/chasetrace.c b/drill/chasetrace.c
index 370f627673e2..1f8a2901ab26 100644
--- a/drill/chasetrace.c
+++ b/drill/chasetrace.c
@@ -11,51 +11,163 @@
#include "drill.h"
#include <ldns/ldns.h>
+/* Cache all RRs from rr_list "rr_list" to "referrals" database for lookup
+ * later on. Print the NS RRs that were not already present.
+ */
+static void add_rr_list_to_referrals(
+ ldns_dnssec_zone *referrals, ldns_rr_list *rr_list)
+{
+ size_t i;
+ ldns_rr *rr;
+ ldns_dnssec_rrsets *rrset;
+ ldns_dnssec_rrs *rrs;
+
+ for (i = 0; i < ldns_rr_list_rr_count(rr_list); i++) {
+ rr = ldns_rr_list_rr(rr_list, i);
+ /* Check if a RR equal to "rr" is present in "referrals" */
+ rrset = ldns_dnssec_zone_find_rrset(
+ referrals, ldns_rr_owner(rr), ldns_rr_get_type(rr));
+ if (rrset) {
+ for (rrs = rrset->rrs; rrs; rrs = rrs->next)
+ if (ldns_rr_compare(rr, rrs->rr) == 0)
+ break;
+ if (rrs) continue; /* "rr" is present, next! */
+ }
+ if (ldns_rr_get_type(rr) == LDNS_RR_TYPE_NS && verbosity != -1)
+ ldns_rr_print(stdout, rr);
+ (void) ldns_dnssec_zone_add_rr(referrals, rr);
+ }
+}
+
+/* Cache all RRs from packet "p" to "referrals" database for lookup later on.
+ * Print the NS RRs that were not already present.
+ */
+static void add_referrals(ldns_dnssec_zone *referrals, ldns_pkt *p)
+{
+ ldns_rr_list *l = ldns_pkt_all_noquestion(p);
+ if (l) {
+ add_rr_list_to_referrals(referrals, l);
+ ldns_rr_list_free(l);
+ }
+}
+
+/* Equip name-server "res" with the name-servers authoritative for as much
+ * of "name" as possible. Lookup addresses if needed.
+ */
+static bool set_nss_for_name(
+ ldns_resolver *res, ldns_dnssec_zone *referrals, ldns_rdf *name,
+ ldns_resolver *local_res, ldns_rr_class c)
+{
+ ldns_dnssec_rrsets *nss = NULL;
+ ldns_dnssec_rrs *nss_rrs;
+ ldns_dnssec_rrsets *as = NULL;
+ ldns_dnssec_rrs *as_rrs;
+ ldns_rdf *lookup = ldns_rdf_clone(name);
+ ldns_rdf *new_lookup;
+ ldns_rdf *addr;
+ ldns_rr_list *addrs;
+
+ /* nss will become the rrset of as much of "name" as possible */
+ for (;;) {
+ nss = ldns_dnssec_zone_find_rrset(
+ referrals, lookup, LDNS_RR_TYPE_NS);
+ if (nss != NULL) {
+ ldns_rdf_deep_free(lookup);
+ break;
+ }
+ new_lookup = ldns_dname_left_chop(lookup);
+ ldns_rdf_deep_free(lookup);
+ lookup = new_lookup;
+ if (!lookup) {
+ error("No referrals for name found");
+ return false;
+ }
+ }
+
+ /* remove the old nameserver from the resolver */
+ while ((addr = ldns_resolver_pop_nameserver(res)))
+ ldns_rdf_deep_free(addr);
+
+ /* Find and add the address records for the rrset as name-servers */
+ for (nss_rrs = nss->rrs; nss_rrs; nss_rrs = nss_rrs->next) {
+
+ if ((as = ldns_dnssec_zone_find_rrset(
+ referrals, ldns_rr_rdf(nss_rrs->rr, 0), LDNS_RR_TYPE_A)))
+ for (as_rrs = as->rrs; as_rrs; as_rrs = as_rrs->next)
+ (void) ldns_resolver_push_nameserver(
+ res, ldns_rr_rdf(as_rrs->rr, 0));
+
+ if ((as = ldns_dnssec_zone_find_rrset(
+ referrals, ldns_rr_rdf(nss_rrs->rr, 0), LDNS_RR_TYPE_AAAA)))
+ for (as_rrs = as->rrs; as_rrs; as_rrs = as_rrs->next)
+ (void) ldns_resolver_push_nameserver(
+ res, ldns_rr_rdf(as_rrs->rr, 0));
+ }
+ /* Is our resolver equipped with name-servers? Good! We're done */
+ if (ldns_resolver_nameserver_count(res) > 0)
+ return true;
+
+ /* Lookup addresses with local resolver add add to "referrals" database */
+ addrs = ldns_rr_list_new();
+ for (nss_rrs = nss->rrs; nss_rrs; nss_rrs = nss_rrs->next) {
+ ldns_rr_list *addrs_by_name =
+ ldns_get_rr_list_addr_by_name(
+ local_res, ldns_rr_rdf(nss_rrs->rr, 0), c, 0);
+ ldns_rr_list_cat(addrs, addrs_by_name);
+ ldns_rr_list_free(addrs_by_name);
+ }
+
+ if (ldns_rr_list_rr_count(addrs) == 0)
+ error("Could not find the nameserver ip addr; abort");
+
+ else if (ldns_resolver_push_nameserver_rr_list(res, addrs) !=
+ LDNS_STATUS_OK)
+
+ error("Error adding new nameservers");
+ else {
+ ldns_rr_list_deep_free(addrs);
+ return true;
+ }
+ add_rr_list_to_referrals(referrals, addrs);
+ ldns_rr_list_deep_free(addrs);
+ return false;
+}
+
/**
* trace down from the root to name
*/
/* same naive method as in drill0.9
- * We resolver _ALL_ the names, which is ofcourse not needed
+ * We resolve _ALL_ the names, which is of course not needed.
* We _do_ use the local resolver to do that, so it still is
- * fast, but it can be made to run much faster
+ * fast, but it can be made to run much faster.
*/
-ldns_pkt *
+void
do_trace(ldns_resolver *local_res, ldns_rdf *name, ldns_rr_type t,
ldns_rr_class c)
{
- ldns_resolver *res;
- ldns_pkt *p;
- ldns_rr_list *new_nss_a;
- ldns_rr_list *new_nss_aaaa;
+
+ static uint8_t zero[1] = { 0 };
+ static const ldns_rdf root_dname = { 1, LDNS_RDF_TYPE_DNAME, &zero };
+
+ ldns_resolver *res = NULL;
+ ldns_pkt *p = NULL;
ldns_rr_list *final_answer;
ldns_rr_list *new_nss;
- ldns_rr_list *ns_addr;
+ ldns_rr_list *cname = NULL;
+ ldns_rr_list *answers = NULL;
uint16_t loop_count;
- ldns_rdf *pop;
ldns_status status;
- size_t i;
+ ldns_dnssec_zone* referrals = NULL;
+ ldns_rdf *addr;
loop_count = 0;
- new_nss_a = NULL;
- new_nss_aaaa = NULL;
- new_nss = NULL;
- ns_addr = NULL;
final_answer = NULL;
- p = ldns_pkt_new();
res = ldns_resolver_new();
- if (!p) {
- if (res) {
- ldns_resolver_free(res);
- }
- error("Memory allocation failed");
- return NULL;
- }
if (!res) {
- ldns_pkt_free(p);
error("Memory allocation failed");
- return NULL;
+ goto cleanup;
}
/* transfer some properties of local_res to res,
@@ -83,16 +195,13 @@ do_trace(ldns_resolver *local_res, ldns_rdf *name, ldns_rr_type t,
if (status != LDNS_STATUS_OK) {
fprintf(stderr, "Error adding root servers to resolver: %s\n", ldns_get_errorstr_by_id(status));
ldns_rr_list_print(stdout, global_dns_root);
- ldns_resolver_free(res);
- ldns_pkt_free(p);
- return NULL;
+ goto cleanup;
}
/* this must be a real query to local_res */
- status = ldns_resolver_send(&p, res, ldns_dname_new_frm_str("."), LDNS_RR_TYPE_NS, c, 0);
+ status = ldns_resolver_send(&p, res, &root_dname, LDNS_RR_TYPE_NS, c, 0);
/* p can still be NULL */
-
if (ldns_pkt_empty(p)) {
warning("No root server information received");
}
@@ -101,111 +210,95 @@ do_trace(ldns_resolver *local_res, ldns_rdf *name, ldns_rr_type t,
if (!ldns_pkt_empty(p)) {
drill_pkt_print(stdout, local_res, p);
}
+ referrals = ldns_dnssec_zone_new();
+ add_referrals(referrals, p);
} else {
error("cannot use local resolver");
- return NULL;
+ goto cleanup;
}
-
+ if (! set_nss_for_name(res, referrals, name, local_res, c)) {
+ goto cleanup;
+ }
+ ldns_pkt_free(p);
+ p = NULL;
status = ldns_resolver_send(&p, res, name, t, c, 0);
-
while(status == LDNS_STATUS_OK &&
ldns_pkt_reply_type(p) == LDNS_PACKET_REFERRAL) {
if (!p) {
- /* some error occurred, bail out */
- return NULL;
+ /* some error occurred -- bail out */
+ goto cleanup;
}
+ add_referrals(referrals, p);
- new_nss_a = ldns_pkt_rr_list_by_type(p,
- LDNS_RR_TYPE_A, LDNS_SECTION_ADDITIONAL);
- new_nss_aaaa = ldns_pkt_rr_list_by_type(p,
- LDNS_RR_TYPE_AAAA, LDNS_SECTION_ADDITIONAL);
- new_nss = ldns_pkt_rr_list_by_type(p,
- LDNS_RR_TYPE_NS, LDNS_SECTION_AUTHORITY);
-
- if (verbosity != -1) {
- ldns_rr_list_print(stdout, new_nss);
- }
/* checks itself for verbosity */
drill_pkt_print_footer(stdout, local_res, p);
- /* remove the old nameserver from the resolver */
- while(ldns_resolver_pop_nameserver(res)) { /* do it */ }
-
- /* also check for new_nss emptyness */
-
- if (!new_nss_aaaa && !new_nss_a) {
- /*
- * no nameserver found!!!
- * try to resolve the names we do got
- */
- for(i = 0; i < ldns_rr_list_rr_count(new_nss); i++) {
- /* get the name of the nameserver */
- pop = ldns_rr_rdf(ldns_rr_list_rr(new_nss, i), 0);
- if (!pop) {
- break;
- }
+ if (! set_nss_for_name(res, referrals, name, local_res, c)) {
+ goto cleanup;
+ }
+ if (loop_count++ > 20) {
+ /* unlikely that we are doing anything useful */
+ error("Looks like we are looping");
+ goto cleanup;
+ }
+ ldns_pkt_free(p);
+ p = NULL;
+ status = ldns_resolver_send(&p, res, name, t, c, 0);
- ldns_rr_list_print(stdout, new_nss);
- ldns_rdf_print(stdout, pop);
- /* retrieve it's addresses */
- ns_addr = ldns_rr_list_cat_clone(ns_addr,
- ldns_get_rr_list_addr_by_name(local_res, pop, c, 0));
- }
+ /* Exit trace on error */
+ if (status != LDNS_STATUS_OK)
+ break;
- if (ns_addr) {
- if (ldns_resolver_push_nameserver_rr_list(res, ns_addr) !=
- LDNS_STATUS_OK) {
- error("Error adding new nameservers");
- ldns_pkt_free(p);
- return NULL;
- }
- ldns_rr_list_free(ns_addr);
- } else {
- ldns_rr_list_print(stdout, ns_addr);
- error("Could not find the nameserver ip addr; abort");
- ldns_pkt_free(p);
- return NULL;
- }
- }
+ /* An answer might be the desired answer (and no referral) */
+ if (ldns_pkt_reply_type(p) != LDNS_PACKET_ANSWER)
+ continue;
- /* add the new ones */
- if (new_nss_aaaa) {
- if (ldns_resolver_push_nameserver_rr_list(res, new_nss_aaaa) !=
- LDNS_STATUS_OK) {
- error("adding new nameservers");
- ldns_pkt_free(p);
- return NULL;
- }
- }
- if (new_nss_a) {
- if (ldns_resolver_push_nameserver_rr_list(res, new_nss_a) !=
- LDNS_STATUS_OK) {
- error("adding new nameservers");
- ldns_pkt_free(p);
- return NULL;
- }
+ /* Exit trace when the requested type is found */
+ answers = ldns_pkt_rr_list_by_type(p, t, LDNS_SECTION_ANSWER);
+ if (answers && ldns_rr_list_rr_count(answers) > 0) {
+ ldns_rr_list_free(answers);
+ answers = NULL;
+ break;
}
+ ldns_rr_list_free(answers);
+ answers = NULL;
- if (loop_count++ > 20) {
- /* unlikely that we are doing something usefull */
- error("Looks like we are looping");
- ldns_pkt_free(p);
- return NULL;
- }
-
+ /* Get the CNAMEs from the answer */
+ cname = ldns_pkt_rr_list_by_type(
+ p, LDNS_RR_TYPE_CNAME, LDNS_SECTION_ANSWER);
+
+ /* No CNAME either: exit trace */
+ if (ldns_rr_list_rr_count(cname) == 0)
+ break;
+
+ /* Print CNAME referral */
+ ldns_rr_list_print(stdout, cname);
+
+ /* restart with the CNAME */
+ name = ldns_rr_rdf(ldns_rr_list_rr(cname, 0), 0);
+ ldns_rr_list_free(cname);
+ cname = NULL;
+
+ /* remove the old nameserver from the resolver */
+ while((addr = ldns_resolver_pop_nameserver(res)))
+ ldns_rdf_deep_free(addr);
+
+ /* Restart trace from the root up */
+ (void) ldns_resolver_push_nameserver_rr_list(
+ res, global_dns_root);
+
+ ldns_pkt_free(p);
+ p = NULL;
status = ldns_resolver_send(&p, res, name, t, c, 0);
- new_nss_aaaa = NULL;
- new_nss_a = NULL;
- ns_addr = NULL;
}
+ ldns_pkt_free(p);
+ p = NULL;
status = ldns_resolver_send(&p, res, name, t, c, 0);
-
if (!p) {
- return NULL;
+ goto cleanup;
}
-
new_nss = ldns_pkt_authority(p);
final_answer = ldns_pkt_answer(p);
@@ -215,8 +308,16 @@ do_trace(ldns_resolver *local_res, ldns_rdf *name, ldns_rr_type t,
}
drill_pkt_print_footer(stdout, local_res, p);
- ldns_pkt_free(p);
- return NULL;
+cleanup:
+ if (res) {
+ while((addr = ldns_resolver_pop_nameserver(res)))
+ ldns_rdf_deep_free(addr);
+ ldns_resolver_free(res);
+ }
+ if (referrals)
+ ldns_dnssec_zone_deep_free(referrals);
+ if (p)
+ ldns_pkt_free(p);
}
@@ -237,8 +338,7 @@ do_chase(ldns_resolver *res,
ldns_rr_list *trusted_keys,
ldns_pkt *pkt_o,
uint16_t qflags,
- ldns_rr_list * ATTR_UNUSED(prev_key_list),
- int verbosity)
+ ldns_rr_list * ATTR_UNUSED(prev_key_list))
{
ldns_rr_list *rrset = NULL;
ldns_status result;
diff --git a/drill/config.h.in b/drill/config.h.in
index 75448a07ecc6..93abc62b58ab 100644
--- a/drill/config.h.in
+++ b/drill/config.h.in
@@ -15,8 +15,8 @@
/* Define to 1 if you have the <getopt.h> header file. */
#undef HAVE_GETOPT_H
-/* If you have HMAC_CTX_init */
-#undef HAVE_HMAC_CTX_INIT
+/* If you have HMAC_Update */
+#undef HAVE_HMAC_UPDATE
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
@@ -279,9 +279,6 @@
#include <ws2tcpip.h>
#endif
-extern char *optarg;
-extern int optind, opterr;
-
#ifndef EXIT_FAILURE
#define EXIT_FAILURE 1
#endif
diff --git a/drill/configure b/drill/configure
index 0937a1b288ab..09d860196da8 100755
--- a/drill/configure
+++ b/drill/configure
@@ -1,13 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for ldns 1.6.17.
+# Generated by GNU Autoconf 2.69 for ldns 1.7.0.
#
# Report bugs to <libdns@nlnetlabs.nl>.
#
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -136,6 +134,31 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -169,7 +192,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -214,21 +238,25 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -331,6 +359,14 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -452,6 +488,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -486,16 +526,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -507,28 +547,8 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -560,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ldns'
PACKAGE_TARNAME='libdns'
-PACKAGE_VERSION='1.6.17'
-PACKAGE_STRING='ldns 1.6.17'
+PACKAGE_VERSION='1.7.0'
+PACKAGE_STRING='ldns 1.7.0'
PACKAGE_BUGREPORT='libdns@nlnetlabs.nl'
PACKAGE_URL=''
@@ -640,6 +660,7 @@ infodir
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -714,6 +735,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -966,6 +988,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1103,7 +1134,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+ libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1131,8 +1162,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1218,7 +1247,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ldns 1.6.17 to adapt to many kinds of systems.
+\`configure' configures ldns 1.7.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1258,6 +1287,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -1279,7 +1309,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ldns 1.6.17:";;
+ short | recursive ) echo "Configuration of ldns 1.7.0:";;
esac
cat <<\_ACEOF
@@ -1378,10 +1408,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ldns configure 1.6.17
-generated by GNU Autoconf 2.68
+ldns configure 1.7.0
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1712,7 +1742,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -1801,8 +1831,8 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ldns $as_me 1.6.17, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+It was created by ldns $as_me 1.7.0, which was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2154,7 +2184,15 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Copyright 2009, Wouter Wijngaards, NLnet Labs.
# BSD licensed.
#
-# Version 26
+# Version 34
+# 2016-03-21 Check -ldl -pthread for libcrypto for ldns and openssl 1.1.0.
+# 2016-03-21 Use HMAC_Update instead of HMAC_CTX_Init (for openssl-1.1.0).
+# 2016-01-04 -D_DEFAULT_SOURCE defined with -D_BSD_SOURCE for Linux glibc 2.20
+# 2015-12-11 FLTO check for new OSX, clang.
+# 2015-11-18 spelling check fix.
+# 2015-11-05 ACX_SSL_CHECKS no longer adds -ldl needlessly.
+# 2015-08-28 ACX_CHECK_PIE and ACX_CHECK_RELRO_NOW added.
+# 2015-03-17 AHX_CONFIG_REALLOCARRAY added
# 2013-09-19 FLTO help text improved.
# 2013-07-18 Enable ACX_CHECK_COMPILER_FLAG to test for -Wstrict-prototypes
# 2013-06-25 FLTO has --disable-flto option.
@@ -2245,6 +2283,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# ACX_CHECK_MEMCMP_SIGNED - check if memcmp uses signed characters.
# AHX_MEMCMP_BROKEN - replace memcmp func for CHECK_MEMCMP_SIGNED.
# ACX_CHECK_SS_FAMILY - check for sockaddr_storage.ss_family
+# ACX_CHECK_PIE - add --enable-pie option and check if works
+# ACX_CHECK_RELRO_NOW - add --enable-relro-now option and check it
#
@@ -2348,6 +2388,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
OURCPPFLAGS=''
CPPFLAGS=${CPPFLAGS:-${OURCPPFLAGS}}
OURCFLAGS='-g'
@@ -2378,7 +2424,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2418,7 +2464,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2471,7 +2517,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2512,7 +2558,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -2570,7 +2616,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2614,7 +2660,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3060,8 +3106,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -3301,7 +3346,7 @@ do
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@@ -3367,7 +3412,7 @@ do
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -3574,8 +3619,8 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-# define __EXTENSIONS__ 1
- $ac_includes_default
+# define __EXTENSIONS__ 1
+ $ac_includes_default
int
main ()
{
@@ -3629,7 +3674,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3669,7 +3714,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3722,7 +3767,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3763,7 +3808,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -3821,7 +3866,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3865,7 +3910,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4061,8 +4106,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -4196,7 +4240,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_libtool="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4988,8 +5032,8 @@ $as_echo "found in $ssldir" >&6; }
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_CTX_init in -lcrypto" >&5
-$as_echo_n "checking for HMAC_CTX_init in -lcrypto... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_Update in -lcrypto" >&5
+$as_echo_n "checking for HMAC_Update in -lcrypto... " >&6; }
LIBS="$LIBS -lcrypto"
LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4999,8 +5043,8 @@ int
main ()
{
- int HMAC_CTX_init(void);
- (void)HMAC_CTX_init();
+ int HMAC_Update(void);
+ (void)HMAC_Update();
;
return 0;
@@ -5011,7 +5055,7 @@ if ac_fn_c_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
-$as_echo "#define HAVE_HMAC_CTX_INIT 1" >>confdefs.h
+$as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
else
@@ -5032,8 +5076,8 @@ int
main ()
{
- int HMAC_CTX_init(void);
- (void)HMAC_CTX_init();
+ int HMAC_Update(void);
+ (void)HMAC_Update();
;
return 0;
@@ -5042,7 +5086,7 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"; then :
-$as_echo "#define HAVE_HMAC_CTX_INIT 1" >>confdefs.h
+$as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -5064,8 +5108,8 @@ int
main ()
{
- int HMAC_CTX_init(void);
- (void)HMAC_CTX_init();
+ int HMAC_Update(void);
+ (void)HMAC_Update();
;
return 0;
@@ -5074,7 +5118,7 @@ _ACEOF
if ac_fn_c_try_link "$LINENO"; then :
-$as_echo "#define HAVE_HMAC_CTX_INIT 1" >>confdefs.h
+$as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -5083,83 +5127,58 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- fi
-
-
- # openssl engine functionality needs dlopen().
- BAKLIBS="$LIBS"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
-$as_echo_n "checking for library containing dlopen... " >&6; }
-if ${ac_cv_search_dlopen+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ LIBS="$BAKLIBS"
+ LIBSSL_LIBS="$BAKSSLLIBS"
+ LIBS="$LIBS -ldl -pthread"
+ LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -lcrypto needs -ldl -pthread" >&5
+$as_echo_n "checking if -lcrypto needs -ldl -pthread... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen ();
int
main ()
{
-return dlopen ();
+
+ int HMAC_Update(void);
+ (void)HMAC_Update();
+
;
return 0;
}
_ACEOF
-for ac_lib in '' dl; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_search_dlopen=$ac_res
+if ac_fn_c_try_link "$LINENO"; then :
+
+
+$as_echo "#define HAVE_HMAC_UPDATE 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ as_fn_error $? "OpenSSL found in $ssldir, but version 0.9.7 or higher is required" "$LINENO" 5
+
fi
rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext
- if ${ac_cv_search_dlopen+:} false; then :
- break
-fi
-done
-if ${ac_cv_search_dlopen+:} false; then :
+ conftest$ac_exeext conftest.$ac_ext
-else
- ac_cv_search_dlopen=no
fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
-$as_echo "$ac_cv_search_dlopen" >&6; }
-ac_res=$ac_cv_search_dlopen
-if test "$ac_res" != no; then :
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+
- if test "$LIBS" != "$BAKLIBS"; then
- LIBSSL_LIBS="$LIBSSL_LIBS -ldl"
- fi
fi
for ac_header in openssl/ssl.h
do :
@@ -5839,16 +5858,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -5908,28 +5927,16 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -5950,8 +5957,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ldns $as_me 1.6.17, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+This file was extended by ldns $as_me 1.7.0, which was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -6012,11 +6019,11 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-ldns config.status 1.6.17
-configured by $0, generated by GNU Autoconf 2.68,
+ldns config.status 1.7.0
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -6104,7 +6111,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
diff --git a/drill/configure.ac b/drill/configure.ac
index b7fe2aee07a8..7a726da2a647 100644
--- a/drill/configure.ac
+++ b/drill/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.56)
-AC_INIT(ldns, 1.6.17, libdns@nlnetlabs.nl,libdns)
+AC_INIT(ldns, 1.7.0, libdns@nlnetlabs.nl,libdns)
AC_CONFIG_SRCDIR([drill.c])
sinclude(../acx_nlnetlabs.m4)
@@ -258,9 +258,6 @@ AH_BOTTOM([
#include <ws2tcpip.h>
#endif
-extern char *optarg;
-extern int optind, opterr;
-
#ifndef EXIT_FAILURE
#define EXIT_FAILURE 1
#endif
diff --git a/drill/drill.1.in b/drill/drill.1.in
index b6d74f6554d7..c3da109fb060 100644
--- a/drill/drill.1.in
+++ b/drill/drill.1.in
@@ -40,7 +40,7 @@ Send to query to this server. If not specified use the nameservers from
.PP
\fItype\fR
Ask for this RR type. If type is not given on the command line it defaults
-to 'A'. Except when doing to reverse lookup when it defaults to 'PTR'.
+to 'A'. Except when doing a reverse lookup when it defaults to 'PTR'.
.PP
\fIclass\fR
@@ -51,17 +51,17 @@ Use this class when querying.
Show the MX records of the domain miek.nl
.TP
-\fBdrill -S jelte.nlnetlabs.nl\fR
+\fBdrill \-S jelte.nlnetlabs.nl\fR
Chase any signatures in the jelte.nlnetlab.nl domain. This option is
only available when ldns has been compiled with openssl-support.
.TP
-\fBdrill -TD www.example.com\fR
-Do a DNSSEC (-D) trace (-T) from the rootservers down to www.example.com.
+\fBdrill \-TD www.example.com\fR
+Do a DNSSEC (\-D) trace (\-T) from the rootservers down to www.example.com.
This option only works when ldns has been compiled with openssl support.
.TP
-\fBdrill -s dnskey jelte.nlnetlabs.nl\fR
+\fBdrill \-s dnskey jelte.nlnetlabs.nl\fR
Show the DNSKEY record(s) for jelte.nlnetlabs.nl. For each found DNSKEY
record also print the DS record.
@@ -70,12 +70,12 @@ record also print the DS record.
.TP
\fB\-D
Enable DNSSEC in the query. When querying for DNSSEC types (DNSKEY, RRSIG,
-DS and NSEC) this is \fInot\fR automaticly enabled.
+DS and NSEC) this is \fInot\fR automatically enabled.
.TP
\fB\-T
-Trace \fIname\fR from the root down. When using this option the @server and
-the type arguments are not used.
+Trace \fIname\fR from the root down. When using this option the @server
+arguments is not used.
.TP
\fB\-S
@@ -93,11 +93,11 @@ Be more verbose. Set level to 5 to see the actual query that is sent.
.TP
\fB\-Q
-Quiet mode, this overrules -V.
+Quiet mode, this overrules \-V.
.TP
\fB\-f \fIfile\fR
-Read the query from a file. The query must be dumped with -w.
+Read the query from a file. The query must be dumped with \-w.
.TP
\fB\-i \fIfile\fR
@@ -153,7 +153,7 @@ Use file instead of /etc/resolv.conf for nameserver configuration.
.TP
\fB\-d \fIdomain\fR
-When tracing (-T), start from this domain instead of the root.
+When tracing (\-T), start from this domain instead of the root.
.TP
\fB\-t
@@ -195,7 +195,7 @@ Use this port instead of the default of 53.
.TP
\fB\-r \fIfile\fR
-When tracing (-T), use file as a root servers hint file.
+When tracing (\-T), use file as a root servers hint file.
.TP
\fB\-s
@@ -208,11 +208,11 @@ Use UDP when querying a server. This is the default.
.TP
\fB\-w \fIfile\fR
write the answer to a file. The file will contain a hexadecimal dump
-of the query. This can be used in conjunction with -f.
+of the query. This can be used in conjunction with \-f.
.TP
\fB\-x
-Do a reverse loopup. The type argument is not used, it is preset to PTR.
+Do a reverse lookup. The type argument is not used, it is preset to PTR.
.TP
\fB\-y \fI<name:key[:algo]>\fR
diff --git a/drill/drill.c b/drill/drill.c
index b967ad949c8d..3a9482b38633 100644
--- a/drill/drill.c
+++ b/drill/drill.c
@@ -14,11 +14,22 @@
#include <openssl/err.h>
#endif
-#define IP6_ARPA_MAX_LEN 65
-
/* query debug, 2 hex dumps */
int verbosity;
+static int
+is_ixfr_with_serial(const char* name, uint32_t *serial)
+{
+ char* end;
+ if (strlen(name) > 5 &&
+ strncasecmp(name, "IXFR", 4) == 0 &&
+ name[4] == '=') {
+ *serial = (uint32_t) strtol((name+5), &end, 10);
+ return 1;
+ }
+ return 0;
+}
+
static void
usage(FILE *stream, const char *progname)
{
@@ -31,7 +42,7 @@ usage(FILE *stream, const char *progname)
fprintf(stream, "\t-D\t\tenable DNSSEC (DO bit)\n");
#ifdef HAVE_SSL
fprintf(stream, "\t-T\t\ttrace from the root down to <name>\n");
- fprintf(stream, "\t-S\t\tchase signature(s) from <name> to a know key [*]\n");
+ fprintf(stream, "\t-S\t\tchase signature(s) from <name> to a known key [*]\n");
#endif /*HAVE_SSL*/
fprintf(stream, "\t-I <address>\tsource address to query from\n");
fprintf(stream, "\t-V <number>\tverbosity (0-5)\n");
@@ -106,15 +117,14 @@ main(int argc, char *argv[])
char *serv;
char *src = NULL;
const char *name;
- char *name2;
char *progname;
char *query_file = NULL;
char *answer_file = NULL;
ldns_buffer *query_buffer = NULL;
ldns_rdf *serv_rdf;
ldns_rdf *src_rdf = NULL;
- ldns_rr_type type;
- ldns_rr_class clas;
+ ldns_rr_type type;
+ ldns_rr_class clas;
#if 0
ldns_pkt_opcode opcode = LDNS_PACKET_QUERY;
#endif
@@ -130,7 +140,7 @@ main(int argc, char *argv[])
ldns_rr *axfr_rr;
ldns_status status;
char *type_str;
-
+ uint32_t serial = 0;
/* list of keys used in dnssec operations */
ldns_rr_list *key_list = ldns_rr_list_new();
/* what key verify the current answer */
@@ -153,6 +163,9 @@ main(int argc, char *argv[])
int result = 0;
+ uint8_t s6addr[16];
+ char ip6_arpa_str[74];
+
#ifdef USE_WINSOCK
int r;
WSADATA wsa_data;
@@ -188,12 +201,6 @@ main(int argc, char *argv[])
ldns_init_random(NULL, 0);
- if (argc == 0) {
- usage(stdout, progname);
- result = EXIT_FAILURE;
- goto exit;
- }
-
/* string from orig drill: "i:w:I46Sk:TNp:b:DsvhVcuaq:f:xr" */
/* global first, query opt next, option with parm's last
* and sorted */ /* "46DITSVQf:i:w:q:achuvxzy:so:p:b:k:" */
@@ -363,9 +370,7 @@ main(int argc, char *argv[])
tsig_algorithm[strlen(optarg) - tsig_separator2 - 1] = '\0';
} else {
tsig_separator2 = strlen(optarg);
- tsig_algorithm = xmalloc(26);
- strncpy(tsig_algorithm, "hmac-md5.sig-alg.reg.int.", 25);
- tsig_algorithm[25] = '\0';
+ tsig_algorithm = strdup("hmac-md5.sig-alg.reg.int");
}
tsig_name = xmalloc(tsig_separator + 1);
tsig_data = xmalloc(tsig_separator2 - tsig_separator);
@@ -453,6 +458,10 @@ main(int argc, char *argv[])
if (type != 0) {
int_type = 0;
continue;
+ } else if (is_ixfr_with_serial(argv[i], &serial)) {
+ type = LDNS_RR_TYPE_IXFR;
+ int_type = 0;
+ continue;
}
}
/* if it matches a class, it's a class */
@@ -488,14 +497,20 @@ main(int argc, char *argv[])
if (src) {
src_rdf = ldns_rdf_new_addr_frm_str(src);
if(!src_rdf) {
- fprintf(stderr, "-I must be (or resolve) to a valid IP[v6] address.\n");
+ fprintf(stderr, "-I must be a valid IP[v6] address.\n");
exit(EXIT_FAILURE);
}
+ if (ldns_rdf_size(src_rdf) == 4) {
+ qfamily = LDNS_RESOLV_INET;
+
+ } else if (ldns_rdf_size(src_rdf) == 16) {
+ qfamily = LDNS_RESOLV_INET6;
+ }
}
/* set the nameserver to use */
if (!serv) {
- /* no server given make a resolver from /etc/resolv.conf */
+ /* no server given -- make a resolver from /etc/resolv.conf */
status = ldns_resolver_new_frm_file(&res, resolv_conf_file);
if (status != LDNS_STATUS_OK) {
warning("Could not create a resolver structure: %s (%s)\n"
@@ -516,7 +531,7 @@ main(int argc, char *argv[])
if (!serv_rdf) {
/* try to resolv the name if possible */
status = ldns_resolver_new_frm_file(&cmdline_res, resolv_conf_file);
-
+
if (status != LDNS_STATUS_OK) {
error("%s", "@server ip could not be converted");
}
@@ -554,6 +569,7 @@ main(int argc, char *argv[])
}
}
/* set the resolver options */
+ ldns_resolver_set_ixfr_serial(res, serial);
ldns_resolver_set_port(res, qport);
ldns_resolver_set_source(res, src_rdf);
if (verbosity >= 5) {
@@ -581,6 +597,39 @@ main(int argc, char *argv[])
}
if (tsig_name && tsig_data) {
+ /* With dig TSIG keys are also specified with -y,
+ * but format with drill is: -y <name:key[:algo]>
+ * and with dig: -y [hmac:]name:key
+ *
+ * When we detect an unknown tsig algorithm in algo,
+ * but a known algorithm in name, we cane assume dig
+ * order was used.
+ *
+ * Following if statement is to anticipate and correct dig order
+ */
+ if ( strcasecmp(tsig_algorithm, "hmac-md5.sig-alg.reg.int")
+ && strcasecmp(tsig_algorithm, "hmac-md5")
+ && strcasecmp(tsig_algorithm, "hmac-sha1")
+ && strcasecmp(tsig_algorithm, "hmac-sha256")
+ && (
+ strcasecmp(tsig_name, "hmac-md5.sig-alg.reg.int") == 0
+ || strcasecmp(tsig_name, "hmac-md5") == 0
+ || strcasecmp(tsig_name, "hmac-sha1") == 0
+ || strcasecmp(tsig_name, "hmac-sha256") == 0
+ )) {
+
+ /* Roll options */
+ char *tmp_tsig_algorithm = tsig_name;
+ tsig_name = tsig_data;
+ tsig_data = tsig_algorithm;
+ tsig_algorithm = tmp_tsig_algorithm;
+ }
+
+ if (strcasecmp(tsig_algorithm, "hmac-md5") == 0) {
+ free(tsig_algorithm);
+ tsig_algorithm = strdup("hmac-md5.sig-alg.reg.int");
+ }
+
ldns_resolver_set_tsig_keyname(res, tsig_name);
ldns_resolver_set_tsig_keydata(res, tsig_data);
ldns_resolver_set_tsig_algorithm(res, tsig_algorithm);
@@ -598,7 +647,7 @@ main(int argc, char *argv[])
error("%s", "parsing query name");
}
/* don't care about return packet */
- (void)do_trace(res, qname, type, clas);
+ do_trace(res, qname, type, clas);
clear_root();
break;
case DRILL_SECTRACE:
@@ -650,8 +699,7 @@ main(int argc, char *argv[])
ldns_resolver_set_dnssec_anchors(res, ldns_rr_list_clone(key_list));
result = do_chase(res, qname, type,
clas, key_list,
- pkt, qflags, NULL,
- verbosity);
+ pkt, qflags, NULL);
if (result == LDNS_STATUS_OK) {
if (verbosity != -1) {
mesg("Chase successful");
@@ -682,7 +730,6 @@ main(int argc, char *argv[])
if (!qname) {
error("%s", "making qname");
}
-
status = ldns_resolver_prepare_query_pkt(&qpkt, res, qname, type, clas, qflags);
if(status != LDNS_STATUS_OK) {
error("%s", "making query: %s",
@@ -696,55 +743,48 @@ main(int argc, char *argv[])
case DRILL_REVERSE:
/* ipv4 or ipv6 addr? */
if (strchr(name, ':')) {
- if (strchr(name, '.')) {
- error("Syntax error: both '.' and ':' seen in address\n");
- }
- name2 = malloc(IP6_ARPA_MAX_LEN + 20);
- c = 0;
- for (i=0; i<(int)strlen(name); i++) {
- if (i >= IP6_ARPA_MAX_LEN) {
- error("%s", "reverse argument to long");
- }
- if (name[i] == ':') {
- if (i < (int) strlen(name) && name[i + 1] == ':') {
- error("%s", ":: not supported (yet)");
- } else {
- if (i + 2 == (int) strlen(name) || name[i + 2] == ':') {
- name2[c++] = '0';
- name2[c++] = '.';
- name2[c++] = '0';
- name2[c++] = '.';
- name2[c++] = '0';
- name2[c++] = '.';
- } else if (i + 3 == (int) strlen(name) || name[i + 3] == ':') {
- name2[c++] = '0';
- name2[c++] = '.';
- name2[c++] = '0';
- name2[c++] = '.';
- } else if (i + 4 == (int) strlen(name) || name[i + 4] == ':') {
- name2[c++] = '0';
- name2[c++] = '.';
- }
- }
- } else {
- name2[c++] = name[i];
- name2[c++] = '.';
- }
+ if (!inet_pton(AF_INET6, name, &s6addr)) {
+ error("Syntax error: cannot parse IPv6 address\n");
}
- name2[c++] = '\0';
-
- qname = ldns_dname_new_frm_str(name2);
- qname_tmp = ldns_dname_reverse(qname);
- ldns_rdf_deep_free(qname);
- qname = qname_tmp;
- qname_tmp = ldns_dname_new_frm_str("ip6.arpa.");
- status = ldns_dname_cat(qname, qname_tmp);
- if (status != LDNS_STATUS_OK) {
- error("%s", "could not create reverse address for ip6: %s\n", ldns_get_errorstr_by_id(status));
- }
- ldns_rdf_deep_free(qname_tmp);
+ (void) snprintf(ip6_arpa_str, sizeof(ip6_arpa_str),
+ "%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.",
+ (unsigned int)(s6addr[15] & 0x0F),
+ (unsigned int)(s6addr[15] >> 4),
+ (unsigned int)(s6addr[14] & 0x0F),
+ (unsigned int)(s6addr[14] >> 4),
+ (unsigned int)(s6addr[13] & 0x0F),
+ (unsigned int)(s6addr[13] >> 4),
+ (unsigned int)(s6addr[12] & 0x0F),
+ (unsigned int)(s6addr[12] >> 4),
+ (unsigned int)(s6addr[11] & 0x0F),
+ (unsigned int)(s6addr[11] >> 4),
+ (unsigned int)(s6addr[10] & 0x0F),
+ (unsigned int)(s6addr[10] >> 4),
+ (unsigned int)(s6addr[9] & 0x0F),
+ (unsigned int)(s6addr[9] >> 4),
+ (unsigned int)(s6addr[8] & 0x0F),
+ (unsigned int)(s6addr[8] >> 4),
+ (unsigned int)(s6addr[7] & 0x0F),
+ (unsigned int)(s6addr[7] >> 4),
+ (unsigned int)(s6addr[6] & 0x0F),
+ (unsigned int)(s6addr[6] >> 4),
+ (unsigned int)(s6addr[5] & 0x0F),
+ (unsigned int)(s6addr[5] >> 4),
+ (unsigned int)(s6addr[4] & 0x0F),
+ (unsigned int)(s6addr[4] >> 4),
+ (unsigned int)(s6addr[3] & 0x0F),
+ (unsigned int)(s6addr[3] >> 4),
+ (unsigned int)(s6addr[2] & 0x0F),
+ (unsigned int)(s6addr[2] >> 4),
+ (unsigned int)(s6addr[1] & 0x0F),
+ (unsigned int)(s6addr[1] >> 4),
+ (unsigned int)(s6addr[0] & 0x0F),
+ (unsigned int)(s6addr[0] >> 4));
- free(name2);
+ qname = ldns_dname_new_frm_str(ip6_arpa_str);
} else {
qname = ldns_dname_new_frm_str(name);
qname_tmp = ldns_dname_reverse(qname);
@@ -974,7 +1014,6 @@ main(int argc, char *argv[])
xfree(tsig_algorithm);
#ifdef HAVE_SSL
- ERR_remove_state(0);
CRYPTO_cleanup_all_ex_data();
ERR_free_strings();
EVP_cleanup();
diff --git a/drill/drill.h b/drill/drill.h
index 0746fe7bff23..cbccd75ec5c5 100644
--- a/drill/drill.h
+++ b/drill/drill.h
@@ -30,10 +30,9 @@
(VAR) = (VAR) & ~(BIT)
extern ldns_rr_list *global_dns_root;
-extern bool qds;
extern int verbosity;
-ldns_pkt *do_trace(ldns_resolver *res,
+void do_trace(ldns_resolver *res,
ldns_rdf *name,
ldns_rr_type type,
ldns_rr_class c);
@@ -44,8 +43,7 @@ ldns_status do_chase(ldns_resolver *res,
ldns_rr_list *trusted_keys,
ldns_pkt *pkt_o,
uint16_t qflags,
- ldns_rr_list *prev_key_list,
- int verbosity);
+ ldns_rr_list *prev_key_list);
int do_secure_trace(ldns_resolver *res,
ldns_rdf *name,
ldns_rr_type type,
diff --git a/drill/error.c b/drill/error.c
index e67b7fca020a..591687d0db50 100644
--- a/drill/error.c
+++ b/drill/error.c
@@ -69,6 +69,7 @@ mesg(const char *fmt, ...)
va_end(args);
}
+#if 0
/* print stuff when in verbose mode (1) */
void
verbose(const char *fmt, ...)
@@ -82,34 +83,4 @@ verbose(const char *fmt, ...)
verbose_va_list(fmt, args);
va_end(args);
}
-
-/* print stuff when in vverbose mode (2) */
-void
-vverbose(const char *fmt, ...)
-{
- va_list args;
- if (verbosity < 2) {
- return;
- }
-
- va_start(args, fmt);
- verbose_va_list(fmt, args);
- va_end(args);
-}
-
-static void
-debug_va_list(const char *fmt, va_list args)
-{
- vfprintf(stderr, fmt, args);
- fprintf(stderr, "\n");
-}
-
-void
-debug(const char *fmt, ...)
-{
- va_list args;
- fprintf(stderr, "[DEBUG] ");
- va_start(args, fmt);
- debug_va_list(fmt, args);
- va_end(args);
-}
+#endif
diff --git a/drill/securetrace.c b/drill/securetrace.c
index 5fc493a7275d..863875e138cd 100644
--- a/drill/securetrace.c
+++ b/drill/securetrace.c
@@ -62,7 +62,7 @@ ds_key_match(ldns_rr_list *ds, ldns_rr_list *trusted)
}
#endif
-ldns_pkt *
+static ldns_pkt *
get_dnssec_pkt(ldns_resolver *r, ldns_rdf *name, ldns_rr_type t)
{
ldns_pkt *p = NULL;
@@ -97,7 +97,7 @@ get_ds(ldns_pkt *p, ldns_rdf *ownername, ldns_rr_list **rrlist, ldns_rr_list **o
}
#endif /* HAVE_SSL */
-void
+static void
remove_resolver_nameservers(ldns_resolver *res)
{
ldns_rdf *pop;
@@ -109,17 +109,6 @@ remove_resolver_nameservers(ldns_resolver *res)
}
-void
-show_current_nameservers(FILE *out, ldns_resolver *res)
-{
- size_t i;
- fprintf(out, "Current nameservers for resolver object:\n");
- for (i = 0; i < ldns_resolver_nameserver_count(res); i++) {
- ldns_rdf_print(out, ldns_resolver_nameservers(res)[i]);
- fprintf(out, "\n");
- }
-}
-
/*ldns_pkt **/
#ifdef HAVE_SSL
int
diff --git a/drill/work.c b/drill/work.c
index 370d48b01b3e..ce61c235383a 100644
--- a/drill/work.c
+++ b/drill/work.c
@@ -18,7 +18,7 @@
*
* This function returns the length of the result
*/
-size_t
+static size_t
hexstr2bin(char *hexstr, int len, uint8_t *buf, size_t offset, size_t buf_len)
{
char c;
@@ -64,7 +64,7 @@ hexstr2bin(char *hexstr, int len, uint8_t *buf, size_t offset, size_t buf_len)
return bufpos;
}
-size_t
+static size_t
packetbuffromfile(char *filename, uint8_t *wire)
{
FILE *fp = NULL;