From 04bec6757494a7ac3a798bde068abf151c8a8242 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 21 Sep 2006 21:48:16 +0000 Subject: r8874@Kushana: nickm | 2006-09-21 15:22:27 -0400 Rename and document SearchDomains and ResolvConf options; warn if ServerDNSResolvConfFile is given but eventdns isnt enabled. svn:r8439 --- src/or/dns.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src/or/dns.c') diff --git a/src/or/dns.c b/src/or/dns.c index f2ebc2e481..29255ad822 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -796,10 +796,9 @@ dns_cancel_pending_resolve(const char *address) } /** Helper: adds an entry to the DNS cache mapping address to the ipv4 - * address addr. ttl is a cache ttl; outcome is one of + * address addr (if is_reverse is 0) or the hostname hostname if + * (is_reverse is 1). ttl is a cache ttl; outcome is one of * DNS_RESOLVE_{FAILED_TRANSIENT|FAILED_PERMANENT|SUCCEEDED}. - * - * DOCDOC args **/ static void add_answer_to_cache(const char *address, int is_reverse, uint32_t addr, @@ -1136,7 +1135,7 @@ dnsworker_main(void *data) int *fdarray = data; int fd; int result; - int search = get_options()->SearchDomains; + int search = get_options()->ServerDNSSearchDomains; /* log_fn(LOG_NOTICE,"After spawn: fdarray @%d has %d:%d", (int)fdarray, * fdarray[0],fdarray[1]); */ @@ -1375,9 +1374,9 @@ connection_dns_reached_eof(connection_t *conn) /** Configure eventdns nameservers if force is true, or if the configuration * has changed since the last time we called this function. On Unix, this - * reads from options->ResolvConf or /etc/resolv.conf; on Windows, this reads - * from options->ResolvConf or the registry. Return 0 on success or -1 on - * failure. */ + * reads from options->ServerDNSResolvConfFile or /etc/resolv.conf; on + * Windows, this reads from options->ServerDNSResolvConfFile or the registry. + * Return 0 on success or -1 on failure. */ static int configure_nameservers(int force) { @@ -1385,7 +1384,7 @@ configure_nameservers(int force) const char *conf_fname; struct stat st; options = get_options(); - conf_fname = options->ResolvConf; + conf_fname = options->ServerDNSResolvConfFile; #ifndef MS_WINDOWS if (!conf_fname) conf_fname = "/etc/resolv.conf"; @@ -1433,7 +1432,7 @@ configure_nameservers(int force) if (eventdns_count_nameservers() == 0) { log_warn(LD_EXIT, "Unable to find any platform nameservers in " "your Windows configuration. Perhaps you should list a " - "ResolvConf file in your torrc?"); + "ServerDNSResolvConfFile file in your torrc?"); return -1; } if (nameservers_configured) @@ -1507,7 +1506,7 @@ launch_resolve(edge_connection_t *exitconn) char *addr = tor_strdup(exitconn->_base.address); struct in_addr in; int r; - int options = get_options()->SearchDomains ? 0 : DNS_QUERY_NO_SEARCH; + int options = get_options()->ServerDNSSearchDomains ? 0 : DNS_QUERY_NO_SEARCH; /* What? Nameservers not configured? Sounds like a bug. */ if (!nameservers_configured) { log_warn(LD_EXIT, "Harmless bug: nameservers not configured, but resolve " -- cgit v1.2.3-54-g00ecf