From c0ec4eafc54d84089536caf51b1367e8d9ddacef Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Wed, 16 Nov 2011 20:55:33 -0500 Subject: 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. --- src/or/config.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/or/config.c') 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; -- cgit v1.2.3-54-g00ecf