return evdns_base_count_nameservers(the_evdns_base);
}
+#ifdef HAVE_EVDNS_BASE_GET_NAMESERVER_ADDR
/**
* Return address of configured nameserver in <b>the_evdns_base</b>
* at index <b>idx</b>.
return NULL;
}
+#endif
/** Configure eventdns nameservers if force is true, or if the configuration
* has changed since the last time we called this function, or if we failed on
#include "feature/relay/dns_structs.h"
size_t number_of_configured_nameservers(void);
+#ifdef HAVE_EVDNS_BASE_GET_NAMESERVER_ADDR
tor_addr_t *configured_nameserver_address(const size_t idx);
+#endif
MOCK_DECL(STATIC int,dns_resolve_impl,(edge_connection_t *exitconn,
int is_resolve,or_circuit_t *oncirc, char **hostname_out,
/* Copyright (c) 2015-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
+#include "orconfig.h"
#include "core/or/or.h"
#include "test/test.h"
#define NS_MODULE dns
+#ifdef HAVE_EVDNS_BASE_GET_NAMESERVER_ADDR
#define NS_SUBMODULE configure_nameservers_fallback
static or_options_t options = {
}
#undef NS_SUBMODULE
+#endif
#define NS_SUBMODULE clip_ttl
#undef NS_SUBMODULE
struct testcase_t dns_tests[] = {
+#ifdef HAVE_EVDNS_BASE_GET_NAMESERVER_ADDR
TEST_CASE(configure_nameservers_fallback),
+#endif
TEST_CASE(clip_ttl),
TEST_CASE(resolve),
TEST_CASE_ASPECT(resolve_impl, addr_is_ip_no_need_to_resolve),