[tor-bugs] #17638 [Tor]: Make ersatz_socketpair work on IPv6-only systems:

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Nov 19 06:35:43 UTC 2015


#17638: Make ersatz_socketpair work on IPv6-only systems:
------------------------+-----------------------------------------
     Reporter:  teor    |      Owner:
         Type:  defect  |     Status:  new
     Priority:  Medium  |  Milestone:  Tor: 0.2.8.x-final
    Component:  Tor     |    Version:  Tor: unspecified
     Severity:  Normal  |   Keywords:  easy ipv6 TorCoreTeam201511
Actual Points:          |  Parent ID:
       Points:          |    Sponsor:
------------------------+-----------------------------------------
 Some systems don't have IPv4 localhost (some IPv6-only systems):
 ersatz_socketpair currently uses AF_INET. If that fails with
 EPROTONOSUPPORT (or WSAEPROTONOSUPPORT on Windows), let's have it try
 AF_INET6.

 Some systems don't even have IPv6 localhost (some FreeBSD jails). Instead,
 they have a non-127/8, non-::1 IP address used as the default:
 ersatz_socketpair currently uses INADDR_LOOPBACK. On IPv6, it should use
 ::1 (or a constant or function returning it). If that fails with E(address
 not found) (or WSAE(address not found) on Windows), that's actually what
 we want - we don't want to accidentally expose a socketpair on a routable
 address.

 We should also remove the check in the ersatz_socketpair unit test that
 bails out on EPROTONOSUPPORT.

 Patch on a version before 22dba27d8dd5 (23 Nov 2004) / svn:r2943.

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


More information about the tor-bugs mailing list