aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/policies.c
diff options
context:
space:
mode:
authorNeel Chauhan <neel@neelc.org>2020-02-18 08:20:11 -0800
committerDavid Goulet <dgoulet@torproject.org>2020-03-09 09:33:00 -0400
commit7d673e70b072663e3f9f11819b166846e578251d (patch)
treebee9fffb6773c399f487718c57fdcdc3349a2181 /src/core/or/policies.c
parent17724a7cdeb9b98539831f1164a82784f1fb050f (diff)
downloadtor-7d673e70b072663e3f9f11819b166846e578251d.tar.gz
tor-7d673e70b072663e3f9f11819b166846e578251d.zip
Remove the ClientAutoIPv6ORPort option
Diffstat (limited to 'src/core/or/policies.c')
-rw-r--r--src/core/or/policies.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/core/or/policies.c b/src/core/or/policies.c
index a82995fe12..a13b2e2cb0 100644
--- a/src/core/or/policies.c
+++ b/src/core/or/policies.c
@@ -463,8 +463,7 @@ fascist_firewall_use_ipv6(const or_options_t *options)
* ClientPreferIPv6DirPort is deprecated, but check it anyway. */
return (options->ClientUseIPv6 == 1 || options->ClientUseIPv4 == 0 ||
options->ClientPreferIPv6ORPort == 1 ||
- options->ClientPreferIPv6DirPort == 1 || options->UseBridges == 1 ||
- options->ClientAutoIPv6ORPort == 1);
+ options->ClientPreferIPv6DirPort == 1 || options->UseBridges == 1);
}
/** Do we prefer to connect to IPv6, ignoring ClientPreferIPv6ORPort and
@@ -491,15 +490,6 @@ fascist_firewall_prefer_ipv6_impl(const or_options_t *options)
return -1;
}
-/* Choose whether we prefer IPv4 or IPv6 by randomly choosing an address
- * family. Return 0 for IPv4, and 1 for IPv6. */
-MOCK_IMPL(int,
-fascist_firewall_rand_prefer_ipv6_addr, (void))
-{
- /* TODO: Check for failures, and infer our preference based on this. */
- return crypto_rand_int(2);
-}
-
/** Do we prefer to connect to IPv6 ORPorts?
* Use node_ipv6_or_preferred() whenever possible: it supports bridge client
* per-node IPv6 preferences.
@@ -514,10 +504,7 @@ fascist_firewall_prefer_ipv6_orport(const or_options_t *options)
}
/* We can use both IPv4 and IPv6 - which do we prefer? */
- if (options->ClientAutoIPv6ORPort == 1) {
- /* If ClientAutoIPv6ORPort is 1, we prefer IPv4 or IPv6 at random. */
- return fascist_firewall_rand_prefer_ipv6_addr();
- } else if (options->ClientPreferIPv6ORPort == 1) {
+ if (options->ClientPreferIPv6ORPort == 1) {
return 1;
}