Tor Ipv6-Patch

Marcus Wolschon - Wolschon Softwaredesign Marcus at
Tue Dec 4 08:23:25 UTC 2007

Hash: SHA1

Hello Nick,

Nick Mathewson schrieb:
>  - You're right that the preferred way to store addresses that could be
>    either IPv4 or IPv6 is indeed with tor_addr_t.  (Thanks for the
>    reminder, BTW: I fixed tor_addr_t to be a tagged union of in_addr and
>    in6_addr, not of sockaddr_in and sockaddr_in6.)

do you want to do the refactoring to use tor_address_t or shall I?
So we need a pair of tor_address_t and int socket_family. Wouldn't it
be better to have the socket_family in a struct with the tor_address_t
- -union? That way it would probably be a drop-in -replacement for the

>  - Generally speaking, we try to avoid duplicated "cut and paste" code;
>    it makes it hard to be sure that we can update all instances of the
>    original code path.  (connection_or_init_conn_from_address6, for
>    example, is almost exactly the same as the existing
>    connection_init_conn_from_address.)

I tried to do if-then where it would not double the size of
the method. With tor_address_t this will probably be needed in
far less places.

>  - For example, this patch includes
>    lots of log cleanups that make the logs say "hidden service" instead
>    of "service".  That's a cleanup, and that can go into 0.2.0.x on its
>    own, but it doesn't seem to be dependent much on the rest of the
>    patch.

Yes, I changed that log-lined during debugging, so I could easily grep
in the debug-log while it scrolls by.

>  Also, the different functional changes could probably be
>    separated.

The ipv6-socks-listen is just a few lines (since it already does
ipv4+AF_UNIX) and depends on the infrastructure the ipv6-hidden-
services need.

Is there already a spec for the changes to the protocoll needed to
fully support ipv6?
* determining if a node has ipv6-connectivity (not just ipv6-support
  in the ip-stack)
* asking directory-servers with a bitmask or similar of the
  socket-families you support
* adressing nodes that have multiple (types of) addresses. (probably
  can be ignored and theated as 2 nodes for quite a while)
* changing the protocoll to have a socket-family and space for larger


- --
 Marcus Wolschon
 Wolschon Softwaredesign und Beratung
 UStID: DE238951181
 Marcus at
 +49 177/6272871 (m-a-r-c-u-s-1)
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


More information about the tor-dev mailing list