[tor-bugs] #11205 [Torsocks]: gethostbyname2 needs to be supported in addition to gethostbyname
Tor Bug Tracker & Wiki
blackhole at torproject.org
Fri Mar 14 20:43:15 UTC 2014
#11205: gethostbyname2 needs to be supported in addition to gethostbyname
-------------------------+----------------------------------
Reporter: yurivict271 | Owner: ioerror
Type: defect | Status: new
Priority: normal | Milestone:
Component: Torsocks | Version: Tor: unspecified
Keywords: | Actual Points:
Parent ID: | Points:
-------------------------+----------------------------------
Repost of the bug from the old bug repotring system:
https://code.google.com/p/torsocks/issues/detail?id=60
On some systems, like FreeBSD, function gethostbyname2(3) is defined in
addition to gethostbyname(3). Here is its signature:
struct hostent *
gethostbyname2(const char *name, int af);
If the process uses gethostbyname2 instead of gethostbyname for the name
resolution, it doesn't go through SOCKS5 and connection fails.
Need to support it.
Particularly, mplayer configures itself to use gethostbyname2 on FreeBSD,
and therefore by default doesn't work with libtorsocks.
Implemented gethost by name in case of tcp v4, v6 is not yet implemented.
Tested with the streams played by mplayer. DNS resolution works fine.
torsocks-1.2_1
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/11205>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list