Opened 2 weeks ago

Last modified 5 days ago

#32888 assigned enhancement

Log address config info when tor starts up

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: 0.4.3.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: ipv6, network-team-roadmap-?
Cc: Actual Points:
Parent ID: #24403 Points: 1
Reviewer: Sponsor:

Description (last modified by teor)

We're going to be modifying tor's address detection and reachability code for an upcoming sponsor. To help us debug, we should log the following info when tor starts up:

IPv4:

  • the Address torrc option
    • and whether it is an IP address, or a DNS name
  • the local hostname
    • and whether it is an IP address, or a DNS name
  • the local network interface addresses

See resolve_my_address() for details.

IPv6:

  • the IPv6 address of the first IPv6 ORPort torrc option

See router_build_fresh_descriptor() and router_get_advertised_ipv6_or_ap() (in #32588) for details.

When (or if) we use them as part of address detection, we should also log the following info:

IPv4 and IPv6:

  • the Address torrc option
    • and whether it is an IP address, or a DNS name
  • the IPv4 and IPv6 addresses of the first ORPort torrc option of each address family
  • the local hostname
    • and whether it is an IP address, or a DNS name
  • the local network interface addresses

Notes:

  • We'll need a proposal to decide if ORPort or hostname should come first
  • We'll probably want a summary at notice level, and then detailed logs at info level
  • If all these methods fail, relays use X-Your-Address-Is: headers from directory authorities. They are out of scope, because they are not available at startup.
  • Similarly, we won't print address reachability self-testing info, because it's not available at startup.
  • We may want to print similar log messages (including X-Your-Address-Is: and reachability info) as part of tor's regular heartbeat messages. But that deserves a separate ticket.

I don't think we'll use (or log):

  • the addresses of any DirPort torrc options
  • the addresses of multiple ORPort torrc options

Child Tickets

Change History (2)

comment:1 Changed 2 weeks ago by teor

Description: modified (diff)

Edit description to add the relevant functions.

comment:2 Changed 5 days ago by teor

Owner: teor deleted
Parent ID: #24403

Let's prioritise this task when we roadmap the grant.

Note: See TracTickets for help on using tickets.