[tor-bugs] #12138 [Tor]: No IPv6 support when suggesting a bindaddr to a PT
Tor Bug Tracker & Wiki
blackhole at torproject.org
Tue May 27 23:08:37 UTC 2014
#12138: No IPv6 support when suggesting a bindaddr to a PT
-------------------------------+---------------------
Reporter: asn | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: Tor | Version:
Keywords: tor-pt tor-bridge | Actual Points:
Parent ID: | Points:
-------------------------------+---------------------
This recent post in tor-talk:
http://www.marshut.com/iwuqqh/setting-up-an-ipv6-%20supporting-
obfs3-bridge.html
revealed that Tor does not support IPv6 when supporting a bind address to
a pluggable transport. It seems that we missed that during #7011.
The problem is that the first time someone fires up a
`ServerTransportPlugin`, Tor will suggest to it to bind in `0.0.0.0:0`.
This can be seen in `get_stored_bindaddr_for_server_transport`:
https://gitweb.torproject.org/tor.git/blob/2ee56e4c2c841a45418cfb826e1ce6689278382d:/src/or/statefile.c#l517
{{{
no_bindaddr_found:
/** If we didn't find references for this pluggable transport in the
state file, we should instruct the pluggable transport proxy to
listen on INADDR_ANY on a random ephemeral port. */
tor_asprintf(&default_addrport, "%s:%s", fmt_addr32(INADDR_ANY), "0");
return default_addrport;
}}}
Instead of using `fmt_addr32(INADDR_ANY)`, we should use `fmt_addrport`
and suggest `[::]` if we need to use IPv6. We should probably suggest an
IPv6 address, if our ORPort is IPv6 (what if we have both kinds of
ORPorts?).
Implementation of this should not be hard. I can do it one of these days.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/12138>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list