[tor-bugs] #3786 [Tor Relay]: Make clients and bridges use their IPv6 address

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Sat Nov 19 22:39:20 UTC 2011


#3786: Make clients and bridges use their IPv6 address
-----------------------+----------------------------------------------------
 Reporter:  ln5        |          Owner:  ln5               
     Type:  task       |         Status:  accepted          
 Priority:  normal     |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Relay  |        Version:                    
 Keywords:             |         Parent:  #3563             
   Points:             |   Actualpoints:                    
-----------------------+----------------------------------------------------

Comment(by ln5):

 Branch bug3786_hacking contains something that works for several cases but
 not all, see below.

 On the client side, we no longer depend on a config option but instead
 marks the routerinfo_t of a bridge with an ipv6_preferred flag when we
 find that an IPv6 address has been configured for the corresponding
 bridge.  Since we turn the flag off when we find that an Ipv4 address has
 been configured, the state of the flag is dependent on the order of the
 configuration entries but I think that's good enough.

 On the bridge side, we prefer an IPv4 port over an IPv6 port (unless
 BRIDGE_PREFERS_IPV6 is defined at compile time) but use the IPv6 if
 there's no IPv4 present.

 I'd like nickm to take a look at this with an eye on design flaws and
 missing pieces.  Comments on code quality shortcomings are of course
 welcome too.  I'm unsure how it should be packaged though.  This branch is
 a bit hackish, with later commits changing code from earlier commits.
 Would it be better with another branch (bug3786 f.ex.) with fewer commits,
 each with a clear goal?

 Successfully tested:
 - v4 client using a v4+v6 bridge
 - v6 client using a v6 bridge
 - v4+v6 client using a v4+v6 bridge
 - v4 client using two v4 bridges
 - v4 client using three v4 bridges
 - v4+v6 client using one v4 bridge and one v6 bridge
 - v4+v6 client using a v4 bridge

 Not working:
 - v4+v6 client using a v6 bridge

 The last test case fails because the v4 connection fails and the v6
 address is never tried.  If entry_guard_register_connect_status()
 could flip the ipv6_preferred bit in the bridges routerinfo_t, that'd
 probably help.  I can't see how we could find the routerinfo_t from
 there though.

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


More information about the tor-bugs mailing list