mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-30 23:53:32 +01:00
Merge branch 'maint-0.4.5'
This commit is contained in:
commit
9bc0306b8c
4
changes/bug40179_part2
Normal file
4
changes/bug40179_part2
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
o Minor bugfixes (testing):
|
||||||
|
- Fix the config/parse_tcp_proxy_line test so that it works correctly on
|
||||||
|
systems where the DNS provider hijacks invalid queries.
|
||||||
|
Fixes part of bug 40179; bugfix on 0.4.3.1-alpha.
|
@ -706,11 +706,13 @@ test_config_parse_tcp_proxy_line(void *arg)
|
|||||||
tor_free(msg);
|
tor_free(msg);
|
||||||
|
|
||||||
/* Bad TCPProxy line - unparsable address/port. */
|
/* Bad TCPProxy line - unparsable address/port. */
|
||||||
ret = parse_tcp_proxy_line("haproxy 95.216.163.36/443", options, &msg);
|
MOCK(tor_addr_lookup, mock_tor_addr_lookup__fail_on_bad_addrs);
|
||||||
|
ret = parse_tcp_proxy_line("haproxy bogus_address!/300", options, &msg);
|
||||||
tt_int_op(ret, OP_EQ, -1);
|
tt_int_op(ret, OP_EQ, -1);
|
||||||
tt_str_op(msg, OP_EQ, "TCPProxy address/port failed to parse or resolve. "
|
tt_str_op(msg, OP_EQ, "TCPProxy address/port failed to parse or resolve. "
|
||||||
"Please fix.");
|
"Please fix.");
|
||||||
tor_free(msg);
|
tor_free(msg);
|
||||||
|
UNMOCK(tor_addr_lookup);
|
||||||
|
|
||||||
/* Good TCPProxy line - ipv4. */
|
/* Good TCPProxy line - ipv4. */
|
||||||
ret = parse_tcp_proxy_line("haproxy 95.216.163.36:443", options, &msg);
|
ret = parse_tcp_proxy_line("haproxy 95.216.163.36:443", options, &msg);
|
||||||
@ -723,7 +725,7 @@ test_config_parse_tcp_proxy_line(void *arg)
|
|||||||
tor_free(msg);
|
tor_free(msg);
|
||||||
|
|
||||||
done:
|
done:
|
||||||
;
|
UNMOCK(tor_addr_lookup);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user