summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2011-11-16 20:55:33 -0500
committerRoger Dingledine <arma@torproject.org>2011-11-21 18:22:10 -0500
commitc0ec4eafc54d84089536caf51b1367e8d9ddacef (patch)
tree2b487a5b8ba33bb66e0b9ded5561e47028ed70db /src/or/config.c
parentf4e053d6dff0b868449a8c225c2062b42083733f (diff)
downloadtor-c0ec4eafc54d84089536caf51b1367e8d9ddacef.tar.gz
tor-c0ec4eafc54d84089536caf51b1367e8d9ddacef.zip
parameterize bw cutoffs to guarantee Fast and Guard flags
Now it will be easier for researchers to simulate Tor networks with different values. Resolves ticket 4484.
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index ffa763e65c..94a6538fa9 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -175,6 +175,8 @@ static config_var_t _option_vars[] = {
V(AuthDirBadDir, LINELIST, NULL),
V(AuthDirBadExit, LINELIST, NULL),
V(AuthDirInvalid, LINELIST, NULL),
+ V(AuthDirFastGuarantee, MEMUNIT, "20 KB"),
+ V(AuthDirGuardBWGuarantee, MEMUNIT, "250 KB"),
V(AuthDirReject, LINELIST, NULL),
V(AuthDirRejectUnlisted, BOOL, "0"),
V(AuthDirListBadDirs, BOOL, "0"),
@@ -3373,6 +3375,12 @@ options_validate(or_options_t *old_options, or_options_t *options,
if (ensure_bandwidth_cap(&options->PerConnBWBurst,
"PerConnBWBurst", msg) < 0)
return -1;
+ if (ensure_bandwidth_cap(&options->AuthDirFastGuarantee,
+ "AuthDirFastGuarantee", msg) < 0)
+ return -1;
+ if (ensure_bandwidth_cap(&options->AuthDirGuardBWGuarantee,
+ "AuthDirGuardBWGuarantee", msg) < 0)
+ return -1;
if (options->RelayBandwidthRate && !options->RelayBandwidthBurst)
options->RelayBandwidthBurst = options->RelayBandwidthRate;