[tor-bugs] #3608 [Tor Bridge]: Server transport proxies should bind on a consistent port

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Fri Sep 9 15:35:16 UTC 2011


#3608: Server transport proxies should bind on a consistent port
------------------------+---------------------------------------------------
 Reporter:  asn         |          Owner:  asn         
     Type:  defect      |         Status:  needs_review
 Priority:  normal      |      Milestone:              
Component:  Tor Bridge  |        Version:              
 Keywords:              |         Parent:  #3591       
   Points:              |   Actualpoints:              
------------------------+---------------------------------------------------

Comment(by nickm):

 state_transport_line_is_valid() takes a char*, but isn't documented to
 change it.  If it doesn't change it, it should take const char *

 validate_transports_in_state doesn't do what it's documented to do: It
 never returns -1

 get_transport_in_state_by_name will fail badly if there are two transports
 A and B such that A's name is a prefix of B's.

 You shouldn't need to be messing with this STRUCT_VAR_P stuff and
 config_find_option stuff if you know the name of the field you want to
 access -- just use C and say "get_or_state()->TransportProxies"

 get_transport_bindaddr should probably check that the line actually starts
 with the name of the transport and a space.

 For save_transport_to_state, would it be simpler to just clear the entire
 TransportProxies field, and re-add *every* transport?

 When in doubt, prefer tor_addr_t

 Most of the new functions that take managed_proxy_t * should take const
 managed_proxy_t *.  Many of them can be static

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


More information about the tor-bugs mailing list