diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-09-07 11:38:43 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-09-07 11:38:43 -0400 |
commit | 2a3b65179056bdd55382434d610ef3ca89860783 (patch) | |
tree | a60a4ec06889f2f928fd54ba2992a76de1d00942 /src | |
parent | 3823d0aa7d2a3ea4c21610c111aa199f75ace107 (diff) | |
parent | f4ed254652e7f0b56083a49e7afa49beceaa1dda (diff) | |
download | tor-2a3b65179056bdd55382434d610ef3ca89860783.tar.gz tor-2a3b65179056bdd55382434d610ef3ca89860783.zip |
Merge remote-tracking branch 'sebastian/bug20064'
Diffstat (limited to 'src')
-rw-r--r-- | src/or/policies.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/policies.c b/src/or/policies.c index 07f256f5cc..44a46d2fe2 100644 --- a/src/or/policies.c +++ b/src/or/policies.c @@ -2119,8 +2119,10 @@ exit_policy_is_general_exit_helper(smartlist_t *policy, int port) if (subnet_status[i] != 0) continue; /* We already reject some part of this /8 */ tor_addr_from_ipv4h(&addr, i<<24); - if (tor_addr_is_internal(&addr, 0)) + if (tor_addr_is_internal(&addr, 0) && + !get_options()->DirAllowPrivateAddresses) { continue; /* Local or non-routable addresses */ + } if (p->policy_type == ADDR_POLICY_ACCEPT) { if (p->maskbits > 8) continue; /* Narrower than a /8. */ |