[tor-bugs] #4620 [Tor Relay]: Move ipv6_preferred from routerinfo_t to node_t

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Sun May 6 13:53:39 UTC 2012


#4620: Move ipv6_preferred from routerinfo_t to node_t
-----------------------+----------------------------------------------------
 Reporter:  ln5        |          Owner:  ln5               
     Type:  defect     |         Status:  assigned          
 Priority:  minor      |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Relay  |        Version:                    
 Keywords:  ipv6       |         Parent:                    
   Points:             |   Actualpoints:                    
-----------------------+----------------------------------------------------

Comment(by ln5):

 When is code like this safe?

   node = node_get_mutable_by_id(router->cache_info.identity_digest);
   tor_assert(node);

 For example, dirserv_set_router_is_running() is doing that (and #5529
 mimics that in dirserv_single_reachability_test()).

 node_get_mutable_by_id() searches nodelist_map (nodelist.c) which is
 populated by node_get_or_create(), invoked by
 nodelist_add_routerinfo() and nodelist_set_consensus().

 So it looks like if ROUTER is in consensus or has been added to
 nodelist_map by other means (like getting a descriptor directly from a
 bridge?) node_get_mutable_by_id() will succeed.

 I'm wondering since I'm trying to figure out if it's worth it or not
 to move the ipv6_preferred flag to node_t if the risk of not having a
 node_t at the time we might need the flag exists.  Maybe this should
 be dealt with in a more general overhaul of routerinfo_t vs. node_t?

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


More information about the tor-bugs mailing list