[tor-bugs] #21150 [Core Tor/Tor]: HiddenServiceStatistics gets set to 0 in your torrc, and stays 0 when you become a relay

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Jan 18 11:20:36 UTC 2017


#21150: HiddenServiceStatistics gets set to 0 in your torrc, and stays 0 when you
become a relay
--------------------------+------------------------------------
 Reporter:  arma          |          Owner:  dgoulet
     Type:  defect        |         Status:  needs_information
 Priority:  Medium        |      Milestone:  Tor: 0.3.0.x-final
Component:  Core Tor/Tor  |        Version:
 Severity:  Normal        |     Resolution:
 Keywords:                |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+------------------------------------

Comment (by arma):

 Replying to [comment:7 dgoulet]:
 > Else we have a version of the option with let say an underscore at the
 end which represents what tor should use and the one with out is from the
 configuration file.

 This approach is what I was suggesting, and it's what we did for
 DirReqStatistics in #4244. For that one, see commit 905443 for how it was
 done.

 > Both solutions requires lots of work.

 "3 files changed, 17 insertions(+), 8 deletions(-)" doesn't seem so bad.
 :)

 > Maybe a better solution is to set the default to `auto` and then 1 if
 relay 0 if not?

 I could get behind that solution too. It looks like it should work too.

 Speaking of which, check out this clause in config.c:
 {{{
     if (!public_server_mode(options)) {
       options->CellStatistics = 0;
       options->EntryStatistics = 0;
       options->ConnDirectionStatistics = 0;
       options->HiddenServiceStatistics = 0;
       options->ExitPortStatistics = 0;
     }
 }}}

 So we're violating the #4244 rule of "thou shalt not modify the options to
 make it look like the user picked A when actually it said B" on all of
 these config options -- it just happens that the other ones already
 default to 0 so they aren't being noticed yet.

 Should we make all of those auto too? And then have some function
 somewhere with the "real" defaults for them? Hm.

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


More information about the tor-bugs mailing list