aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-10-13 16:07:37 -0400
committerNick Mathewson <nickm@torproject.org>2010-10-13 16:07:37 -0400
commit3aec6556941433e4770226530457eb79a511b555 (patch)
treefe7dc912e9cbe2da92616408bdfc567325ab5662
parent8c837db38f5b2015dd579de8d8df580f51d133bc (diff)
parent0ed8d5a537d1092f510342d07bd7970185995ebf (diff)
downloadtor-3aec6556941433e4770226530457eb79a511b555.tar.gz
tor-3aec6556941433e4770226530457eb79a511b555.zip
Merge remote branch 'arma/bug1982_2'
Resolved a minor conflict in: src/or/circuitbuild.c
-rw-r--r--changes/bug19825
-rw-r--r--src/or/circuitbuild.c12
-rw-r--r--src/or/config.c5
3 files changed, 11 insertions, 11 deletions
diff --git a/changes/bug1982 b/changes/bug1982
new file mode 100644
index 0000000000..30ce2df7c6
--- /dev/null
+++ b/changes/bug1982
@@ -0,0 +1,5 @@
+ o Major features:
+ - Allow EntryNodes to include country codes like {de} or IP addresses
+ or network masks. Previously we had disallowed these options
+ because we didn't have an efficient way to keep the list up to
+ date. Resolves bug 1982.
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 6e9e0e192a..a4cdf81cbd 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -3884,15 +3884,15 @@ entry_guards_prepend_from_config(or_options_t *options)
/* Split entry guards into those on the list and those not. */
- /* XXXX022 Now that we allow countries and IP ranges in EntryNodes, this is
- * potentially an enormous list. For now, we disable such values for
- * EntryNodes in options_validate(); really, this wants a better solution.
- * Perhaps we should do this calculation once whenever the list of routers
- * changes or the entrynodes setting changes.
- */
+ /* Now that we allow countries and IP ranges in EntryNodes, this is
+ * potentially an enormous list. It's not so bad though because we
+ * only call this function when a) we're making a new circuit, and b)
+ * we've called directory_info_has_arrived() or changed our EntryNodes
+ * since the last time we made a circuit. */
routerset_get_all_nodes(entry_nodes, options->EntryNodes, 0);
SMARTLIST_FOREACH(entry_nodes, const node_t *,node,
smartlist_add(entry_fps, (void*)node->identity));
+
SMARTLIST_FOREACH(entry_guards, entry_guard_t *, e, {
if (smartlist_digest_isin(entry_fps, e->identity))
smartlist_add(old_entry_guards_on_list, e);
diff --git a/src/or/config.c b/src/or/config.c
index b438626343..668239871b 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -3107,11 +3107,6 @@ options_validate(or_options_t *old_options, or_options_t *options,
"features to be broken in unpredictable ways.");
}
- if (options->EntryNodes && !routerset_is_list(options->EntryNodes)) {
- /* XXXX fix this; see entry_guards_prepend_from_config(). */
- REJECT("IPs or countries are not yet supported in EntryNodes.");
- }
-
if (options->AuthoritativeDir) {
if (!options->ContactInfo && !options->TestingTorNetwork)
REJECT("Authoritative directory servers must set ContactInfo");