[tor-bugs] #5604 [Tor Client]: If DisableNetwork is set, we open all our ports and then close then at each setconf

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Wed Apr 11 19:32:31 UTC 2012


#5604: If DisableNetwork is set, we open all our ports and then close then at each
setconf
------------------------+---------------------------------------------------
 Reporter:  arma        |          Owner:                    
     Type:  defect      |         Status:  new               
 Priority:  normal      |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Client  |        Version:                    
 Keywords:              |         Parent:                    
   Points:              |   Actualpoints:                    
------------------------+---------------------------------------------------
 {{{
     /* Launch the listeners.  (We do this before we setuid, so we can bind
 to
      * ports under 1024.)  We don't want to rebind if we're hibernating.
 If
      * networking is disabled, this will close all but the control
 listeners,
      * but disable those. */
     if (!we_are_hibernating()) {
       if (retry_all_listeners(replaced_listeners, new_listeners) < 0) {
         *msg = tor_strdup("Failed to bind one of the listener ports.");
         goto rollback;
       }
     }
     if (options->DisableNetwork) {
       /* Aggressively close non-controller stuff, NOW */
       log_notice(LD_NET, "DisableNetwork is set. Tor will not make or
 accept "
                  "non-control network connections. Shutting down all
 existing "
                  "connections.");
       connection_mark_all_noncontrol_connections();
     }
 }}}

 It isn't sufficient to simply not call the first part when DisableNetwork
 is set, because of the case where we want to open new control ports. But
 it looks like we're just opening them all, even when in the next clause
 we'll close (most of) them again?

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


More information about the tor-bugs mailing list