[tor-bugs] #32880 [Core Tor/Tor]: V3 handshaking state change doesn't use "connection_or_change_state()"

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Jan 6 05:22:01 UTC 2020


#32880: V3 handshaking state change doesn't use "connection_or_change_state()"
--------------------+------------------------------
 Reporter:  opara   |          Owner:  (none)
     Type:  defect  |         Status:  new
 Priority:  Low     |      Component:  Core Tor/Tor
  Version:          |       Severity:  Minor
 Keywords:          |  Actual Points:
Parent ID:          |         Points:
 Reviewer:          |        Sponsor:
--------------------+------------------------------
 When an OR connection
 [https://github.com/torproject/tor/blob/8c23ac4ae713f7cce7cd7541d2ae635c50c7c062/src/core/or/channeltls.c#L1419
 acting as a server changes to state]
 {{{OR_CONN_STATE_OR_HANDSHAKING_V3}}}, it does so by setting
 {{{conn->base_.state}}} directly and not using
 {{{connection_or_change_state()}}}, so afaict this state change is never
 passed to pubsub or to the channel object.

 On the other hand, when changing to that same state
 [https://github.com/torproject/tor/blob/8c23ac4ae713f7cce7cd7541d2ae635c50c7c062/src/core/or/connection_or.c#L2150
 when acting as a client], it does use {{{connection_or_change_state()}}}
 as expected.

 This seems to me to be a bug, but maybe there was a good reason for doing
 it this way. Also it seems no one has complained about it since the code
 was added, so having it changed doesn't seem to be important. But
 documenting here anyways since someone may want to take a look at it at
 some point.

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


More information about the tor-bugs mailing list