Merge remote-tracking branch 'origin/maint-0.2.2'

This commit is contained in:
Nick Mathewson
2012-05-31 17:00:37 -04:00
2 changed files with 13 additions and 1 deletions
+6
View File
@@ -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.
+7 -1
View File
@@ -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);