summaryrefslogtreecommitdiff
path: root/src/or/policies.c
diff options
context:
space:
mode:
authorteor <teor2345@gmail.com>2016-12-16 22:43:46 +1100
committerNick Mathewson <nickm@torproject.org>2017-01-13 16:49:33 -0500
commit2debcc869fa6672d85b238a03ab0988ac74547e4 (patch)
tree45e6719cab97a4882bd3252d92f67dfae991820a /src/or/policies.c
parent0417dae5808ddf86aed3a9b9a6883fa8f0922d2e (diff)
downloadtor-2debcc869fa6672d85b238a03ab0988ac74547e4.tar.gz
tor-2debcc869fa6672d85b238a03ab0988ac74547e4.zip
Remove redundant boolean expression from firewall_is_fascist_impl()
Let A = UseBridges Let B = ClientUseIPv4 Then firewall_is_fascist_impl expands and simplifies to: B || (!(A || ...) && A) B || (!A && ... && A) B || 0 B
Diffstat (limited to 'src/or/policies.c')
-rw-r--r--src/or/policies.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/or/policies.c b/src/or/policies.c
index ac57e7209f..84600f7ef8 100644
--- a/src/or/policies.c
+++ b/src/or/policies.c
@@ -317,10 +317,8 @@ firewall_is_fascist_impl(void)
const or_options_t *options = get_options();
/* Assume every non-bridge relay has an IPv4 address.
* Clients which use bridges may only know the IPv6 address of their
- * bridge. */
- return (options->ClientUseIPv4 == 0
- || (!fascist_firewall_use_ipv6(options)
- && options->UseBridges == 1));
+ * bridge, but they will connect regardless of the ClientUseIPv6 setting. */
+ return options->ClientUseIPv4 == 0;
}
/** Return true iff the firewall options, including ClientUseIPv4 0 and