[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #12538 [Tor]: A relay is automatically a dir cache



#12538: A relay is automatically a dir cache
-----------------------------+--------------------------------
     Reporter:  cypherpunks  |      Owner:
         Type:  enhancement  |     Status:  needs_revision
     Priority:  normal       |  Milestone:  Tor: 0.2.6.x-final
    Component:  Tor          |    Version:  Tor: unspecified
   Resolution:               |   Keywords:  tor-relay
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+--------------------------------

Comment (by sysrqb):

 Replying to [comment:5 nickm]:
 > I'm not sure I understand the purpose of:
 > {{{
 > -  if (!server_mode(options) || !advertised_server_mode())
 > +  if (options->ClientOnly || !advertised_server_mode())
 > }}}
 >

 server_mode() checks two things: 1) Is this relay a client and 2) does it
 have an open ORPort. We already check if it has an open ORPort so I didn't
 see a reason for adding a possible context switch and rechecking it.
 Another alternative could be:

 {{{
 -  if (options->BridgeRelay || options->DirPort_set)
 +  if (options->BridgeRelay || options->DirPort_set ||
 server_mode(options))
     return 1;
 -  if (!server_mode(options) || !advertised_server_mode())
 +  if (!advertised_server_mode())
     return 0;
 }}}

 > Also, this code doesn't actually change client behavior: it would make
 all servers cache, but it wouldn't do anything to let clients know that
 they're caching so they can use them.  Also IIUC it wouldn't make servers
 actually download directory information on the same schedule caches do, or
 make them keep it as long.

 Yes, sorry, I posted this branch prematurely.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/12538#comment:6>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs