[tor-bugs] #17624 [Tor]: Extend NEWNYM to also clear rendezvous caches and rendezvous connections

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Nov 17 13:45:22 UTC 2015


#17624: Extend NEWNYM to also clear rendezvous caches and rendezvous connections
-----------------------------+------------------------------
     Reporter:  karsten      |      Owner:
         Type:  enhancement  |     Status:  new
     Priority:  Medium       |  Milestone:  Tor: unspecified
    Component:  Tor          |    Version:
     Severity:  Normal       |   Keywords:
Actual Points:               |  Parent ID:
       Points:               |    Sponsor:
-----------------------------+------------------------------
 Rob and I would like to measure hidden/onion/rendezvous service
 performance by running two local tor clients to host and repeatedly access
 a service, respectively.  In order to make subsequent requests as
 independent as possible, we'd want to clear all rendezvous caches and
 forget about rendezvous connections before making the next request.
 [https://trac.torproject.org/projects/tor/ticket/1944#comment:42 Roger
 suggests on #1944] to add the necessary functionality to the NEWNYM
 control command.

 Here's the current patch that we're using, which is loosely based on
 arma's bug1944 branch and rebased to master from a year or so ago
 (4c8b809).  Of course, the downside of using this patch is that we can't
 just use a recent-enough tor but have to patch a tor and also maintain the
 patch.  The patch is pretty simple:

 {{{
 diff --git a/src/or/main.c b/src/or/main.c
 index 094120f..ad7fa0b 100644
 --- a/src/or/main.c
 +++ b/src/or/main.c
 @@ -2102,9 +2102,13 @@ process_signal(uintptr_t sig)
        control_event_signal(sig);
        break;
      case SIGUSR2:
 -      switch_logs_debug();
 -      log_debug(LD_GENERAL,"Caught USR2, going to loglevel debug. "
 -                "Send HUP to change back.");
 +      /* Replace the USR2 functionality with bug1944-specific plans.
 +       * Ugly hack, but it'll do. */
 +      log_info(LD_GENERAL, "Clearing all rendezvous caches and "
 +                           "forgetting about rendezvous connections...");
 +      rend_cache_purge();
 +      rend_client_purge_last_hid_serv_requests();
 +      circuit_mark_all_dirty_circs_as_unusable();
        control_event_signal(sig);
        break;
      case SIGHUP:
 }}}

 If there are no major concerns against this idea, I'll prepare and test a
 branch that actually does things when receiving a NEWNYM command, not when
 receiving SIGUSR2.

 Thanks for considering this!

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


More information about the tor-bugs mailing list