diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-05-31 17:00:37 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-05-31 17:00:37 -0400 |
commit | 0cbe3ff313deb6ef7807b07f922a567e8e1274bd (patch) | |
tree | 4b3f4fd566a8aa12d51b276bd79d60d70fb45bcd | |
parent | dff73d26f3a6c9d7011ad98a6752129a37625a10 (diff) | |
parent | b7e863c07305941d0c12b46da503fca694148abf (diff) | |
download | tor-0cbe3ff313deb6ef7807b07f922a567e8e1274bd.tar.gz tor-0cbe3ff313deb6ef7807b07f922a567e8e1274bd.zip |
Merge remote-tracking branch 'origin/maint-0.2.2'
-rw-r--r-- | changes/bug5283 | 6 | ||||
-rw-r--r-- | src/or/circuituse.c | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/changes/bug5283 b/changes/bug5283 new file mode 100644 index 0000000000..f0325cf26c --- /dev/null +++ b/changes/bug5283 @@ -0,0 +1,6 @@ + o Major bugfixes: + - Fix an edge case where if we fetch or publish a hidden service + descriptor, we might build a 4-hop circuit and then use that circuit + for exiting afterwards -- even if the new last hop doesn't obey our + ExitNodes config option. Fixes bug 5283; bugfix on 0.2.0.10-alpha. + diff --git a/src/or/circuituse.c b/src/or/circuituse.c index de0aa7da20..6f4202ea21 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -1412,7 +1412,13 @@ circuit_get_open_circ_or_launch(entry_connection_t *conn, need_uptime = !conn->want_onehop && !conn->use_begindir && smartlist_string_num_isin(options->LongLivedPorts, conn->socks_request->port); - need_internal = desired_circuit_purpose != CIRCUIT_PURPOSE_C_GENERAL; + + if (desired_circuit_purpose != CIRCUIT_PURPOSE_C_GENERAL) + need_internal = 1; + else if (conn->use_begindir || conn->want_onehop) + need_internal = 1; + else + need_internal = 0; circ = circuit_get_best(conn, 1, desired_circuit_purpose, need_uptime, need_internal); |