summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorteor (Tim Wilson-Brown) <teor2345@gmail.com>2016-02-20 19:28:51 +1100
committerteor (Tim Wilson-Brown) <teor2345@gmail.com>2016-02-20 19:28:51 +1100
commit25543387ede5a4143d9ef4fdff2b34846ca788c6 (patch)
treeea0b41c53286be59873cc36fe1061164ab28423f /src
parent549493846782efa7d6655317844782b6acade1b2 (diff)
downloadtor-25543387ede5a4143d9ef4fdff2b34846ca788c6.tar.gz
tor-25543387ede5a4143d9ef4fdff2b34846ca788c6.zip
Ensure relays must use IPv4, and can use IPv6
A mistake in previous refactoring had relays using IPv4 and IPv6.
Diffstat (limited to 'src')
-rw-r--r--src/or/policies.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/or/policies.c b/src/or/policies.c
index 179230b88a..2c24555e9e 100644
--- a/src/or/policies.c
+++ b/src/or/policies.c
@@ -408,13 +408,12 @@ fascist_firewall_allows_address(const tor_addr_t *addr,
if (tor_addr_family(addr) == AF_INET &&
(!options->ClientUseIPv4 || (pref_only && pref_ipv6)))
return 0;
-
- /* Bridges can always use IPv6 */
- if (tor_addr_family(addr) == AF_INET6 &&
- (!fascist_firewall_use_ipv6(options) || (pref_only && !pref_ipv6)))
- return 0;
}
+ if (tor_addr_family(addr) == AF_INET6 &&
+ (!fascist_firewall_use_ipv6(options) || (pref_only && !pref_ipv6)))
+ return 0;
+
return addr_policy_permits_tor_addr(addr, port,
firewall_policy);
}