diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-10-12 11:34:54 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-10-12 11:34:54 -0400 |
commit | 8586611718ee9c4cc81eb8fe50c937619393ade6 (patch) | |
tree | 3d9fce44c28899ffbeeaf93b6bf627f4ea6f0b20 /src/common/address.h | |
parent | 9c605ecb7eeb62823dcb2042a5fbfde835f98618 (diff) | |
download | tor-8586611718ee9c4cc81eb8fe50c937619393ade6.tar.gz tor-8586611718ee9c4cc81eb8fe50c937619393ade6.zip |
Make tor_addr_is_internal log the calling function on error
This might make it a little easier to track down bug 7086.
Diffstat (limited to 'src/common/address.h')
-rw-r--r-- | src/common/address.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/address.h b/src/common/address.h index 68775fb291..9e7d750126 100644 --- a/src/common/address.h +++ b/src/common/address.h @@ -168,7 +168,10 @@ int tor_addr_compare_masked(const tor_addr_t *addr1, const tor_addr_t *addr2, unsigned int tor_addr_hash(const tor_addr_t *addr); int tor_addr_is_v4(const tor_addr_t *addr); -int tor_addr_is_internal(const tor_addr_t *ip, int for_listening); +int tor_addr_is_internal_(const tor_addr_t *ip, int for_listening, + const char *filename, int lineno); +#define tor_addr_is_internal(addr, for_listening) \ + tor_addr_is_internal_((addr), (for_listening), _SHORT_FILE_, __LINE__) /** Longest length that can be required for a reverse lookup name. */ /* 32 nybbles, 32 dots, 8 characters of "ip6.arpa", 1 NUL: 73 characters. */ |