diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-05-31 23:40:35 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-05-31 23:40:35 +0000 |
commit | 3b4fa59b60fdb3efd98d860ba0304fda8888b379 (patch) | |
tree | 5f33ba4a2f24b60987b6fb5d2b1f882805bd37a6 /src/or/connection_edge.c | |
parent | b1cd5892cb438754a878e473bf63bc3a40f8f171 (diff) | |
download | tor-3b4fa59b60fdb3efd98d860ba0304fda8888b379.tar.gz tor-3b4fa59b60fdb3efd98d860ba0304fda8888b379.zip |
r13117@catbus: nickm | 2007-05-31 19:40:32 -0400
Patch from Tup: treat RESOLVED_TYPE_ERROR_TRANSIENT as a SERVERFAILED, and RESOLVED_TYPE_ERROR as NOTEXIST. Generate transient/nontransient errors more sensibly. Set flags better on DNS replies.
svn:r10427
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r-- | src/or/connection_edge.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 110057005c..3ac8e7346a 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -57,7 +57,8 @@ _connection_mark_unattached_ap(edge_connection_t *conn, int endreason, if (SOCKS_COMMAND_IS_CONNECT(conn->socks_request->command)) connection_ap_handshake_socks_reply(conn, NULL, 0, endreason); else if (SOCKS_COMMAND_IS_RESOLVE(conn->socks_request->command)) - connection_ap_handshake_socks_resolved(conn, RESOLVED_TYPE_ERROR, + connection_ap_handshake_socks_resolved(conn, + RESOLVED_TYPE_ERROR_TRANSIENT, 0, NULL, -1); else /* unknown or no handshake at all. send no response. */ conn->socks_request->has_finished = 1; @@ -1306,7 +1307,8 @@ connection_ap_handshake_rewrite_and_attach(edge_connection_t *conn, log_warn(LD_APP,"Address to be resolved is too large. Failing."); control_event_client_status(LOG_WARN, "SOCKS_BAD_HOSTNAME HOSTNAME=%s", escaped(socks->address)); - connection_ap_handshake_socks_resolved(conn,RESOLVED_TYPE_ERROR, + connection_ap_handshake_socks_resolved(conn, + RESOLVED_TYPE_ERROR_TRANSIENT, 0,NULL,-1); connection_mark_unattached_ap(conn, END_STREAM_REASON_SOCKSPROTOCOL | |