[tor-commits] [tor/master] Fix bug2571: warn on EntryNodes set and UseEntryGuards disabled
nickm at torproject.org
nickm at torproject.org
Thu Dec 22 15:33:16 UTC 2011
commit 782b7f49d8a681113a48c6108174164e7df2f72c
Author: Nick Mathewson <nickm at torproject.org>
Date: Thu Dec 22 10:31:52 2011 -0500
Fix bug2571: warn on EntryNodes set and UseEntryGuards disabled
---
changes/bug2571 | 3 +++
src/or/config.c | 4 ++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/changes/bug2571 b/changes/bug2571
new file mode 100644
index 0000000..dfb4f3b
--- /dev/null
+++ b/changes/bug2571
@@ -0,0 +1,3 @@
+ - Minor features:
+ - If EntryNodes are given, but UseEntryGuards is set to 0, warn that
+ EntryNodes will have no effect. Resolves issue 2571.
diff --git a/src/or/config.c b/src/or/config.c
index 254e9ff..be4113f 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -3566,6 +3566,10 @@ options_validate(or_options_t *old_options, or_options_t *options,
if (options->UseBridges && options->EntryNodes)
REJECT("You cannot set both UseBridges and EntryNodes.");
+ if (options->EntryNodes && !options->UseEntryGuards)
+ log_warn(LD_CONFIG, "EntryNodes is set, but UseEntryGuards is disabled. "
+ "EntryNodes will be ignored.");
+
options->_AllowInvalid = 0;
if (options->AllowInvalidNodes) {
SMARTLIST_FOREACH(options->AllowInvalidNodes, const char *, cp, {
More information about the tor-commits
mailing list