aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorKarsten Loesing <karsten.loesing@gmx.net>2013-05-24 12:01:32 +0200
committerKarsten Loesing <karsten.loesing@gmx.net>2013-05-25 19:51:38 +0200
commit2f893624abb65a0df4f0f8ca6fbbe0c00fbf216a (patch)
tree6878bf260ef828ab871d6bb8a30f6d057dda6b9c /src/or/config.c
parenta84fae789206db4e27486e693488328da7b3474a (diff)
downloadtor-2f893624abb65a0df4f0f8ca6fbbe0c00fbf216a.tar
tor-2f893624abb65a0df4f0f8ca6fbbe0c00fbf216a.tar.gz
Tweak CONN_BW event based on comments by nickm.
- Rename read/write counters in connection_t to make it clear that these are only used for CONN_BW events. - Add TestingEnableConnBwEvent option.
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 8ca89b6a7..e7060a5dc 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -218,6 +218,7 @@ static config_var_t option_vars_[] = {
VPORT(DNSPort, LINELIST, NULL),
V(DNSListenAddress, LINELIST, NULL),
V(DownloadExtraInfo, BOOL, "0"),
+ V(TestingEnableConnBwEvent, BOOL, "0"),
V(EnforceDistinctSubnets, BOOL, "1"),
V(EntryNodes, ROUTERSET, NULL),
V(EntryStatistics, BOOL, "0"),
@@ -461,6 +462,7 @@ static const config_var_t testing_tor_network_defaults[] = {
V(TestingAuthDirTimeToLearnReachability, INTERVAL, "0 minutes"),
V(TestingEstimatedDescriptorPropagationTime, INTERVAL, "0 minutes"),
V(MinUptimeHidServDirectoryV2, INTERVAL, "0 minutes"),
+ V(TestingEnableConnBwEvent, BOOL, "1"),
VAR("___UsingTestNetworkDefaults", BOOL, UsingTestNetworkDefaults_, "1"),
{ NULL, CONFIG_TYPE_OBSOLETE, 0, NULL }
@@ -3236,6 +3238,12 @@ options_validate(or_options_t *old_options, or_options_t *options,
COMPLAIN("TestingEstimatedDescriptorPropagationTime is insanely high.");
}
+ if (options->TestingEnableConnBwEvent &&
+ !options->TestingTorNetwork && !options->UsingTestNetworkDefaults_) {
+ REJECT("TestingEnableConnBwEvent may only be changed in testing "
+ "Tor networks!");
+ }
+
if (options->TestingTorNetwork) {
log_warn(LD_CONFIG, "TestingTorNetwork is set. This will make your node "
"almost unusable in the public Tor network, and is "