diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-05-16 11:10:09 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-05-16 11:10:09 -0400 |
commit | a925fc918975fd62581d438eec0dc8a1d53ce127 (patch) | |
tree | b212cfbe77ccfcbeb0746d755c3725b923c0e459 /src/common/address.c | |
parent | a3046fd5e576bc7294374a8bbab1a80cd3fb3524 (diff) | |
parent | 433d7578465e04484d537810096512b5cc61246f (diff) | |
download | tor-a925fc918975fd62581d438eec0dc8a1d53ce127.tar.gz tor-a925fc918975fd62581d438eec0dc8a1d53ce127.zip |
Merge remote-tracking branch 'public/bug2822'
Diffstat (limited to 'src/common/address.c')
-rw-r--r-- | src/common/address.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common/address.c b/src/common/address.c index 7f78d1e4d3..e444ef1934 100644 --- a/src/common/address.c +++ b/src/common/address.c @@ -1687,3 +1687,12 @@ get_interface_address(int severity, uint32_t *addr) return r; } +/** Return true if we can tell that <b>name</b> is a canonical name for the + * loopback address. */ +int +tor_addr_hostname_is_local(const char *name) +{ + return !strcasecmp(name, "localhost") || + !strcasecmp(name, "local") || + !strcasecmpend(name, ".local"); +} |