summaryrefslogtreecommitdiff
path: root/src/or/connection_edge.c
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@fscked.org>2012-12-08 16:37:22 -0800
committerMike Perry <mikeperry-git@fscked.org>2012-12-08 16:37:22 -0800
commit686fc222593fd46ec82d62f0fa62ca02900c1014 (patch)
treee7bcb41cb31078acb8c127f8006216e4a9cddea4 /src/or/connection_edge.c
parentb599a6ed07fd588500a256ef815e87729449626a (diff)
downloadtor-686fc222593fd46ec82d62f0fa62ca02900c1014.tar.gz
tor-686fc222593fd46ec82d62f0fa62ca02900c1014.zip
Allow any valid 'end' cell to mean a circuit was used successfully.
Also improve some log messages.
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r--src/or/connection_edge.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 79bb54cbb7..ca6060ca57 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -2178,14 +2178,19 @@ connection_ap_handshake_socks_reply(entry_connection_t *conn, char *reply,
/* Flag this stream's circuit as having completed a stream successfully
* (for path bias) */
- if (status == SOCKS5_SUCCEEDED) {
+ if (status == SOCKS5_SUCCEEDED ||
+ endreason == END_STREAM_REASON_RESOLVEFAILED ||
+ endreason == END_STREAM_REASON_CONNECTREFUSED ||
+ endreason == END_STREAM_REASON_CONNRESET ||
+ endreason == END_STREAM_REASON_NOROUTE ||
+ endreason == END_STREAM_REASON_RESOURCELIMIT) {
if(!conn->edge_.on_circuit ||
!CIRCUIT_IS_ORIGIN(conn->edge_.on_circuit)) {
- // XXX: Weird. We hit this a lot, and yet have no unusable_circs.
- // Maybe during addrmaps/resolves?
- log_warn(LD_BUG,
- "(Harmless.) No origin circuit for successful SOCKS stream. "
- "Reason: %d", endreason);
+ // DNS remaps can trigger this. So can failed hidden service
+ // lookups.
+ log_info(LD_BUG,
+ "(Harmless.) No origin circuit for successful SOCKS stream %ld. "
+ "Reason: %d", ENTRY_TO_CONN(conn)->global_identifier, endreason);
} else {
TO_ORIGIN_CIRCUIT(conn->edge_.on_circuit)->path_state
= PATH_STATE_USE_SUCCEEDED;