Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #7773

Closed (moved)
Open
Opened Dec 21, 2012 by Trac@tracbot

Relay does not pick the right IP addr of local node

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 (moved))

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.

Trac:
Username: ciaccio

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
Tor: 0.2.4.x-final
Milestone
Tor: 0.2.4.x-final
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#7773