diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-01-11 11:10:23 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-01-11 11:10:23 -0500 |
commit | 180ecd6a2b3ee9fe10fed760d30ac9fb72b03346 (patch) | |
tree | 3617e708a05eb7253a49a6f083974764cfcf5cb4 /src/or/config.c | |
parent | 7b51667d638242b9e47bdd0d4357596c380f7c94 (diff) | |
parent | ac2f90ed001f168459afce8d137fe5e43baa173f (diff) | |
download | tor-180ecd6a2b3ee9fe10fed760d30ac9fb72b03346.tar.gz tor-180ecd6a2b3ee9fe10fed760d30ac9fb72b03346.zip |
Merge remote-tracking branch 'teor/nickm-bug13401'
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/or/config.c b/src/or/config.c index 2fa077e146..a1347b9d7d 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -448,6 +448,7 @@ static config_var_t option_vars_[] = { V(TestingCertMaxDownloadTries, UINT, "8"), V(TestingDirAuthVoteExit, ROUTERSET, NULL), V(TestingDirAuthVoteGuard, ROUTERSET, NULL), + V(TestingDirAuthVoteHSDir, ROUTERSET, NULL), VAR("___UsingTestNetworkDefaults", BOOL, UsingTestNetworkDefaults_, "0"), { NULL, CONFIG_TYPE_OBSOLETE, 0, NULL } @@ -496,6 +497,7 @@ static const config_var_t testing_tor_network_defaults[] = { V(TestingEnableCellStatsEvent, BOOL, "1"), V(TestingEnableTbEmptyEvent, BOOL, "1"), VAR("___UsingTestNetworkDefaults", BOOL, UsingTestNetworkDefaults_, "1"), + V(RendPostPeriod, INTERVAL, "2 minutes"), { NULL, CONFIG_TYPE_OBSOLETE, 0, NULL } }; @@ -2492,6 +2494,7 @@ compute_publishserverdescriptor(or_options_t *options) /** Lowest allowable value for RendPostPeriod; if this is too low, hidden * services can overload the directory system. */ #define MIN_REND_POST_PERIOD (10*60) +#define MIN_REND_POST_PERIOD_TESTING (5) /** Higest allowable value for PredictedPortsRelevanceTime; if this is * too high, our selection of exits will decrease for an extended @@ -2976,10 +2979,13 @@ options_validate(or_options_t *old_options, or_options_t *options, options->MinUptimeHidServDirectoryV2 = 0; } - if (options->RendPostPeriod < MIN_REND_POST_PERIOD) { + const int min_rendpostperiod = + options->TestingTorNetwork ? + MIN_REND_POST_PERIOD_TESTING : MIN_REND_POST_PERIOD; + if (options->RendPostPeriod < min_rendpostperiod) { log_warn(LD_CONFIG, "RendPostPeriod option is too short; " - "raising to %d seconds.", MIN_REND_POST_PERIOD); - options->RendPostPeriod = MIN_REND_POST_PERIOD; + "raising to %d seconds.", min_rendpostperiod); + options->RendPostPeriod = min_rendpostperiod;; } if (options->RendPostPeriod > MAX_DIR_PERIOD) { |