[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [torsocks/master] Fix: change non TCP socket warning to debug
commit 31cbca3d898e2a309bee335b49777ff650f3dc99
Author: David Goulet <dgoulet@xxxxxxxxx>
Date: Sat Nov 9 10:58:01 2013 -0500
Fix: change non TCP socket warning to debug
A fat comment is added to explain why this is done. :)
CC: adrelanos <adrelanos@xxxxxxxxxx>
Signed-off-by: David Goulet <dgoulet@xxxxxxxxx>
---
src/lib/socket.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/lib/socket.c b/src/lib/socket.c
index dcc0444..2a50c3e 100644
--- a/src/lib/socket.c
+++ b/src/lib/socket.c
@@ -43,7 +43,16 @@ LIBC_SOCKET_RET_TYPE tsocks_socket(LIBC_SOCKET_SIG)
break;
default:
if (__domain == AF_INET || __domain == AF_INET6) {
- WARN("Non TCP inet socket denied. Tor network can't handle it.");
+ /*
+ * Print this message only in debug mode. Very often, applications
+ * uses the libc to do DNS resolution which first tries with UDP
+ * and then with TCP. It's not critical for the user to know that a
+ * non TCP socket has been denied and since the libc has a fallback
+ * that works, this message most of the time, simply polutes the
+ * application's output which can cause issues with external
+ * applications parsing the output.
+ */
+ DBG("Non TCP inet socket denied. Tor network can't handle it.");
errno = EINVAL;
return -1;
}
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits