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

Re: [tor-bugs] #21967 [Core Tor/Tor]: obfs4proxy not killed when unused



#21967: obfs4proxy not killed when unused
--------------------------+------------------------------------
 Reporter:  asn           |          Owner:
     Type:  defect        |         Status:  new
 Priority:  Medium        |      Milestone:  Tor: 0.3.1.x-final
Component:  Core Tor/Tor  |        Version:
 Severity:  Normal        |     Resolution:
 Keywords:  tor-pt        |  Actual Points:
Parent ID:                |         Points:  1.5
 Reviewer:                |        Sponsor:
--------------------------+------------------------------------

Comment (by arma):

 Ok, that turns out to have been the easy part of the fix.

 The fix above does indeed sweep unconfigured bridges from the bridge_list.

 But the managed proxy still stays running.

 That's because the transports and managed proxies get marked:
 {{{
   mark_transport_list();
   pt_prepare_proxy_list_for_config_read();
 }}}

 but then they (both the transport and the managed proxy) get rescued in
 pt_kickstart_proxy:
 {{{
     if (mp->was_around_before_config_read) {
       /* If this managed proxy was around even before we read the
          config this time, it means that it was already enabled before
          and is not useless and should be kept. If it's marked for
          removal, unmark it and make sure that we check whether it
          needs to be restarted. */
       if (mp->marked_for_removal) {
         mp->marked_for_removal = 0;
         check_if_restarts_needed = 1;
       }

       /* For each new transport, check if the managed proxy used to
          support it before the SIGHUP. If that was the case, make sure
          it doesn't get removed because we might reuse it. */
       SMARTLIST_FOREACH_BEGIN(with_transport_list, const char *,
 transport) {
         old_transport = transport_get_by_name(transport);
         if (old_transport)
           old_transport->marked_for_removal = 0;
       } SMARTLIST_FOREACH_END(transport);
     }
 }}}

 And with comments like that...are we sure this ever worked? It sure seems
 to be intentional about keeping them around.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21967#comment:7>
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