diff options
author | Roger Dingledine <arma@torproject.org> | 2006-10-03 05:45:58 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2006-10-03 05:45:58 +0000 |
commit | 246fecb585cef56af5a0c4bf08365d2d040c3c73 (patch) | |
tree | c3290c2b7254d7ae3525c973c6edfbea2db44488 /src/or/config.c | |
parent | 4c56ac93ca800a6617123f76f52a4c3df90e594c (diff) | |
download | tor-246fecb585cef56af5a0c4bf08365d2d040c3c73.tar.gz tor-246fecb585cef56af5a0c4bf08365d2d040c3c73.zip |
the other half of the is_local_IP patch
svn:r8581
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/config.c b/src/or/config.c index a4c53d4ca0..7b76288306 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -1729,9 +1729,10 @@ is_local_IP(uint32_t ip) { if (is_internal_IP(ip, 0)) return 1; - /* Check whether ip is on the same /24 as we are. - * - * It's possible that this next check will hit before the first time + /* Check whether ip is on the same /24 as we are. */ + if (get_options()->EnforceDistinctSubnets == 0) + return 0; + /* It's possible that this next check will hit before the first time * resolve_my_address actually succeeds. (For clients, it is likely that * resolve_my_address will never be called at all). In those cases, * last_resolved_addr will be 0, and so checking to see whether ip is on the |