commit becf4bc03ea6dcb95d22106ebfe08b4d29b3610a Author: Jacob Appelbaum jacob@appelbaum.net Date: Tue Nov 6 17:56:32 2012 -0800
set errno for connect failures related to AF_INET6 --- src/torsocks.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/torsocks.c b/src/torsocks.c index 1c772be..74ead72 100644 --- a/src/torsocks.c +++ b/src/torsocks.c @@ -299,6 +299,7 @@ int torsocks_connect_guts(CONNECT_SIGNATURE, int (*original_connect)(CONNECT_SIG /* If this is an INET6, we'll refuse it. */ if ((connaddr->sin_family == AF_INET6)) { show_msg(MSGERR, "connect: Connection is IPv6: rejecting.\n"); + errno = EAFNOSUPPORT; return -1; }
tor-commits@lists.torproject.org