aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2016-08-20 04:36:37 +0000
committerAndrea Shepard <andrea@torproject.org>2016-08-20 04:36:37 +0000
commit31028af4404c06088ea1eb47309ce8c3154150f1 (patch)
tree078321394a33d1da1cf737ca67631e0c04e241f4 /src
parent3efe92ba58137022dd6c61cff9823813218a1a14 (diff)
downloadtor-31028af4404c06088ea1eb47309ce8c3154150f1.tar.gz
tor-31028af4404c06088ea1eb47309ce8c3154150f1.zip
Add DisableOOSCheck option, on by default until we have better heuristics
Diffstat (limited to 'src')
-rw-r--r--src/or/config.c1
-rw-r--r--src/or/connection.c5
-rw-r--r--src/or/or.h3
3 files changed, 9 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 4831bad07a..df85bc3534 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -211,6 +211,7 @@ static config_var_t option_vars_[] = {
V(CountPrivateBandwidth, BOOL, "0"),
V(DataDirectory, FILENAME, NULL),
V(DataDirectoryGroupReadable, BOOL, "0"),
+ V(DisableOOSCheck, BOOL, "1"),
V(DisableNetwork, BOOL, "0"),
V(DirAllowPrivateAddresses, BOOL, "0"),
V(TestingAuthDirTimeToLearnReachability, INTERVAL, "30 minutes"),
diff --git a/src/or/connection.c b/src/or/connection.c
index 6b85bfb550..daa11eeb57 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -4673,6 +4673,11 @@ connection_check_oos(int n_socks, int failed)
int target_n_socks = 0, moribund_socks, socks_to_kill;
smartlist_t *conns;
+ /* Early exit: is OOS checking disabled? */
+ if (get_options()->DisableOOSCheck) {
+ return;
+ }
+
/* Sanity-check args */
tor_assert(n_socks >= 0);
diff --git a/src/or/or.h b/src/or/or.h
index 262085ea62..7eaeac8ecd 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -4458,6 +4458,9 @@ typedef struct {
* participate in the protocol. If on (default), a flag is added to the
* vote indicating participation. */
int AuthDirSharedRandomness;
+
+ /** If 1, we skip all OOS checks. */
+ int DisableOOSCheck;
} or_options_t;
/** Persistent state for an onion router, as saved to disk. */