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

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Thu Feb 9 07:57:55 UTC 2012


#5053: Fix IPv6 implementation for bridge statistics
------------------------+---------------------------------------------------
 Reporter:  karsten     |          Owner:                    
     Type:  defect      |         Status:  new               
 Priority:  major       |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Bridge  |        Version:                    
 Keywords:              |         Parent:                    
   Points:              |   Actualpoints:                    
------------------------+---------------------------------------------------
 Yesterday I found that the current IPv6 implementation in Tor doesn't
 count IPv6 connections at all.  See connection_or.c lines 1717--1719:

 {{{
 /*XXXX IP6 support ipv6 geoip.*/
 uint32_t a = tor_addr_to_ipv4h(&TO_CONN(conn)->addr);
 geoip_note_client_seen(GEOIP_CLIENT_CONNECT, a, now);
 }}}

 That's actually pretty bad.  If we don't count IPv6 connections at all,
 our bridge statistics will be even more broken than they already are.
 What if IPv6 becomes popular for bridges and people start using them
 instead of IPv4 bridges?  We'll conclude that all our bridge users have
 disappeared.  (Entry statistics are also affected, but they're not as
 important as bridge statistics.)

 The long-term goal will be to include a IPv6 GeoIP database in Tor and
 resolve IPv6 addresses to countries, too.  That's something for 0.2.4.x.

 But the short-term goal must be to count IPv6 connections as unresolvable
 addresses using country code `"??"`, so that we get the absolute numbers
 right.  Or if we wanted, we could use country code `"?6"` for unresolved
 IPv6 addresses.

 I think we have to fix this in 0.2.3.x, despite the feature freeze.  If
 required, I can start writing a patch today.

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


More information about the tor-bugs mailing list