All circuits are predictive; it's the ports that are expiring here.
o Minor features:
- Made PREDICTED_CIRCS_RELEVANCE_TIME configurable from config
- file. Implements ticket #9176. Patch by unixninja92.
+ file with a new option, PredictedPortsRelevanceTime. Implements
+ ticket #9176. Patch by unixninja92.
following the Tor specification. Otherwise, they are logged with severity
\'info'. (Default: 0)
-[[PredictedCircsRelevanceTime]] **PredictedCircsRelevanceTime** __NUM__::
+[[PredictedPortsRelevanceTime]] **PredictedPortsRelevanceTime** __NUM__::
Set how long, after the client has mad an anonymized connection to a
given port, we will try to make sure that we build circuits to
exits that support that port. The maximum value for this option is 1
V(NATDListenAddress, LINELIST, NULL),
VPORT(NATDPort, LINELIST, NULL),
V(Nickname, STRING, NULL),
- V(PredictedCircsRelevanceTime, INTERVAL, "1 hour"),
+ V(PredictedPortsRelevanceTime, INTERVAL, "1 hour"),
V(WarnUnsafeSocks, BOOL, "1"),
OBSOLETE("NoPublish"),
VAR("NodeFamily", LINELIST, NodeFamilies, NULL),
* services can overload the directory system. */
#define MIN_REND_POST_PERIOD (10*60)
-/** Higest allowable value for PredictedCircsRelevanceTime; if this is
+/** Higest allowable value for PredictedPortsRelevanceTime; 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)
options->RendPostPeriod = MAX_DIR_PERIOD;
}
- if (options->PredictedCircsRelevanceTime >
+ if (options->PredictedPortsRelevanceTime >
MAX_PREDICTED_CIRCS_RELEVANCE) {
- log_warn(LD_CONFIG, "PredictedCircsRelevanceTime is too large; "
+ log_warn(LD_CONFIG, "PredictedPortsRelevanceTime is too large; "
"clipping to %ds.", MAX_PREDICTED_CIRCS_RELEVANCE);
- options->PredictedCircsRelevanceTime = MAX_PREDICTED_CIRCS_RELEVANCE;
+ options->PredictedPortsRelevanceTime = MAX_PREDICTED_CIRCS_RELEVANCE;
}
if (options->Tor2webMode && options->LearnCircuitBuildTimeout) {
* a new one? */
int MaxCircuitDirtiness; /**< Never use circs that were first used more than
this interval ago. */
- int PredictedCircsRelevanceTime; /** How long after we've requested a
+ int PredictedPortsRelevanceTime; /** How long after we've requested a
* connection for a given port, do we want
* to continue to pick exits that support
* that port? */
int predicted_circs_relevance_time;
smartlist_t *out = smartlist_new();
tor_assert(predicted_ports_list);
- predicted_circs_relevance_time = get_options()->PredictedCircsRelevanceTime;
+ predicted_circs_relevance_time = get_options()->PredictedPortsRelevanceTime;
/* clean out obsolete entries */
SMARTLIST_FOREACH_BEGIN(predicted_ports_list, predicted_port_t *, pp) {
int *need_capacity)
{
int predicted_circs_relevance_time;
- predicted_circs_relevance_time = get_options()->PredictedCircsRelevanceTime;
+ predicted_circs_relevance_time = get_options()->PredictedPortsRelevanceTime;
if (!predicted_internal_time) { /* initialize it */
predicted_internal_time = now;
any_predicted_circuits(time_t now)
{
int predicted_circs_relevance_time;
- predicted_circs_relevance_time = get_options()->PredictedCircsRelevanceTime;
+ predicted_circs_relevance_time = get_options()->PredictedPortsRelevanceTime;
return smartlist_len(predicted_ports_list) ||
predicted_internal_time + predicted_circs_relevance_time >= now;