Opened 3 years ago

Last modified 3 years ago

#22372 new enhancement

Refactor dirserv_add_descriptor so we always free routerinfos and send events

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: refactor technical-debt tor-dirauth
Cc: 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

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.

Child Tickets

Change History (1)

comment:1 Changed 3 years ago by nickm

Keywords: technical-debt tor-dirauth added
Note: See TracTickets for help on using tickets.