Changes in version 0.2.1.9-alpha - 2008-12-2?
- o Major features:
+ o Security fixes:
- Never use a connection with a mismatched address to extend a
- circuit, unless that connections is canonical. A canonical
+ circuit, unless that connection is canonical. A canonical
connection is one whose address is authenticated by the router's
identity key, either in a NETINFO cell or in a router descriptor.
o Minor features (controller):
- New CONSENSUS_ARRIVED event to note when a new consensus has
been fetched and validated.
- - Finally remove deprecated "EXTENDED_FORMAT" feature. It has
- been called EXTENDED_EVENTS since 0.1.2.4-alpha.
- When we realize that another process has modified our cached
descriptors, print out a more useful error message rather than
triggering an assertion. Fixes bug 885. Patch from Karsten.
Bugfix on 0.2.0.18-alpha.
o Deprecated and removed features:
- - RedirectExits has been removed. It was deprecated since 0.2.0.3-alpha.
+ - RedirectExits has been removed. It was deprecated since
+ 0.2.0.3-alpha.
+ - Finally remove deprecated "EXTENDED_FORMAT" controller feature. It
+ has been called EXTENDED_EVENTS since 0.1.2.4-alpha.
- Cell pools are now always enabled; --disable-cell-pools is ignored.
o Code simplifications and refactoring:
} addr;
} tor_addr_t;
-/** Return an IPv4 address in network order for <b>a</b>, or 0 if
- * <b>a</b> is not an IPv4 address. */
+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);
-/** Return an IPv4 address in host order for <b>a</b>, or 0 if
- * <b>a</b> is not an IPv4 address. */
static INLINE uint32_t tor_addr_to_ipv4h(const tor_addr_t *a);
-/* Given an IPv6 address, return its mapped IPv4 address in host order, or
- * 0 if <b>a</b> is not an IPv6 address.
- *
- * (Does not check whether the address is really a mapped address */
static INLINE uint32_t tor_addr_to_mapped_ipv4h(const tor_addr_t *a);
-/** Return the address family of <b>a</b>. Possible values are:
- * AF_INET6, AF_INET, AF_UNSPEC. */
static INLINE sa_family_t tor_addr_family(const tor_addr_t *a);
-/** Return an in_addr* equivalent to <b>a</b>, or NULL if <b>a</b> is not
- * an IPv4 address. */
static INLINE const struct in_addr *tor_addr_to_in(const tor_addr_t *a);
-/** Return an in6_addr* equivalent to <b>a</b>, or NULL if <b>a</b> is not
- * an IPv6 address. */
-static INLINE const struct in6_addr *tor_addr_to_in6(const tor_addr_t *a);
-/** Return true iff <b>a</b> is an IPv4 address equal to the host-ordered
- * address in <b>u</b>. */
static INLINE int tor_addr_eq_ipv4h(const tor_addr_t *a, uint32_t u);
socklen_t tor_addr_to_sockaddr(const tor_addr_t *a, uint16_t port,
uint16_t *port_out);
void tor_addr_make_unspec(tor_addr_t *a);
+/** Return an in6_addr* equivalent to <b>a</b>, or NULL if <b>a</b> is not
+ * an IPv6 address. */
static INLINE const struct in6_addr *
tor_addr_to_in6(const tor_addr_t *a)
{
#define tor_addr_to_in6_addr16(x) S6_ADDR16(*tor_addr_to_in6(x))
#define tor_addr_to_in6_addr32(x) S6_ADDR32(*tor_addr_to_in6(x))
+/** Return an IPv4 address in network order for <b>a</b>, or 0 if
+ * <b>a</b> is not an IPv4 address. */
static INLINE uint32_t
tor_addr_to_ipv4n(const tor_addr_t *a)
{
return a->family == AF_INET ? a->addr.in_addr.s_addr : 0;
}
+/** Return an IPv4 address in host order for <b>a</b>, or 0 if
+ * <b>a</b> is not an IPv4 address. */
static INLINE uint32_t
tor_addr_to_ipv4h(const tor_addr_t *a)
{
return ntohl(tor_addr_to_ipv4n(a));
}
+/* Given an IPv6 address, return its mapped IPv4 address in host order, or
+ * 0 if <b>a</b> is not an IPv6 address.
+ *
+ * (Does not check whether the address is really a mapped address */
static INLINE uint32_t
tor_addr_to_mapped_ipv4h(const tor_addr_t *a)
{
return a->family == AF_INET6 ? ntohl(tor_addr_to_in6_addr32(a)[3]) : 0;
}
+/** Return the address family of <b>a</b>. Possible values are:
+ * AF_INET6, AF_INET, AF_UNSPEC. */
static INLINE sa_family_t
tor_addr_family(const tor_addr_t *a)
{
return a->family;
}
+/** Return an in_addr* equivalent to <b>a</b>, or NULL if <b>a</b> is not
+ * an IPv4 address. */
static INLINE const struct in_addr *
tor_addr_to_in(const tor_addr_t *a)
{
return a->family == AF_INET ? &a->addr.in_addr : NULL;
}
+/** Return true iff <b>a</b> is an IPv4 address equal to the host-ordered
+ * address in <b>u</b>. */
static INLINE int
tor_addr_eq_ipv4h(const tor_addr_t *a, uint32_t u)
{