diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-10-02 21:00:35 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-10-02 21:00:35 +0000 |
commit | bff83b666c4c363d8e31051ba309d9290c6170fb (patch) | |
tree | 7eaba77610d242b4bbc3fb4d5700a2385e238ef7 /src/common | |
parent | d75edc35ccddac21717ec2862607b18b91330bd5 (diff) | |
download | tor-bff83b666c4c363d8e31051ba309d9290c6170fb.tar.gz tor-bff83b666c4c363d8e31051ba309d9290c6170fb.zip |
r8846@totoro: nickm | 2006-10-02 16:59:57 -0400
Move is_local_IP to config.c; have it check for same-/24; make it used only for reachability (not for banwidth, because that is probably not what we want). Fixes an XXX.
svn:r8578
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/util.c | 11 | ||||
-rw-r--r-- | src/common/util.h | 1 |
2 files changed, 0 insertions, 12 deletions
diff --git a/src/common/util.c b/src/common/util.c index f7d27bb20a..7e4a35deb0 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -1572,17 +1572,6 @@ is_internal_IP(uint32_t ip, int for_listening) return 0; } -/** Return true iff <b>ip</b> (in host order) is judged to be on the - * same network as us. For now, check if it's an internal IP. - * - * XXX Also check if it's on the same class C network as our public IP. - */ -int -is_local_IP(uint32_t ip) -{ - return is_internal_IP(ip, 0); -} - /** Parse a string of the form "host[:port]" from <b>addrport</b>. If * <b>address</b> is provided, set *<b>address</b> to a copy of the * host portion of the string. If <b>addr</b> is provided, try to diff --git a/src/common/util.h b/src/common/util.h index b09b90cd10..082e9db51a 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -188,7 +188,6 @@ int path_is_relative(const char *filename) ATTR_PURE; /* Net helpers */ int is_internal_IP(uint32_t ip, int for_listening) ATTR_PURE; -int is_local_IP(uint32_t ip) ATTR_PURE; int parse_addr_port(int severity, const char *addrport, char **address, uint32_t *addr, uint16_t *port_out); int parse_port_range(const char *port, uint16_t *port_min_out, |