Fix the IPv6 case of tor_ersatz_socketpair
In get_local_listener
which is used by tor_ersatz_socketpair
, sin6_family
is currently being set to AF_INET
in the IPv6 case when AF_INET6
should be used instead.
This code was introduced in commit 9b24609a from this past August, so this is not a brand-new problem.
I tested this on my OpenBSD box by forcing an IPv6 socket to be used for tor_ersatz_socketpair
and running the test suite. There is a test in the test suite that tests tor_ersatz_socketpair
: it (of course) fails using the current AF_INET
code but it passes when using AF_INET6
instead.
PR to follow to change AF_INET
to AF_INET6
in the IPv6 case.
Trac:
Username: kjak