[tor-bugs] #2355 [Tor Client]: change the meaning of UseBridges

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Tue Feb 22 16:24:17 UTC 2011


#2355: change the meaning of UseBridges
---------------------------------+------------------------------------------
    Reporter:  anonym            |        Type:  enhancement
      Status:  needs_review      |    Priority:  minor      
   Milestone:  Tor: unspecified  |   Component:  Tor Client 
     Version:                    |    Keywords:             
      Parent:                    |      Points:             
Actualpoints:                    |  
---------------------------------+------------------------------------------

Comment(by nickm):

 Reading through the patch...

 This looks weird:
 {{{
 -  if (options->UseBridges && !options->Bridges)
 -    REJECT("If you set UseBridges, you must specify at least one
 bridge.");
 -  if (options->UseBridges && !options->TunnelDirConns)
 -    REJECT("If you set UseBridges, you must set TunnelDirConns.");
 +  if (!strcmp(options->UseBridges, "0") && !options->TunnelDirConns)
 +    REJECT("TunnelDirConns set to 0 only works with UseBridges set to
 0.");
 }}}

 In the new check, we give the warning if UseBridges is 0.  But previously,
 we gave it if it was nonzero.  Maybe a strcmp mistake?

 I'm not sure about launching the bridge descriptor fetch from config.c ;
 the more stuff we launch from configuration parsing, the more spaghettiish
 our code has gotten historically.  We already retry launching downloads
 every 10 or 60 seconds from main.c; perhaps what we need is a function to
 tell main that it needs to retry downloads right away.

 The any_bridge_descriptors_known() logic is fragile in depending on
 have_bridge_descriptors anc choose_random_entry; instead IMO it should
 probably just iterate through bridge_list and see whether we have a
 descriptor for any member.

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


More information about the tor-bugs mailing list