aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNeel Chauhan <neel@neelc.org>2017-01-12 09:35:27 -0500
committerNick Mathewson <nickm@torproject.org>2017-01-14 14:55:23 -0500
commit9e5512b48d072e3fd21f1f1884f706c5330e0935 (patch)
treec94b4acfa64054348219b6696b1a944fb89c8d5c /src/or/config.c
parentc4d06c267879c6d23f1cdf0d0ca19167cb677ed5 (diff)
downloadtor-9e5512b48d072e3fd21f1f1884f706c5330e0935.tar.gz
tor-9e5512b48d072e3fd21f1f1884f706c5330e0935.zip
Disallow setting UseBridges to 1 and UseEntryGuards to 0
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index b8ca14e85b..c4e9ca2403 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -3372,6 +3372,11 @@ 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 we have UseBridges as 1 and UseEntryGuards as 0, we end up bypassing
+ * the use of bridges */
+ if (options->UseBridges && !options->UseEntryGuards)
+ REJECT("Setting UseBridges requires also setting UseEntryGuards.");
+
options->MaxMemInQueues =
compute_real_max_mem_in_queues(options->MaxMemInQueues_raw,
server_mode(options));