[tor-bugs] #33898 [Core Tor/Tor]: Stop modifying addr on connections, and delete real_addr

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Apr 30 02:31:43 UTC 2020


#33898: Stop modifying addr on connections, and delete real_addr
-------------------------------------------+-------------------------------
 Reporter:  teor                           |          Owner:  nickm
     Type:  defect                         |         Status:  assigned
 Priority:  High                           |      Milestone:  Tor:
                                           |  0.4.4.x-final
Component:  Core Tor/Tor                   |        Version:
 Severity:  Normal                         |     Resolution:
 Keywords:  ipv6, technical-debt, prop311  |  Actual Points:
Parent ID:  #33048                         |         Points:  1
 Reviewer:                                 |        Sponsor:  Sponsor55-can
-------------------------------------------+-------------------------------

Comment (by teor):

 Part of the problem here is a naming issue. It's not clear what "real"
 means, particularly when the other address fields doesn't have any
 qualifiers.

 And it's even less clear when we should be using each address field.

 One quick win here, would be to give each of the existing fields a
 distinct, qualified name. The name should clearly describe its purpose or
 contents.

 > I agree that these rules start to get ugly once relays have multiple
 canonical addresses.

 I don't think it's as bad as you think.

 Here are some general principles:
 * Each connection is either IPv4 or IPv6. So any substitute address should
 be from the corresponding family.
 * Any logs should contain addresses from the relevant family, or ideally,
 all available addresses.
 * If an address is only intended for logging, it can be in any convenient
 format. For example, "IPv4:port and [IPv6]:port". If we use an unparseable
 format like this, it will be easier to see coding bugs that use the wrong
 address.

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


More information about the tor-bugs mailing list