summaryrefslogtreecommitdiff
path: root/src/or/dns.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-02-15 23:39:08 +0000
committerNick Mathewson <nickm@torproject.org>2008-02-15 23:39:08 +0000
commitca4eb987c8653a15d971341f40cb10bfaa92d772 (patch)
tree69b191c6f327d024163730ec5b864cbdf7b17716 /src/or/dns.c
parent418c2e1b6b7900a1b0b7974738b66f84485b4c36 (diff)
downloadtor-ca4eb987c8653a15d971341f40cb10bfaa92d772.tar.gz
tor-ca4eb987c8653a15d971341f40cb10bfaa92d772.zip
r14182@tombo: nickm | 2008-02-15 17:20:51 -0500
Defer, downgrade, or address more XXX020s. The remaining ones are all ones we should deal with before release. svn:r13530
Diffstat (limited to 'src/or/dns.c')
-rw-r--r--src/or/dns.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/or/dns.c b/src/or/dns.c
index 733f334f12..eca6905e82 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -851,8 +851,6 @@ dns_cancel_pending_resolve(const char *address)
}
if (!resolve->pending_connections) {
- /* XXX this should never trigger, but sometimes it does */
- /* XXXX020 is the above still true? -NM */
log_warn(LD_BUG,
"Address %s is pending but has no pending connections!",
escaped_safe_str(address));
@@ -872,8 +870,7 @@ dns_cancel_pending_resolve(const char *address)
assert_connection_ok(TO_CONN(pendconn), 0);
tor_assert(pendconn->_base.s == -1);
if (!pendconn->_base.marked_for_close) {
- /* XXXX020 RESOURCELIMIT? Not RESOLVEFAILED??? */
- connection_edge_end(pendconn, END_STREAM_REASON_RESOURCELIMIT);
+ connection_edge_end(pendconn, END_STREAM_REASON_RESOLVEFAILED);
}
circ = circuit_get_by_edge_conn(pendconn);
if (circ)
@@ -1269,7 +1266,7 @@ launch_resolve(edge_connection_t *exitconn)
log_info(LD_EXIT, "Launching eventdns request for %s",
escaped_safe_str(exitconn->_base.address));
r = evdns_resolve_ipv4(exitconn->_base.address, options,
- evdns_callback, addr);
+ evdns_callback, addr);
} else if (r == 1) {
log_info(LD_EXIT, "Launching eventdns reverse request for %s",
escaped_safe_str(exitconn->_base.address));
@@ -1425,13 +1422,14 @@ launch_wildcard_check(int min_len, int max_len, const char *suffix)
log_info(LD_EXIT, "Testing whether our DNS server is hijacking nonexistent "
"domains with request for bogus hostname \"%s\"", addr);
- r = evdns_resolve_ipv4(addr, DNS_QUERY_NO_SEARCH,
- evdns_wildcard_check_callback, addr);
- if (r)
+ r = evdns_resolve_ipv4(/* This "addr" tells us which address to resolve */
+ addr,
+ DNS_QUERY_NO_SEARCH, evdns_wildcard_check_callback,
+ /* This "addr" is an argument to the callback*/ addr);
+ if (r) {
+ /* There is no evdns request in progress; stop addr from getting leaked */
tor_free(addr);
- /* XXX020 Nick, the above "if" needs some explanation. Plus the fact
- * that we're sending addr twice. Given that evdns_resolve_ipv4() has
- * no doxygen documentation. -RD */
+ }
}
/** Launch attempts to resolve a bunch of known-good addresses (configured in