diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-03-05 14:32:05 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-03-05 14:32:05 -0500 |
commit | 103cebd9243367106909251e73ee97aafe9d201c (patch) | |
tree | d0e3b8328531a0e283cda1075a33910e467a7410 /src/or/config.c | |
parent | f0b2dc83b60b0de1644ce9fb5e19fef516e9ffde (diff) | |
parent | 25374d307d5fc0731eb116dc8e9840bfbbff9167 (diff) | |
download | tor-103cebd9243367106909251e73ee97aafe9d201c.tar.gz tor-103cebd9243367106909251e73ee97aafe9d201c.zip |
Merge branch 'ticket9176_squashed'
Conflicts:
doc/tor.1.txt
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c index 458b1e1079..26fe911701 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -318,6 +318,7 @@ static config_var_t option_vars_[] = { V(NATDListenAddress, LINELIST, NULL), VPORT(NATDPort, LINELIST, NULL), V(Nickname, STRING, NULL), + V(PredictedCircsRelevanceTime, INTERVAL, "1 hour"), V(WarnUnsafeSocks, BOOL, "1"), OBSOLETE("NoPublish"), VAR("NodeFamily", LINELIST, NodeFamilies, NULL), @@ -2381,6 +2382,11 @@ compute_publishserverdescriptor(or_options_t *options) * services can overload the directory system. */ #define MIN_REND_POST_PERIOD (10*60) +/** Higest allowable value for PredictedCircsRelevanceTime; if this is + * too high, our selection of exits will decrease for an extended + * period of time to an uncomfortable level .*/ +#define MAX_PREDICTED_CIRCS_RELEVANCE (60*60) + /** Highest allowable value for RendPostPeriod. */ #define MAX_DIR_PERIOD (MIN_ONION_KEY_LIFETIME/2) @@ -2841,6 +2847,13 @@ options_validate(or_options_t *old_options, or_options_t *options, options->RendPostPeriod = MAX_DIR_PERIOD; } + if (options->PredictedCircsRelevanceTime > + MAX_PREDICTED_CIRCS_RELEVANCE) { + log_warn(LD_CONFIG, "PredictedCircsRelevanceTime is too large; " + "clipping to %ds.", MAX_PREDICTED_CIRCS_RELEVANCE); + options->PredictedCircsRelevanceTime = MAX_PREDICTED_CIRCS_RELEVANCE; + } + if (options->Tor2webMode && options->LearnCircuitBuildTimeout) { /* LearnCircuitBuildTimeout and Tor2webMode are incompatible in * two ways: |