summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-04-27 14:36:30 -0400
committerNick Mathewson <nickm@torproject.org>2011-04-27 14:36:30 -0400
commit8b686d98c47226dfc4d7c87d6a472b592135ae07 (patch)
tree06df10f204230dc1be42abec946430b8d20f084f /src/or/config.c
parent3256627a4548c4977b834cc724689e0e9a960f06 (diff)
parent99621bc5a629a81a5a823ce21ac3d967443d0e12 (diff)
downloadtor-8b686d98c47226dfc4d7c87d6a472b592135ae07.tar.gz
tor-8b686d98c47226dfc4d7c87d6a472b592135ae07.zip
Merge maint-0.2.2 for the bug1090-part1-squashed branch
Resolved conflicts in: doc/tor.1.txt src/or/circuitbuild.c src/or/circuituse.c src/or/connection_edge.c src/or/connection_edge.h src/or/directory.c src/or/rendclient.c src/or/routerlist.c src/or/routerlist.h These were mostly releated to the routerinfo_t->node_t conversion.
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/or/config.c b/src/or/config.c
index e4c0693892..4a72cddf59 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1289,21 +1289,18 @@ options_act(or_options_t *old_options)
/* Check for transitions that need action. */
if (old_options) {
if ((options->UseEntryGuards && !old_options->UseEntryGuards) ||
- (options->ExcludeNodes &&
- !routerset_equal(old_options->ExcludeNodes,options->ExcludeNodes)) ||
- (options->ExcludeExitNodes &&
- !routerset_equal(old_options->ExcludeExitNodes,
- options->ExcludeExitNodes)) ||
- (options->EntryNodes &&
- !routerset_equal(old_options->EntryNodes, options->EntryNodes)) ||
- (options->ExitNodes &&
- !routerset_equal(old_options->ExitNodes, options->ExitNodes)) ||
+ !routerset_equal(old_options->ExcludeNodes,options->ExcludeNodes) ||
+ !routerset_equal(old_options->ExcludeExitNodes,
+ options->ExcludeExitNodes) ||
+ !routerset_equal(old_options->EntryNodes, options->EntryNodes) ||
+ !routerset_equal(old_options->ExitNodes, options->ExitNodes) ||
options->StrictNodes != old_options->StrictNodes) {
log_info(LD_CIRC,
"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();
+ addressmap_clear_excluded_trackexithosts(options);
}
/* How long should we delay counting bridge stats after becoming a bridge?
@@ -1454,7 +1451,8 @@ options_act(or_options_t *old_options)
/* Check if we need to parse and add the EntryNodes config option. */
if (options->EntryNodes &&
(!old_options ||
- (!routerset_equal(old_options->EntryNodes,options->EntryNodes))))
+ !routerset_equal(old_options->EntryNodes,options->EntryNodes) ||
+ !routerset_equal(old_options->ExcludeNodes,options->ExcludeNodes)))
entry_nodes_should_be_added();
/* Since our options changed, we might need to regenerate and upload our
@@ -3253,6 +3251,12 @@ options_validate(or_options_t *old_options, or_options_t *options,
REJECT("Servers must be able to freely connect to the rest "
"of the Internet, so they must not set UseBridges.");
+ /* If both of these are set, we'll end up with funny behavior where we
+ * demand enough entrynodes be up and running else we won't build
+ * circuits, yet we never actually use them. */
+ if (options->UseBridges && options->EntryNodes)
+ REJECT("You cannot set both UseBridges and EntryNodes.");
+
options->_AllowInvalid = 0;
if (options->AllowInvalidNodes) {
SMARTLIST_FOREACH(options->AllowInvalidNodes, const char *, cp, {