[tor-bugs] #24952 [Core Tor/Tor]: channel: channel_tls_get_remote_addr_method() should return the "real_addr" of the connection

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Jan 30 20:35:29 UTC 2018


#24952: channel: channel_tls_get_remote_addr_method() should return the "real_addr"
of the connection
------------------------------------------+--------------------------------
 Reporter:  dgoulet                       |          Owner:  (none)
     Type:  defect                        |         Status:  merge_ready
 Priority:  Medium                        |      Milestone:  Tor:
                                          |  0.3.3.x-final
Component:  Core Tor/Tor                  |        Version:
 Severity:  Normal                        |     Resolution:
 Keywords:  tor-channel, review-group-31  |  Actual Points:
Parent ID:                                |         Points:
 Reviewer:  dgoulet                       |        Sponsor:
------------------------------------------+--------------------------------
Changes (by dgoulet):

 * status:  needs_review => merge_ready
 * reviewer:   => dgoulet


Comment:

 There seems to be 3 callsites:

 1. `connection_exit_begin_conn()`

  The address of the `or_circ->p_chan` is returned which I think in this
 case is good to use `real_addr` because it is used to actually connect to
 the directory.

 2. `channel_do_open_actions()`

  That is actually the part where this ticket is important because it is
 where we note down the TCP connection client address into the geoip cache.

 3. `channel_dump_statistics()`

  The address is used to print a log with the remote connected address so
 again, the `real_addr` is what we probably want.

 So I think we are good. Patch lgtm;

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


More information about the tor-bugs mailing list