aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2012-03-27 15:00:34 +0200
committerLinus Nordberg <linus@nordberg.se>2012-03-28 22:16:55 +0200
commit734fad410368951e8f375a78bc8789d24cbe9c52 (patch)
tree4ad1bd8fa10e45a018faf358ae6d9a0f0f569b9c /src/common
parent77bc1b803e0d58b23ff48c2359300ef812f10ee1 (diff)
downloadtor-734fad410368951e8f375a78bc8789d24cbe9c52.tar
tor-734fad410368951e8f375a78bc8789d24cbe9c52.tar.gz
Make relays handle an address suggestion from a directory server giving an IPv6 address.
last_guessed_ip becomes a tor_addr_t. Most parts of router_new_address_suggestion() learns about IPv6 (resolve_my_address() is still IPv4 only).
Diffstat (limited to 'src/common')
-rw-r--r--src/common/address.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/address.h b/src/common/address.h
index 4568c32bf..ede035d64 100644
--- a/src/common/address.h
+++ b/src/common/address.h
@@ -38,6 +38,8 @@ typedef struct tor_addr_port_t
uint16_t port;
} tor_addr_port_t;
+#define TOR_ADDR_NULL {AF_UNSPEC, {{0}}};
+
static INLINE const struct in6_addr *tor_addr_to_in6(const tor_addr_t *a);
static INLINE uint32_t tor_addr_to_ipv4n(const tor_addr_t *a);
static INLINE uint32_t tor_addr_to_ipv4h(const tor_addr_t *a);