aboutsummaryrefslogtreecommitdiff
path: root/src/or/dns.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-02-05 21:03:24 +0000
committerNick Mathewson <nickm@torproject.org>2005-02-05 21:03:24 +0000
commit322c728e978c3c2ad30d8b56de714029052cc070 (patch)
tree01abe31cfbff4ff2f0fd5e5bf8af3dfc09fc745a /src/or/dns.c
parent0ff41a3b375f857002900e042d90c68cf2764c85 (diff)
downloadtor-322c728e978c3c2ad30d8b56de714029052cc070.tar
tor-322c728e978c3c2ad30d8b56de714029052cc070.tar.gz
Fix tor-resolve implementation to prevent crashes and send resolves when we should.
svn:r3561
Diffstat (limited to 'src/or/dns.c')
-rw-r--r--src/or/dns.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/dns.c b/src/or/dns.c
index 5e68c63f9..7b23f60ea 100644
--- a/src/or/dns.c
+++ b/src/or/dns.c
@@ -216,6 +216,8 @@ int dns_resolve(connection_t *exitconn) {
* know the answer. */
if (tor_inet_aton(exitconn->address, &in) != 0) {
exitconn->addr = ntohl(in.s_addr);
+ if (exitconn->purpose == EXIT_PURPOSE_RESOLVE)
+ send_resolved_cell(exitconn, RESOLVED_TYPE_IPV4);
return 1;
}