mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
Avoid false positives from proxy_mode()
Previously it would erroneously return true if ListenAddr was set for a client port, even if that port itself was 0. This would give false positives, which were not previously harmful... but which were about to become.
This commit is contained in:
parent
b8708b5bd3
commit
6dfc0d5301
@ -1107,10 +1107,10 @@ set_server_advertised(int s)
|
|||||||
int
|
int
|
||||||
proxy_mode(or_options_t *options)
|
proxy_mode(or_options_t *options)
|
||||||
{
|
{
|
||||||
return (options->SocksPort != 0 || options->SocksListenAddress ||
|
return (options->SocksPort != 0 ||
|
||||||
options->TransPort != 0 || options->TransListenAddress ||
|
options->TransPort != 0 ||
|
||||||
options->NATDPort != 0 || options->NATDListenAddress ||
|
options->NATDPort != 0 ||
|
||||||
options->DNSPort != 0 || options->DNSListenAddress);
|
options->DNSPort != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Decide if we're a publishable server. We are a publishable server if:
|
/** Decide if we're a publishable server. We are a publishable server if:
|
||||||
|
Loading…
Reference in New Issue
Block a user