From bc70b2941673173379612797b7108d892f14192b Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Wed, 19 Oct 2016 07:30:31 -0500 Subject: [PATCH] Stubby release --- ChangeLog | 7 +++++++ src/convert.c | 1 - src/tools/getdns_query.c | 17 +++++++++++++++-- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1adfe0b6c..c7397ee26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +* 2016-10-19: Version 1.1.0-a2 + * Improved TLS connection management + * OpenSSL 1.1 support + * Stubby, Server version of getdns_query that by default listens + on 127.0.0.1 and ::1 and reads config from /etc/stubby.conf + and $HOME/.stubby.conf + * 2016-07-14: Version 1.1.0a1 * Conversion functions from text strings to getdns native types: getdns_str2dict(), getdns_str2list(), getdns_str2bindata() and diff --git a/src/convert.c b/src/convert.c index f0b4251d3..24dbbf039 100644 --- a/src/convert.c +++ b/src/convert.c @@ -830,7 +830,6 @@ _getdns_reply_dict2wire( } } remove_dnssec = !getdns_dict_get_int(reply, "/header/do", &n) && n == 0; - DEBUG_SERVER("remove_dnssec: %d\n", remove_dnssec); if (!getdns_dict_get_list(reply, "answer", §ion)) { for ( n = 0, i = 0 diff --git a/src/tools/getdns_query.c b/src/tools/getdns_query.c index dc148e35f..48a4d7213 100644 --- a/src/tools/getdns_query.c +++ b/src/tools/getdns_query.c @@ -51,6 +51,7 @@ typedef unsigned short in_port_t; static int i_am_stubby = 0; static const char *default_stubby_config = "{ resolution_type: GETDNS_RESOLUTION_STUB" +", idle_timeout: 10000" ", listen_addresses: [ 127.0.0.1@53, 0::1@53 ]" "}"; static int clear_listen_list_on_arg = 0; @@ -1328,9 +1329,21 @@ static void request_cb( getdns_return_t r = GETDNS_RETURN_GOOD; uint32_t n, rcode, dnssec_status; +#if defined(SERVER_DEBUG) && SERVER_DEBUG + getdns_bindata *qname; + char *qname_str, *unknown_qname = ""; + + if (getdns_dict_get_bindata(msg->request, "/question/qname", &qname) + || getdns_convert_dns_name_to_fqdn(qname, &qname_str)) + qname_str = unknown_qname; + DEBUG_SERVER("reply for: %p %"PRIu64" %d (edns0: %d, do: %d, ad: %d," - " cd: %d)\n", msg, transaction_id, (int)callback_type, - msg->has_edns0, msg->do_bit, msg->ad_bit, msg->cd_bit); + " cd: %d, qname: %s)\n", msg, transaction_id, (int)callback_type, + msg->has_edns0, msg->do_bit, msg->ad_bit, msg->cd_bit, qname_str); + + if (qname_str != unknown_qname) + free(qname_str); +#endif assert(msg); #if 0