aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_socks.c
diff options
context:
space:
mode:
authorrl1987 <rl1987@sdf.lonestar.org>2018-05-13 17:39:48 +0200
committerNick Mathewson <nickm@torproject.org>2018-07-12 11:40:49 -0400
commit9155e08450fe7a609f8223202e8aa7dfbca20a6d (patch)
treecd7aa6c6e09aeeba0519bf01f827bf7c26c233cf /src/test/test_socks.c
parent240f33e3274fd0e9c2f97f6d3cb1e0f99263e9c7 (diff)
downloadtor-9155e08450fe7a609f8223202e8aa7dfbca20a6d.tar.gz
tor-9155e08450fe7a609f8223202e8aa7dfbca20a6d.zip
Parsing SOCKS4/4a request using trunnel impl
Diffstat (limited to 'src/test/test_socks.c')
-rw-r--r--src/test/test_socks.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/test_socks.c b/src/test/test_socks.c
index 04c0280584..cf34e9d435 100644
--- a/src/test/test_socks.c
+++ b/src/test/test_socks.c
@@ -82,7 +82,7 @@ test_socks_4_supported_commands(void *ptr)
tt_int_op(0,OP_EQ, buf_datalen(buf));
- /* SOCKS 4 Send CONNECT [01] to IP address 2.2.2.2:4370 */
+ /* SOCKS 4 Send CONNECT [01] to IP address 2.2.2.3:4370 */
ADD_DATA(buf, "\x04\x01\x11\x12\x02\x02\x02\x03\x00");
tt_int_op(fetch_from_buf_socks(buf, socks, get_options()->TestSocks,
get_options()->SafeSocks),
@@ -98,7 +98,7 @@ test_socks_4_supported_commands(void *ptr)
tt_int_op(0,OP_EQ, buf_datalen(buf));
socks_request_clear(socks);
- /* SOCKS 4 Send CONNECT [01] to IP address 2.2.2.2:4369 with userid*/
+ /* SOCKS 4 Send CONNECT [01] to IP address 2.2.2.4:4369 with userid*/
ADD_DATA(buf, "\x04\x01\x11\x12\x02\x02\x02\x04me\x00");
tt_int_op(fetch_from_buf_socks(buf, socks, 1, 0),
OP_EQ, 1);
@@ -142,7 +142,7 @@ test_socks_4_bad_arguments(void *ptr)
get_options()->SafeSocks),
OP_EQ, -1);
buf_clear(buf);
- expect_log_msg_containing("Port or DestIP is zero.");
+ expect_log_msg_containing("Port or DestIP is zero."); // !!!
mock_clean_saved_logs();
/* Try with 0 port */
@@ -192,7 +192,7 @@ test_socks_4_bad_arguments(void *ptr)
tt_int_op(fetch_from_buf_socks(buf, socks, 1, 0),
OP_EQ, -1);
buf_clear(buf);
- expect_log_msg_containing("Destaddr too long.");
+ expect_log_msg_containing("parsing failed - invalid request.");
mock_clean_saved_logs();
/* Socks4, bogus hostname */