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

[tor-commits] [torsocks/pending-changes] set errno for connect failures related to AF_INET6



commit becf4bc03ea6dcb95d22106ebfe08b4d29b3610a
Author: Jacob Appelbaum <jacob@xxxxxxxxxxxxx>
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 mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits