[tor-bugs] #33414 [Core Tor/Tor]: Split router.c, and disable it (mostly) when building without relay support.

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Feb 21 17:41:47 UTC 2020


#33414: Split router.c, and disable it (mostly) when building without relay
support.
-------------------------------------------------+-------------------------
 Reporter:  nickm                                |          Owner:  nickm
     Type:  defect                               |         Status:
                                                 |  assigned
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.4.4.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  tor-design, network-team-roadmap-    |  Actual Points:  0.5
  2020Q1, 043-deferred                           |
Parent ID:  #31851                               |         Points:  0.5
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by nickm):

 I have a branch called `extract_router` with a PR at
 https://github.com/torproject/tor/pull/1762`.

 There are a few notes here:
   * The branch starts out by splitting the descriptor-generation code into
 its own file.
   * There is some code (currently in clientkey.[ch]) that I was not able
 to extract, since it is used when running as a client.  I believe this
 code to be useless for clients, and I'll open another ticket to look at
 removing it or making it relay only.  But that refactoring seems
 orthogonal to this one.
   * I've tried using some helper macros to generate the stubs in router.h.
 If we like those, we could extract them and use them to generate stubs in
 other files.

 I'm traveling today, so I won't be able to check whether or not CI has
 passed.  I'll put this into needs_review if it does.

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


More information about the tor-bugs mailing list