summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-04-27 12:45:07 -0400
committerNick Mathewson <nickm@torproject.org>2018-04-27 12:45:07 -0400
commit346c2eb4e60299f69327b5e63e1e25aaf678f964 (patch)
tree110b6b0cecccecb62c6c0c917922e0f51dbce870 /src/or/config.c
parent8b58e1e323e362463906d2576b9d2b9e788c2f30 (diff)
parentd00ed406e08942d6539281eb28e875939ee214e5 (diff)
downloadtor-346c2eb4e60299f69327b5e63e1e25aaf678f964.tar.gz
tor-346c2eb4e60299f69327b5e63e1e25aaf678f964.zip
Merge branch 'bug25843_v2_squashed'
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 87a3588db7..5d22365703 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -457,6 +457,7 @@ static config_var_t option_vars_[] = {
V(NumCPUs, UINT, "0"),
V(NumDirectoryGuards, UINT, "0"),
V(NumEntryGuards, UINT, "0"),
+ V(NumPrimaryGuards, UINT, "0"),
V(OfflineMasterKey, BOOL, "0"),
OBSOLETE("ORListenAddress"),
VPORT(ORPort),
@@ -3775,6 +3776,11 @@ options_validate(or_options_t *old_options, or_options_t *options,
"http://freehaven.net/anonbib/#hs-attack06 for details.");
}
+ if (options->NumPrimaryGuards && options->NumEntryGuards &&
+ options->NumEntryGuards > options->NumPrimaryGuards) {
+ REJECT("NumEntryGuards must not be greater than NumPrimaryGuards.");
+ }
+
if (options->EntryNodes &&
routerset_is_list(options->EntryNodes) &&
(routerset_len(options->EntryNodes) == 1) &&