commit 1b998d8e81f25ed261b1da93e6137bc33aebae2d
Author: David Goulet <[email protected]>
Date:   Tue Jun 21 09:18:54 2016 -0400

    Return connection refused on deny by ruleset error
    
    Signed-off-by: David Goulet <[email protected]>
---
 src/common/socks5.c      | 2 +-
 tests/unit/test_socks5.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/socks5.c b/src/common/socks5.c
index 1086deb..1be2ab8 100644
--- a/src/common/socks5.c
+++ b/src/common/socks5.c
@@ -535,7 +535,7 @@ int socks5_recv_connect_reply(struct connection *conn)
                break;
        case SOCKS5_REPLY_DENY_RULE:
                ERR("Connection not allowed by ruleset");
-               ret = -ECONNABORTED;
+               ret = -ECONNREFUSED;
                break;
        case SOCKS5_REPLY_NO_NET:
                ERR("Network unreachable");
diff --git a/tests/unit/test_socks5.c b/tests/unit/test_socks5.c
index 4ef92f7..ac8ed3c 100644
--- a/tests/unit/test_socks5.c
+++ b/tests/unit/test_socks5.c
@@ -729,7 +729,7 @@ static void test_socks5_recv_connect_reply_deny_rule(void)
 
        ret = socks5_recv_connect_reply(conn_stub);
 
-       ok(ret == -ECONNABORTED, "socks5 reply deny rule");
+       ok(ret == -ECONNREFUSED, "socks5 reply deny rule");
 
        connection_destroy(conn_stub);
        socks5_init(NULL, NULL);

_______________________________________________
tor-commits mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to