aboutsummaryrefslogtreecommitdiff
path: root/src/or/dnsserv.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-07-10 17:41:26 +0000
committerNick Mathewson <nickm@torproject.org>2007-07-10 17:41:26 +0000
commitd6ba1c3d960d943dcded1d108f1b1c4bd15b0add (patch)
tree71f532faf459f13606ed17e4a19ecd1436638839 /src/or/dnsserv.c
parent4325fc5e838194c5b1ee986d5583aaf67958be47 (diff)
downloadtor-d6ba1c3d960d943dcded1d108f1b1c4bd15b0add.tar.gz
tor-d6ba1c3d960d943dcded1d108f1b1c4bd15b0add.zip
r13676@catbus: nickm | 2007-07-10 13:41:24 -0400
Man. I thought I removed that code. svn:r10785
Diffstat (limited to 'src/or/dnsserv.c')
-rw-r--r--src/or/dnsserv.c44
1 files changed, 11 insertions, 33 deletions
diff --git a/src/or/dnsserv.c b/src/or/dnsserv.c
index 9f9ae4ce24..0bc91ed791 100644
--- a/src/or/dnsserv.c
+++ b/src/or/dnsserv.c
@@ -221,49 +221,27 @@ dnsserv_resolved(edge_connection_t *conn,
* or more of the questions in the request); then, call
* evdns_server_request_respond. */
if (answer_type == RESOLVED_TYPE_IPV6) {
- if (SOCKS_COMMAND_IS_RESOLVE_CONTROL(conn->socks_request->command))
- handle_control_resolve_response(req->questions[0]->name,
- "IPv6 not implemented");
- else {
- log_info(LD_APP, "Got an IPv6 answer; that's not implemented.");
- err = DNS_ERR_NOTIMPL;
- }
+ log_info(LD_APP, "Got an IPv6 answer; that's not implemented.");
+ err = DNS_ERR_NOTIMPL;
} else if (answer_type == RESOLVED_TYPE_IPV4 && answer_len == 4 &&
conn->socks_request->command == SOCKS_COMMAND_RESOLVE) {
- if (SOCKS_COMMAND_IS_RESOLVE_CONTROL(conn->socks_request->command))
- handle_control_resolve_response(req->questions[0]->name,
- tor_dup_addr(ntohl(get_uint32(answer))));
- else
- evdns_server_request_add_a_reply(req,
- conn->socks_request->address,
- 1, (char*)answer, ttl);
+ evdns_server_request_add_a_reply(req,
+ conn->socks_request->address,
+ 1, (char*)answer, ttl);
} else if (answer_type == RESOLVED_TYPE_HOSTNAME &&
conn->socks_request->command == SOCKS_COMMAND_RESOLVE_PTR) {
- if (SOCKS_COMMAND_IS_RESOLVE_CONTROL(conn->socks_request->command))
- handle_control_resolve_response(req->questions[0]->name, answer);
- else {
- char *ans = tor_strndup(answer, answer_len);
- evdns_server_request_add_ptr_reply(req, NULL,
+ char *ans = tor_strndup(answer, answer_len);
+ evdns_server_request_add_ptr_reply(req, NULL,
conn->socks_request->address,
(char*)answer, ttl);
- tor_free(ans);
- }
+ tor_free(ans);
} else if (answer_type == RESOLVED_TYPE_ERROR) {
- if (SOCKS_COMMAND_IS_RESOLVE_CONTROL(conn->socks_request->command))
- handle_control_resolve_response(req->questions[0]->name, "Unknown Host");
- else
- err = DNS_ERR_NOTEXIST;
+ err = DNS_ERR_NOTEXIST;
} else { /* answer_type == RESOLVED_TYPE_ERROR_TRANSIENT */
- if (SOCKS_COMMAND_IS_RESOLVE_CONTROL(conn->socks_request->command))
- handle_control_resolve_response(req->questions[0]->name,
- "Temporary Error");
- else
- err = DNS_ERR_SERVERFAILED;
+ err = DNS_ERR_SERVERFAILED;
}
- if (!SOCKS_COMMAND_IS_RESOLVE_CONTROL(conn->socks_request->command))
- evdns_server_request_respond(req, err);
-
+ evdns_server_request_respond(req, err);
conn->dns_server_request = NULL;
}