[tor-bugs] #7961 [Core Tor/Tor]: Publish transports that bind on IPv6 addresses

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Mar 4 00:24:27 UTC 2018


#7961: Publish transports that bind on IPv6 addresses
-------------------------------------------------+-------------------------
 Reporter:  asn                                  |          Owner:  (none)
     Type:  defect                               |         Status:
                                                 |  needs_information
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  unspecified
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  tor-bridge, pt, ipv6 anticensorship  |  Actual Points:
  needs-spec refactor                            |
Parent ID:                                       |         Points:  3
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------
Changes (by teor):

 * keywords:  tor-bridge, pt, ipv6 anticensorship needs-spec refactor easy
     => tor-bridge, pt, ipv6 anticensorship needs-spec refactor
 * status:  new => needs_information


Old description:

> Currently, `pt_get_extra_info_descriptor_string()` uses
> `router_pick_published_address()` to retrieve our external IP address so
> that it can write it in our extra-info descriptor along with the TCP port
> that our transport listens on.
>
> The bad news are that `router_pick_published_address()` only returns IPv4
> addresses, and we will probably have to refactor it, or do something like
> this:
> https://gitweb.torproject.org/tor.git/blob/ebf30613ea41bbed3340851e839da9b7db4351c5:/src/or/router.c#l1775
> for IPv6 addresses.
>
> Not sure if this can get in 0.2.4.x. I guess it depends on how quickly we
> implement it, and how complex the changes are going to be.

New description:

 Currently, `pt_get_extra_info_descriptor_string()` uses
 `router_pick_published_address()` to retrieve our external IP address so
 that it can write it in our extra-info descriptor along with the TCP port
 that our transport listens on.

 The bad news are that `router_pick_published_address()` only returns IPv4
 addresses, and we will probably have to refactor it, or do something like
 this:
 ~~
 https://gitweb.torproject.org/tor.git/blob/ebf30613ea41bbed3340851e839da9b7db4351c5:/src/or/router.c#l1775
 ~~
 (wrong commit reference)
 for IPv6 addresses.

 Not sure if this can get in 0.2.4.x. I guess it depends on how quickly we
 implement it, and how complex the changes are going to be.

--

Comment:

 This is not an easy patch.

 Since you've posted implementation questions on two different tickets, I'm
 going to leave you to answer some of the detailed pluggable transport
 questions on this ticket.

 There are four cases in pt_get_extra_info_descriptor_string():
 1. the pluggable transport has told us it is listening on a specific IPv4
 address
   * this case is already handled correctly
 2. the pluggable transport has told us it is listening on a specific IPv6
 address
   * this case is handled correctly for transports that are IPv6-only
   * one address is used for transports that are dual-stack, but which one?
   * do any current pluggable transports (PTs) supply their specific IPv6
 address?
   * what do transports with an IPv4 and an IPv6 address do?
   * how does Tor handle what they do?
     * transport_t only has one address/port field, so dual stack
 transports are not supported
 3. the pluggable transport has told us it is listening on all IPv4
 addresses
   * this case is already handled correctly
 4. the pluggable transport has told us it is listening on all IPv6
 addresses
   * do any current pluggable transports (PTs) say they are listening on
 all IPv6 addresses?
   * how do we distinguish between IPv4 only, IPv4/IPv6 and IPv6 only
 transports?
     * what do transports with an IPv4 and an IPv6 address do?
       * do they give the address as `0.0.0.0`, `::`, or `[::]`?
     * how does Tor handle what they do?
       * transport_t only has one address/port field, so dual-stack
 transports may be ambiguous or not supported
     * what do transports with an IPv6 address do?
       * do they give the address as `0.0.0.0`, `::`, or `[::]`?
     * how does Tor handle what they do?
       * Tor assumes that all null addresses are IPv4

 You can focus on PTs supported by Tor Browser and BridgeDB (obfs3 and
 obfs4, both implemented by https://gitweb.torproject.org/pluggable-
 transports/obfs4.git/ ).

 Replying to [comment:7 fristonio]:
 > I would like to work on this. Do I need to create a wrapper around
 `router_pick_published_address()` which will take family as an argument
 and return the address as IPv4 or IPv6 accordingly, if it exists and
 return -1 otherwise?

 Once you've answered the questions for case 4, you'll know if you need to
 do this or not.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7961#comment:8>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list