[tor-bugs] #32410 [Core Tor/Tor]: --disable-module-relay causes us to reject default options

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Nov 7 00:48:23 UTC 2019


#32410: --disable-module-relay causes us to reject default options
--------------------------+------------------------------------
 Reporter:  nickm         |          Owner:  teor
     Type:  defect        |         Status:  needs_review
 Priority:  High          |      Milestone:  Tor: 0.4.3.x-final
Component:  Core Tor/Tor  |        Version:
 Severity:  Normal        |     Resolution:
 Keywords:                |  Actual Points:  0.1
Parent ID:                |         Points:  0.1
 Reviewer:  nickm         |        Sponsor:  Sponsor31-must
--------------------------+------------------------------------
Changes (by teor):

 * status:  assigned => needs_review
 * reviewer:   => nickm
 * points:   => 0.1
 * actualpoints:   => 0.1


Comment:

 nickm and I spoke about this issue on IRC.

 Here's what the code already does:
 * remove all direct references to the DirCache option outside disabled
 relay code: except for routermode and relay_config, everywhere else uses
 dir_server_mode()
 * interpret DirCache as "become a directory cache if we are also a relay":
 dir_server_mode() is `DirPort_set || (server_mode() &&
 router_has_bandwidth_to_be_dirserver())`

 Here are the changes in this ticket:
 * change the default to `DirCache 0` when tor is built with the relay
 module disabled
   * but keep the default `DirCache 1` when we're building the unit tests
 * add a comment to the DirCache option that tells developers to use
 dir_server_mode() instead

 See my PR:
 * master: https://github.com/torproject/tor/pull/1515

 I tested this fix by building with relay mode disabled, and then running
 `src/app/tor DisableNetwork 1`. Before the fix, it failed with a config
 error. After, it starts up with a valid config.

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


More information about the tor-bugs mailing list