mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
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
This commit is contained in:
parent
0417dae580
commit
2debcc869f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user