diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-04-28 17:45:41 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-04-28 18:11:58 -0400 |
commit | 6dfc0d530113e055d91b68969c81595ddc749f07 (patch) | |
tree | c994c70839c8667284eab875f96b101ae04cff59 /src/or | |
parent | b8708b5bd30f5ef6dd34f7199a5588627486bcd2 (diff) | |
download | tor-6dfc0d530113e055d91b68969c81595ddc749f07.tar tor-6dfc0d530113e055d91b68969c81595ddc749f07.tar.gz |
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.
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/router.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/router.c b/src/or/router.c index 0ef4728a0..65afd49f7 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -1107,10 +1107,10 @@ set_server_advertised(int s) int proxy_mode(or_options_t *options) { - return (options->SocksPort != 0 || options->SocksListenAddress || - options->TransPort != 0 || options->TransListenAddress || - options->NATDPort != 0 || options->NATDListenAddress || - options->DNSPort != 0 || options->DNSListenAddress); + return (options->SocksPort != 0 || + options->TransPort != 0 || + options->NATDPort != 0 || + options->DNSPort != 0); } /** Decide if we're a publishable server. We are a publishable server if: |