1
0
mirror of https://github.com/rofl0r/proxychains-ng synced 2025-01-04 19:22:52 +08:00

adapt to chain_step signature change

This commit is contained in:
hc-syn 2024-07-18 14:42:52 +02:00
parent 2b40ffa7f8
commit 04f66223a4

View File

@ -986,7 +986,7 @@ static int start_chain(int *fd, proxy_data * pd, char *begin_mark) {
proxychains_write_log(TP " timeout\n"); proxychains_write_log(TP " timeout\n");
error: error:
if(*fd != -1) { if(*fd != -1) {
close(*fd); true_close(*fd);
*fd = -1; *fd = -1;
} }
return SOCKET_ERROR; return SOCKET_ERROR;
@ -1087,7 +1087,7 @@ static int chain_step(int *ns, proxy_data * pfrom, proxy_data * pto) {
return retcode; return retcode;
err: err:
if(errmsg) proxychains_write_log(errmsg); if(errmsg) proxychains_write_log(errmsg);
if(*ns != -1) close(*ns); if(*ns != -1) true_close(*ns);
*ns = -1; *ns = -1;
return retcode; return retcode;
} }
@ -1310,7 +1310,7 @@ int add_node_to_chain(proxy_data * pd, udp_relay_chain * chain){
} }
// Connect to the rest of the chain // Connect to the rest of the chain
while(tmp->next != NULL){ while(tmp->next != NULL){
if(SUCCESS != chain_step(new_node->tcp_sockfd, &(tmp->pd), &(tmp->next->pd))){ if(SUCCESS != chain_step(&(new_node->tcp_sockfd), &(tmp->pd), &(tmp->next->pd))){
PDEBUG("chain step failed\n"); PDEBUG("chain step failed\n");
new_node->tcp_sockfd = -1; new_node->tcp_sockfd = -1;
goto err; goto err;