[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #7773 [Tor]: Relay does not pick the right IP addr of local node
#7773: Relay does not pick the right IP addr of local node
----------------------------------+-----------------------------------------
Reporter: ciaccio | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Tor: 0.2.4.x-final
Component: Tor | Version: Tor: 0.2.4.6-alpha
Keywords: multihomed tor-relay | 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 (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.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/7773>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs