[tor-bugs] #5053 [Tor]: Fix IPv6 implementation for bridge statistics

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Fri Nov 2 23:52:43 UTC 2012


#5053: Fix IPv6 implementation for bridge statistics
-----------------------------+----------------------------------------------
 Reporter:  karsten          |          Owner:  ln5               
     Type:  enhancement      |         Status:  needs_review      
 Priority:  major            |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor              |        Version:                    
 Keywords:  ipv6 tor-bridge  |         Parent:                    
   Points:                   |   Actualpoints:                    
-----------------------------+----------------------------------------------

Comment(by andrea):

 As for the alignment issue, the original comment is flat wrong; it isn't
 safe to assume that a pointer aligned to uint32_t's alignment can be
 dereferenced as any type.  There exist platforms where uint32_t has 4-byte
 alignment but pointers and uint64_t have 8-byte alignment.  However, since
 the keys are really struct in6_addr * and just passed as void for
 genericity of the sort code, as long as they were originally allocated
 with the proper alignment then casting back and forth to void within the
 same type should always be safe.

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


More information about the tor-bugs mailing list