aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_edge.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-05-25 18:22:42 +0000
committerNick Mathewson <nickm@torproject.org>2007-05-25 18:22:42 +0000
commit527fbc304e1512abd49c1c72d8cda9af78a7299b (patch)
tree7c7d4c2f33003deecc12f2f29888738c7f14d8b2 /src/or/connection_edge.c
parent5f226f130cd4f5685e41a84d7a7e6ad7f72f6d6a (diff)
downloadtor-527fbc304e1512abd49c1c72d8cda9af78a7299b.tar.gz
tor-527fbc304e1512abd49c1c72d8cda9af78a7299b.zip
r12958@catbus: nickm | 2007-05-25 14:19:29 -0400
Fix more dnsport bugs: set state correctly, and actually cache the answers. svn:r10328
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r--src/or/connection_edge.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 8bc4e234e3..5d42548bd8 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -669,7 +669,7 @@ addressmap_rewrite(char *address, size_t maxlen)
return (rewrites > 0); /* done, no rewrite needed */
cp = tor_strdup(escaped_safe_str(ent->new_address));
- log_notice(LD_APP, "Addressmap: rewriting %s to %s",
+ log_info(LD_APP, "Addressmap: rewriting %s to %s",
escaped_safe_str(address), cp);
tor_free(cp);
strlcpy(address, ent->new_address, maxlen);
@@ -1945,12 +1945,6 @@ connection_ap_handshake_socks_resolved(edge_connection_t *conn,
char buf[384];
size_t replylen;
- if (conn->dns_server_request) {
- dnsserv_resolved(conn, answer_type, answer_len, answer, ttl);
- conn->socks_request->has_finished = 1; /* DOCDOC */
- return;
- }
-
if (ttl >= 0) {
if (answer_type == RESOLVED_TYPE_IPV4 && answer_len == 4) {
uint32_t a = ntohl(get_uint32(answer));
@@ -1966,6 +1960,12 @@ connection_ap_handshake_socks_resolved(edge_connection_t *conn,
}
}
+ if (conn->dns_server_request) {
+ dnsserv_resolved(conn, answer_type, answer_len, answer, ttl);
+ conn->socks_request->has_finished = 1; /* DOCDOC */
+ return;
+ }
+
if (conn->socks_request->socks_version == 4) {
buf[0] = 0x00; /* version */
if (answer_type == RESOLVED_TYPE_IPV4 && answer_len == 4) {