diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-03-01 22:16:15 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-03-01 22:16:15 +0000 |
commit | 4ddf768a4fc98bfc2e18a7076bd0397967e3de5e (patch) | |
tree | 8049eb9dec027b429757925cce70f724c8151a8e /src/or/buffers.c | |
parent | 59ec8ca3f1bbc20a982d1047666cd9483bb07704 (diff) | |
download | tor-4ddf768a4fc98bfc2e18a7076bd0397967e3de5e.tar.gz tor-4ddf768a4fc98bfc2e18a7076bd0397967e3de5e.zip |
Forward-port new reasons; clean up code more; add code to convert new reasons to SOCKS5 reply codes; add code to convert errnos to reasons. New code still needs to get invoked.
svn:r3719
Diffstat (limited to 'src/or/buffers.c')
-rw-r--r-- | src/or/buffers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index 0abcd9a828..a6e765eace 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -472,7 +472,7 @@ int fetch_from_buf_socks(buf_t *buf, socks_request_t *req) { if (!nummethods || !memchr(buf->mem+2, 0, nummethods)) { log_fn(LOG_WARN,"socks5: offered methods don't include 'no auth'. Rejecting."); req->replylen = 2; /* 2 bytes of response */ - req->reply[0] = 5; /* socks5 reply */ + req->reply[0] = 5; req->reply[1] = '\xFF'; /* reject all methods */ return -1; } @@ -480,7 +480,7 @@ int fetch_from_buf_socks(buf_t *buf, socks_request_t *req) { req->replylen = 2; /* 2 bytes of response */ req->reply[0] = 5; /* socks5 reply */ - req->reply[1] = 0; /* choose the 'no auth' method */ + req->reply[1] = SOCKS5_SUCCEEDED; req->socks_version = 5; /* remember that we've already negotiated auth */ log_fn(LOG_DEBUG,"socks5: accepted method 0"); return 0; |