diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-09-10 10:09:29 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-09-10 10:09:29 -0400 |
commit | 344bb1d64c539ca66cd377350065e9486397d1eb (patch) | |
tree | 1a92d101baa885120fbee613db48df8c56fe4289 | |
parent | e1e34ee4e409b044eed3164a20f388a2d3580fd6 (diff) | |
parent | 20e0e7d9d128af80c1af3b8b83214236387ba88f (diff) | |
download | tor-344bb1d64c539ca66cd377350065e9486397d1eb.tar tor-344bb1d64c539ca66cd377350065e9486397d1eb.tar.gz |
Merge branch 'bug3155'
-rw-r--r-- | changes/bug3155 | 6 | ||||
-rw-r--r-- | src/or/config.c | 10 | ||||
-rw-r--r-- | src/or/connection_or.c | 2 | ||||
-rw-r--r-- | src/or/or.h | 4 |
4 files changed, 16 insertions, 6 deletions
diff --git a/changes/bug3155 b/changes/bug3155 new file mode 100644 index 000000000..d2e0918d2 --- /dev/null +++ b/changes/bug3155 @@ -0,0 +1,6 @@ + o Minor bugfixes: + - Rename the (internal-use-only) UsingTestingNetworkDefaults option + to start with a triple-underscore so the controller won't touch it. + Patch by Meejah. Fixes bug 3155. Bugfix on 0.2.2.23-alpha. + - Rename the (testing-use-only) _UseFilteringSSLBufferevents option + so it doesn't start with _. Fixes bug3155. Bugfix on 0.2.3.1-alpha. diff --git a/src/or/config.c b/src/or/config.c index 61fd99342..f38e6863b 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -130,6 +130,7 @@ static config_abbrev_t _option_abbrevs[] = { { "HashedControlPassword", "__HashedControlSessionPassword", 1, 0}, { "StrictEntryNodes", "StrictNodes", 0, 1}, { "StrictExitNodes", "StrictNodes", 0, 1}, + { "_UseFilteringSSLBufferevents", "UseFilteringSSLBufferevents", 0, 1}, { NULL, NULL, 0, 0}, }; @@ -449,7 +450,7 @@ static config_var_t _option_vars[] = { VAR("VersioningAuthoritativeDirectory",BOOL,VersioningAuthoritativeDir, "0"), V(VirtualAddrNetwork, STRING, "127.192.0.0/10"), V(WarnPlaintextPorts, CSV, "23,109,110,143"), - V(_UseFilteringSSLBufferevents, BOOL, "0"), + V(UseFilteringSSLBufferevents, BOOL, "0"), VAR("__ReloadTorrcOnSIGHUP", BOOL, ReloadTorrcOnSIGHUP, "1"), VAR("__AllDirActionsPrivate", BOOL, AllDirActionsPrivate, "0"), VAR("__DisablePredictedCircuits",BOOL,DisablePredictedCircuits, "0"), @@ -459,7 +460,7 @@ static config_var_t _option_vars[] = { VAR("__OwningControllerProcess",STRING,OwningControllerProcess, NULL), V(MinUptimeHidServDirectoryV2, INTERVAL, "25 hours"), V(VoteOnHidServDirectoriesV2, BOOL, "1"), - V(_UsingTestNetworkDefaults, BOOL, "0"), + VAR("___UsingTestNetworkDefaults", BOOL, _UsingTestNetworkDefaults, "0"), { NULL, CONFIG_TYPE_OBSOLETE, 0, NULL } }; @@ -487,7 +488,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(_UsingTestNetworkDefaults, BOOL, "1"), + VAR("___UsingTestNetworkDefaults", BOOL, _UsingTestNetworkDefaults, "1"), { NULL, CONFIG_TYPE_OBSOLETE, 0, NULL } }; @@ -7307,6 +7308,9 @@ getinfo_helper_config(control_connection_t *conn, for (i = 0; _option_vars[i].name; ++i) { const config_var_t *var = &_option_vars[i]; const char *type; + /* don't tell controller about triple-underscore options */ + if (!strncmp(_option_vars[i].name, "___", 3)) + continue; switch (var->type) { case CONFIG_TYPE_STRING: type = "String"; break; case CONFIG_TYPE_FILENAME: type = "Filename"; break; diff --git a/src/or/connection_or.c b/src/or/connection_or.c index 5a3b6205a..02345f98a 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -1152,7 +1152,7 @@ connection_tls_start_handshake(or_connection_t *conn, int receiving) #ifdef USE_BUFFEREVENTS if (connection_type_uses_bufferevent(TO_CONN(conn))) { - const int filtering = get_options()->_UseFilteringSSLBufferevents; + const int filtering = get_options()->UseFilteringSSLBufferevents; struct bufferevent *b = tor_tls_init_bufferevent(conn->tls, conn->_base.bufev, conn->_base.s, receiving, filtering); diff --git a/src/or/or.h b/src/or/or.h index 3609d32b7..ec27184c1 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -3578,8 +3578,8 @@ typedef struct { /** If true, do not enable IOCP on windows with bufferevents, even if * we think we could. */ int DisableIOCP; - /** For testing only: will go away in 0.2.3.x. */ - int _UseFilteringSSLBufferevents; + /** For testing only: will go away eventually. */ + int UseFilteringSSLBufferevents; /** Set to true if the TestingTorNetwork configuration option is set. * This is used so that options_validate() has a chance to realize that |