Merge branch 'tor-gitlab/mr/47'

This commit is contained in:
David Goulet
2020-07-14 10:36:30 -04:00
56 changed files with 649 additions and 819 deletions
+9
View File
@@ -764,6 +764,15 @@ tor_addr_is_v4(const tor_addr_t *addr)
return 0; /* Not IPv4 - unknown family or a full-blood IPv6 address */
}
/** Determine whether an address <b>addr</b> is an IPv6 (AF_INET6). Return
* true if so else false. */
int
tor_addr_is_v6(const tor_addr_t *addr)
{
tor_assert(addr);
return (tor_addr_family(addr) == AF_INET6);
}
/** Determine whether an address <b>addr</b> is null, either all zeroes or
* belonging to family AF_UNSPEC.
*/
+1
View File
@@ -284,6 +284,7 @@ struct sipkey;
uint64_t tor_addr_keyed_hash(const struct sipkey *key, const tor_addr_t *addr);
int tor_addr_is_v4(const tor_addr_t *addr);
int tor_addr_is_v6(const tor_addr_t *addr);
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) \