Skip to content

Commit

Permalink
Stubby release
Browse files Browse the repository at this point in the history
  • Loading branch information
wtoorop committed Oct 19, 2016
1 parent 732844e commit bc70b29
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion src/convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -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", &section)) {
for ( n = 0, i = 0
Expand Down
17 changes: 15 additions & 2 deletions src/tools/getdns_query.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 = "<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
Expand Down

0 comments on commit bc70b29

Please sign in to comment.