mirror of
https://github.com/curl/curl.git
synced 2026-07-24 09:27:23 +03:00
socks: handle error in verbose trace gracefully
Adjust the flow to always succeed in verbose trace of connect. Reported in Joshua's sarif data Closes #18722
This commit is contained in:
parent
9f75603d4f
commit
f5bae285f3
1 changed files with 10 additions and 9 deletions
19
lib/socks.c
19
lib/socks.c
|
|
@ -1291,15 +1291,16 @@ static CURLcode socks_proxy_cf_connect(struct Curl_cfilter *cf,
|
|||
if(Curl_trc_is_verbose(data)) {
|
||||
struct ip_quadruple ipquad;
|
||||
bool is_ipv6;
|
||||
result = Curl_conn_cf_get_ip_info(cf->next, data, &is_ipv6, &ipquad);
|
||||
if(result)
|
||||
return result;
|
||||
infof(data, "Opened %sSOCKS connection from %s port %u to %s port %u "
|
||||
"(via %s port %u)",
|
||||
(sockindex == SECONDARYSOCKET) ? "2nd " : "",
|
||||
ipquad.local_ip, ipquad.local_port,
|
||||
sx->hostname, sx->remote_port,
|
||||
ipquad.remote_ip, ipquad.remote_port);
|
||||
if(!Curl_conn_cf_get_ip_info(cf->next, data, &is_ipv6, &ipquad))
|
||||
infof(data, "Opened %sSOCKS connection from %s port %u to %s port %u "
|
||||
"(via %s port %u)",
|
||||
(sockindex == SECONDARYSOCKET) ? "2nd " : "",
|
||||
ipquad.local_ip, ipquad.local_port,
|
||||
sx->hostname, sx->remote_port,
|
||||
ipquad.remote_ip, ipquad.remote_port);
|
||||
else
|
||||
infof(data, "Opened %sSOCKS connection",
|
||||
(sockindex == SECONDARYSOCKET) ? "2nd " : "");
|
||||
}
|
||||
#endif
|
||||
socks_proxy_cf_free(cf);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue