Opened 8 years ago

Closed 7 years ago

Last modified 2 years ago

#7773 closed defect (duplicate)

Relay does not pick the right IP addr of local node

Reported by: ciaccio Owned by: andrea
Priority: Medium Milestone: Tor: 0.2.4.x-final
Component: Core Tor/Tor Version: Tor:
Severity: Normal Keywords: multihomed tor-relay 024-deferrable
Cc: Actual Points:
Parent ID: #5298 Points:
Reviewer: Sponsor:


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 (unconnected actually) instead of ppp0 (the one in real use).

This problem probably affects all releases. One year ago I raised another bug ticket on this very same defect (see #5298)

The defect originates by the following two bugs:

src/or/config.c:resolve_my_address(), a rather messy (really badly written, to be honest) piece of code which mistakenly resolves via hostname rather than picking the IP address based on the network interface actually in use. I had to rewrite that function almost from scratch, and now it works.

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 actually in use or not (on my laptop it always chooses eth0, even if I'm using ppp0). Solved by disabling the list of net devices, thus falling back to the default "discovery" mechanism.

I have patches, if needed.

Child Tickets

Change History (6)

comment:1 Changed 8 years ago by ciaccio

Cc: giuseppe.ciaccio@… added

comment:2 Changed 8 years ago by ciaccio

Cc: giuseppe.ciaccio@… removed

comment:3 Changed 7 years ago by nickm

Keywords: 024-deferrable added
Owner: set to andrea
Status: newassigned

comment:4 Changed 7 years ago by nickm

Resolution: duplicate
Status: assignedclosed

This appears to be a duplicate of #5298 .

comment:5 Changed 2 years ago by teor

Parent ID: #17782
Severity: Blocker

comment:6 Changed 2 years ago by teor

Parent ID: #17782#5298
Severity: BlockerNormal
Note: See TracTickets for help on using tickets.