[tor-bugs] #5298 [Tor Relay]: Relay does not pick the right IP addr of local node

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Fri Mar 2 20:00:37 UTC 2012


#5298: Relay does not pick the right IP addr of local node
----------------------------------+-----------------------------------------
 Reporter:  ciaccio               |          Owner:                     
     Type:  defect                |         Status:  new                
 Priority:  normal                |      Milestone:                     
Component:  Tor Relay             |        Version:  Tor: 0.2.3.12-alpha
 Keywords:  multihomed, ppp0, 3G  |         Parent:                     
   Points:                        |   Actualpoints:                     
----------------------------------+-----------------------------------------
 My laptop has two network interfaces: eth0, statically configured, in use
 when I'm wired in my office; and ppp0, dynamically configured, when I'm
 abroad and use a 3G wireless interface.

 When I'm on eth0 (LAN), the tor relay works regularly.
 When I'm on the ppp0 (3G wireless), the tor relay works too but the ORPort
 and DirPort are not reachable from the outside, because the relay still
 picks the IP address associated to eth0 instead of ppp0.

 This problem affects both on the stable release (0.2.2.35) and the latest
 git snapshot (and probably many other releases).

 With the stable release, I've tracked the bug down to
 src/or/config.c:resolve_my_address(), a rather messy piece of code which
 mistakenly resolves via hostname rather than picking the IP address based
 on the actual route default.  I had to rewrite that function almost from
 scratch, and now it works.

 With the latest snapshot, same problem in
 src/or/config.c:resolve_my_address(), plus another issue in
 src/common/address.c:get_interface_address6(): here a list of all net
 devices available is built, but then the first valid one is picked,
 regardless of it being the one in use or not (on my laptop it always
 chooses eth0).  Solved by disabling the list of net devices, thus falling
 back to the default "discovery" mechanism (the only one implemented in the
 stable release).

 I have patches, if needed.

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


More information about the tor-bugs mailing list