summaryrefslogtreecommitdiff
path: root/src/or/relay.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2008-01-20 05:54:15 +0000
committerRoger Dingledine <arma@torproject.org>2008-01-20 05:54:15 +0000
commitff62154ba3cb79b4b38f937552fdced04d2d950d (patch)
tree537dc1c42f159314af9e97a848bffab12840a3e9 /src/or/relay.c
parenta1f2817307ee2d4b4754db1d76f96f8019f5e857 (diff)
downloadtor-ff62154ba3cb79b4b38f937552fdced04d2d950d.tar.gz
tor-ff62154ba3cb79b4b38f937552fdced04d2d950d.zip
New config options WarnPlaintextPorts and RejectPlaintextPorts so
Tor can warn and/or refuse connections to ports commonly used with vulnerable-plaintext protocols. We still need to figure out some good defaults for them. svn:r13198
Diffstat (limited to 'src/or/relay.c')
-rw-r--r--src/or/relay.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/relay.c b/src/or/relay.c
index d5e81c1b72..d7d33f8741 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -600,7 +600,10 @@ connection_edge_end_reason_str(int reason)
/** Translate <b>reason</b> (as from a relay 'end' cell) into an
* appropriate SOCKS5 reply code.
- * DODCDOC 0
+ *
+ * A reason of 0 means that we're not actually expecting to send
+ * this code back to the socks client; we just call it 'succeeded'
+ * to keep things simple.
*/
socks5_reply_status_t
connection_edge_end_reason_socks5_response(int reason)
@@ -614,6 +617,8 @@ connection_edge_end_reason_socks5_response(int reason)
return SOCKS5_HOST_UNREACHABLE;
case END_STREAM_REASON_CONNECTREFUSED:
return SOCKS5_CONNECTION_REFUSED;
+ case END_STREAM_REASON_ENTRYPOLICY:
+ return SOCKS5_NOT_ALLOWED;
case END_STREAM_REASON_EXITPOLICY:
return SOCKS5_NOT_ALLOWED;
case END_STREAM_REASON_DESTROY: