summaryrefslogtreecommitdiff
path: root/src/or/buffers.c
diff options
context:
space:
mode:
authorrl1987 <rl1987@sdf.lonestar.org>2014-10-21 20:50:32 +0300
committerNick Mathewson <nickm@torproject.org>2014-11-04 00:37:24 -0500
commit51e247361824fa64f4322fb59e9d2cffd9d72cba (patch)
tree5328a16f903bca1eb8ea8d85322c531e840ddbeb /src/or/buffers.c
parentfc9591da727817923e1084d1a73d5dd8a52e6948 (diff)
downloadtor-51e247361824fa64f4322fb59e9d2cffd9d72cba.tar.gz
tor-51e247361824fa64f4322fb59e9d2cffd9d72cba.zip
Sending 'Not allowed' error message before closing the connection.
Diffstat (limited to 'src/or/buffers.c')
-rw-r--r--src/or/buffers.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c
index 354bec64bc..691845ec10 100644
--- a/src/or/buffers.c
+++ b/src/or/buffers.c
@@ -2053,8 +2053,10 @@ parse_socks(const char *data, size_t datalen, socks_request_t *req,
string_is_valid_ipv6_address(req->address)) {
log_unsafe_socks_warning(5,req->address,req->port,safe_socks);
- if (safe_socks)
+ if (safe_socks) {
+ socks_request_set_socks5_error(req, SOCKS5_NOT_ALLOWED);
return -1;
+ }
}
if (!string_is_valid_hostname(req->address)) {