summaryrefslogtreecommitdiff
path: root/src/or/dns.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-01-14 19:00:23 +0000
committerNick Mathewson <nickm@torproject.org>2008-01-14 19:00:23 +0000
commit3b8f76aa512338ec91104240d28d8f32246b5eb6 (patch)
treea0cfda3a8a0007ecea1bfaa242e7f5d1eda378e3 /src/or/dns.c
parente49229caf8645564646354c6f3670db2cab26583 (diff)
downloadtor-3b8f76aa512338ec91104240d28d8f32246b5eb6.tar.gz
tor-3b8f76aa512338ec91104240d28d8f32246b5eb6.zip
r17611@catbus: nickm | 2008-01-14 13:44:16 -0500
add some missing checks for failing return values. svn:r13130
Diffstat (limited to 'src/or/dns.c')
-rw-r--r--src/or/dns.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/or/dns.c b/src/or/dns.c
index b4b86502fb..79af4f0607 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -1458,8 +1458,11 @@ launch_test_addresses(int fd, short event, void *args)
return;
SMARTLIST_FOREACH(options->ServerDNSTestAddresses, const char *, address,
{
- evdns_resolve_ipv4(address, DNS_QUERY_NO_SEARCH, evdns_callback,
- tor_strdup(address));
+ int r = evdns_resolve_ipv4(address, DNS_QUERY_NO_SEARCH, evdns_callback,
+ tor_strdup(address));
+ if (r)
+ log_info(LD_EXIT, "eventdns rejected test address %s: error %d",
+ escaped_safe_str(address), r);
});
}
@@ -1512,7 +1515,9 @@ dns_launch_correctness_checks(void)
evtimer_set(&launch_event, launch_test_addresses, NULL);
timeout.tv_sec = 30;
timeout.tv_usec = 0;
- evtimer_add(&launch_event, &timeout);
+ if (evtimer_add(&launch_event, &timeout)<0) {
+ log_warn(LD_BUG, "Couldn't add timer for checking for dns hijacking");
+ }
}
/** Return true iff our DNS servers lie to us too much to be trustd. */