[tor-commits] [tor/master] Ensure relays must use IPv4, and can use IPv6
nickm at torproject.org
nickm at torproject.org
Tue Feb 23 12:38:37 UTC 2016
commit 25543387ede5a4143d9ef4fdff2b34846ca788c6
Author: teor (Tim Wilson-Brown) <teor2345 at gmail.com>
Date: Sat Feb 20 19:28:51 2016 +1100
Ensure relays must use IPv4, and can use IPv6
A mistake in previous refactoring had relays using IPv4 and IPv6.
---
src/or/policies.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/or/policies.c b/src/or/policies.c
index 179230b..2c24555 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);
}
More information about the tor-commits
mailing list