summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorrl1987 <rl1987@sdf.lonestar.org>2013-11-16 18:29:54 +0200
committerNick Mathewson <nickm@torproject.org>2014-02-03 14:20:17 -0500
commit3a4b24c3aba56475822ad94d268b48fd58b74645 (patch)
tree42eeca5141f199b241dd1358431ab04d364adf9b /src/common
parent5991f9a15646d53b838562fd1424b6a8fd9ef614 (diff)
downloadtor-3a4b24c3aba56475822ad94d268b48fd58b74645.tar.gz
tor-3a4b24c3aba56475822ad94d268b48fd58b74645.zip
Removing is_internal_IP() function. Resolves ticket 4645.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/address.c13
-rw-r--r--src/common/address.h1
2 files changed, 0 insertions, 14 deletions
diff --git a/src/common/address.c b/src/common/address.c
index b9f2d93154..0b5bb22806 100644
--- a/src/common/address.c
+++ b/src/common/address.c
@@ -1421,19 +1421,6 @@ get_interface_address6(int severity, sa_family_t family, tor_addr_t *addr)
* XXXX024 IPv6 deprecate some of these.
*/
-/** Return true iff <b>ip</b> (in host order) is an IP reserved to localhost,
- * or reserved for local networks by RFC 1918.
- */
-int
-is_internal_IP(uint32_t ip, int for_listening)
-{
- tor_addr_t myaddr;
- myaddr.family = AF_INET;
- myaddr.addr.in_addr.s_addr = htonl(ip);
-
- return tor_addr_is_internal(&myaddr, for_listening);
-}
-
/** Given an address of the form "ip:port", try to divide it into its
* ip and port portions, setting *<b>address_out</b> to a newly
* allocated string holding the address portion and *<b>port_out</b>
diff --git a/src/common/address.h b/src/common/address.h
index 77e5855346..bdca1f2947 100644
--- a/src/common/address.h
+++ b/src/common/address.h
@@ -214,7 +214,6 @@ int tor_addr_port_parse(int severity, const char *addrport,
int tor_addr_hostname_is_local(const char *name);
/* IPv4 helpers */
-int is_internal_IP(uint32_t ip, int for_listening);
int addr_port_lookup(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,