Changes between Initial Version and Version 8 of Ticket #7961


Ignore:
Timestamp:
Mar 4, 2018, 12:24:27 AM (15 months ago)
Author:
teor
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 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.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7961

    • Property Status changed from new to needs_information
    • Property Points changed from to 3
    • Property Milestone changed from Tor: 0.2.5.x-final to Tor: unspecified
    • Property Keywords ipv6 anticensorship needs-spec refactor added
    • Property Severity changed from to Normal
  • Ticket #7961 – Description

    initial v8  
    22
    33The 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:
    4 https://gitweb.torproject.org/tor.git/blob/ebf30613ea41bbed3340851e839da9b7db4351c5:/src/or/router.c#l1775
     4~~ https://gitweb.torproject.org/tor.git/blob/ebf30613ea41bbed3340851e839da9b7db4351c5:/src/or/router.c#l1775 ~~
     5(wrong commit reference)
    56for IPv6 addresses.
    67