mirror of https://github.com/getdnsapi/getdns.git
Had to change some preprocessor checks to get all the options to compile
This commit is contained in:
parent
6f9bfffe9f
commit
f156f2f24a
|
@ -227,6 +227,7 @@ add_WIN_cacerts_to_openssl_store(SSL_CTX* tls_ctx)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if !defined(STUB_NATIVE_DNSSEC) || (defined(DAEMON_DEBUG) && DAEMON_DEBUG)
|
||||
static uint8_t*
|
||||
upstream_addr(getdns_upstream *upstream)
|
||||
{
|
||||
|
@ -234,6 +235,16 @@ upstream_addr(getdns_upstream *upstream)
|
|||
? (void *)&((struct sockaddr_in*)&upstream->addr)->sin_addr
|
||||
: (void *)&((struct sockaddr_in6*)&upstream->addr)->sin6_addr;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static in_port_t
|
||||
upstream_port(getdns_upstream *upstream)
|
||||
{
|
||||
return ntohs(upstream->addr.ss_family == AF_INET
|
||||
? ((struct sockaddr_in *)&upstream->addr)->sin_port
|
||||
: ((struct sockaddr_in6*)&upstream->addr)->sin6_port);
|
||||
}
|
||||
|
||||
static void destroy_local_host(_getdns_rbnode_t * node, void *arg)
|
||||
{
|
||||
|
@ -728,9 +739,11 @@ _getdns_upstream_shutdown(getdns_upstream *upstream)
|
|||
upstream->conn_setup_failed = 0;
|
||||
upstream->conn_shutdowns = 0;
|
||||
upstream->conn_backoffs++;
|
||||
#if defined(DAEMON_DEBUG) && DAEMON_DEBUG
|
||||
DEBUG_DAEMON("%s %s : !Backing off this upstream - will retry as new upstream at %s\n",
|
||||
STUB_DEBUG_DAEMON, upstream->addr_str,
|
||||
asctime(gmtime(&upstream->conn_retry_time)));
|
||||
#endif
|
||||
}
|
||||
// Reset per connection counters
|
||||
upstream->queries_sent = 0;
|
||||
|
@ -2869,13 +2882,6 @@ getdns_cancel_callback(getdns_context *context,
|
|||
|
||||
|
||||
#ifndef STUB_NATIVE_DNSSEC
|
||||
static in_port_t
|
||||
upstream_port(getdns_upstream *upstream)
|
||||
{
|
||||
return ntohs(upstream->addr.ss_family == AF_INET
|
||||
? ((struct sockaddr_in *)&upstream->addr)->sin_port
|
||||
: ((struct sockaddr_in6*)&upstream->addr)->sin6_port);
|
||||
}
|
||||
|
||||
static uint32_t *
|
||||
upstream_scope_id(getdns_upstream *upstream)
|
||||
|
@ -3371,14 +3377,6 @@ getdns_context_get_eventloop(getdns_context *context, getdns_eventloop **loop)
|
|||
return GETDNS_RETURN_GOOD;
|
||||
}
|
||||
|
||||
static in_port_t
|
||||
upstream_port(getdns_upstream *upstream)
|
||||
{
|
||||
return ntohs(upstream->addr.ss_family == AF_INET
|
||||
? ((struct sockaddr_in *)&upstream->addr)->sin_port
|
||||
: ((struct sockaddr_in6*)&upstream->addr)->sin6_port);
|
||||
}
|
||||
|
||||
static getdns_dict*
|
||||
_get_context_settings(getdns_context* context)
|
||||
{
|
||||
|
|
|
@ -2687,6 +2687,7 @@ static int chain_head_validate(struct mem_funcs *mf, time_t now, uint32_t skew,
|
|||
* evaluated by processing each head in turn. The worst outcome per network request
|
||||
* is the dnssec status for that network request.
|
||||
*/
|
||||
#ifdef STUB_NATIVE_DNSSEC
|
||||
static void chain_set_netreq_dnssec_status(chain_head *chain, _getdns_rrset_iter *tas)
|
||||
{
|
||||
chain_head *head;
|
||||
|
@ -2723,6 +2724,7 @@ static void chain_set_netreq_dnssec_status(chain_head *chain, _getdns_rrset_iter
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* The DNSSEC status of all heads for a chain structure is evaluated by
|
||||
* processing each head in turn. The worst outcome is the dnssec status for
|
||||
|
|
|
@ -342,7 +342,7 @@ process_keepalive(
|
|||
/* Use server sent value unless the client specified a shorter one.
|
||||
Convert to ms first (wire value has units of 100ms) */
|
||||
uint64_t server_keepalive = ((uint64_t)gldns_read_uint16(position))*100;
|
||||
DEBUG_STUB("%s %-35s: FD: %d Server Keepalive recived: %d ms\n",
|
||||
DEBUG_STUB("%s %-35s: FD: %d Server Keepalive recieved: %d ms\n",
|
||||
STUB_DEBUG_READ, __FUNCTION__, upstream->fd,
|
||||
(int)server_keepalive);
|
||||
if (netreq->owner->context->idle_timeout < server_keepalive)
|
||||
|
@ -1636,8 +1636,10 @@ upstream_select_stateful(getdns_network_req *netreq, getdns_transport_list_t tra
|
|||
if (upstreams->upstreams[i].conn_state == GETDNS_CONN_BACKOFF &&
|
||||
upstreams->upstreams[i].conn_retry_time < now) {
|
||||
upstreams->upstreams[i].conn_state = GETDNS_CONN_CLOSED;
|
||||
#if defined(DAEMON_DEBUG) && DAEMON_DEBUG
|
||||
DEBUG_DAEMON("%s %s : Re-instating upstream\n",
|
||||
STUB_DEBUG_DAEMON, upstreams->upstreams[i].addr_str);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue