From 2debcc869fa6672d85b238a03ab0988ac74547e4 Mon Sep 17 00:00:00 2001 From: teor Date: Fri, 16 Dec 2016 22:43:46 +1100 Subject: [PATCH] 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 --- src/or/policies.c | 6 ++---- 1 file 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