[tor-bugs] #22372 [Core Tor/Tor]: Refactor dirserv_add_descriptor so we always free routerinfos and send events

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu May 25 02:49:30 UTC 2017


#22372: Refactor dirserv_add_descriptor so we always free routerinfos and send
events
------------------------------+------------------------------
     Reporter:  teor          |      Owner:
         Type:  enhancement   |     Status:  new
     Priority:  Medium        |  Milestone:  Tor: unspecified
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:  refactor
Actual Points:                |  Parent ID:
       Points:  0.5           |   Reviewer:
      Sponsor:                |
------------------------------+------------------------------
 dirserv_add_descriptor tries to do too many things, and we tend to forget
 to free memory (#22370), and send events (#22371, commit 77502ac in
 0.2.0.1-alpha).

 We should split the function into two:
 * one that does the rejections and frees the descriptor at the end, and
 * another that adds to the routerlist

 And we should make sure (somehow) that we always call
 control_event_or_authdir_new_descriptor(), as it's easy to miss one of the
 cases.

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


More information about the tor-bugs mailing list