summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2018-04-25 15:10:24 +0300
committerNick Mathewson <nickm@torproject.org>2018-04-27 12:44:54 -0400
commitd00ed406e08942d6539281eb28e875939ee214e5 (patch)
treed9691bdb12dec7f01b9c410f7c7615a9f6058632 /src/or/config.c
parent3bf9974b6c4ee9f2a8204c058e1b7c206b99d620 (diff)
downloadtor-d00ed406e08942d6539281eb28e875939ee214e5.tar.gz
tor-d00ed406e08942d6539281eb28e875939ee214e5.zip
Introduce torrc option NumPrimaryGuards
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 9c0b321b56..04e10e956e 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),
@@ -3763,6 +3764,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) &&