[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



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

Comment(by karsten):

 Replying to [comment:22 nickm]:
 > Karsten, I am not seeing any change to the return value of
 geoip_get_country_by_addr() for ipv6 addresses?

 Right.  Did you want me to change it?

 -1 is the correct answer if we don't have geoip information available to
 resolve an address, which is the case for IPv6 addresses.  Note how all
 current callers of geoip_get_country_by_addr() check whether the response
 is < 0 and then set it to 0.  They don't want to distinguish between "no
 geoip information available" and "not resolved to any country."  But
 future callers might want to distinguish, which is why we're returning -1,
 not 0.

 If you think this implementation is too confusing, we should change both
 geoip_get_country_by_ip() and geoip_get_country_by_addr() and dump the -1
 return value entirely.  I can do that.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5053#comment:23>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs