summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2009-09-19 21:52:57 -0400
committerRoger Dingledine <arma@torproject.org>2009-12-21 03:52:32 -0500
commitef81649d2fc9246d6fec07402eafae689a39688a (patch)
tree60b618eafe82fcf178b70ab29c82061cdc704e40 /src/or/config.c
parentc75a2eea60435dd078c6a8aaf20626162f7f8b27 (diff)
downloadtor-ef81649d2fc9246d6fec07402eafae689a39688a.tar.gz
tor-ef81649d2fc9246d6fec07402eafae689a39688a.zip
Be more willing to use an unsuitable circuit for exit.
Specifically, there are two cases: a) are we willing to start a new circuit at a node not in your ExitNodes config option, and b) are we willing to make use of a circuit that's already established but has an unsuitable exit. Now we discard all your circuits when you set ExitNodes, so the only way you could end up with an exit circuit that ends at an unsuitable place is if we explicitly ran out of exit nodes, StrictNodes was 0, and we built this circuit to solve a stream that needs solving. Fixes bug in dc322931, which would ignore the just-built circuit because it has an unsuitable exit.
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/or/config.c b/src/or/config.c
index b67ed3f52e..0f6d99765f 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1424,10 +1424,15 @@ options_act(or_options_t *old_options)
!routerset_equal(old_options->ExcludeNodes,options->ExcludeNodes)) ||
(options->ExcludeExitNodes &&
!routerset_equal(old_options->ExcludeExitNodes,
- options->ExcludeExitNodes))) {
+ options->ExcludeExitNodes)) ||
+ (options->EntryNodes &&
+ !routerset_equal(old_options->EntryNodes, options->EntryNodes)) ||
+ (options->ExitNodes &&
+ !routerset_equal(old_options->ExitNodes, options->ExitNodes)) ||
+ options->StrictNodes != old_options->StrictNodes) {
log_info(LD_CIRC,
- "Changed to using entry guards, or changed ExcludeNodes, or "
- "changed ExcludeExitNodes. Abandoning previous circuits.");
+ "Changed to using entry guards, or changed preferred or "
+ "excluded node lists. Abandoning previous circuits.");
circuit_mark_all_unused_circs();
circuit_expire_all_dirty_circs();
}