mirror of
https://github.com/curl/curl.git
synced 2026-07-28 22:33:06 +03:00
lib: keep conn IP information together
new struct ip_quadruple for holding local/remote addr+port - used in data->info and conn and cf-socket.c - copy back and forth complete struct - add 'secondary' to conn - use secondary in reporting success for ftp 2nd connection Reported-by: DasKutti on github Fixes #13084 Closes #13090
This commit is contained in:
parent
1ccf1cd993
commit
fcef00db1a
20 changed files with 148 additions and 200 deletions
10
lib/multi.c
10
lib/multi.c
|
|
@ -1987,7 +1987,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
|
|||
hostname = conn->host.name;
|
||||
|
||||
/* check if we have the name resolved by now */
|
||||
dns = Curl_fetch_addr(data, hostname, (int)conn->port);
|
||||
dns = Curl_fetch_addr(data, hostname, conn->primary.remote_port);
|
||||
|
||||
if(dns) {
|
||||
#ifdef CURLRES_ASYNCH
|
||||
|
|
@ -2133,10 +2133,10 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
|
|||
/* call the prerequest callback function */
|
||||
Curl_set_in_callback(data, true);
|
||||
prereq_rc = data->set.fprereq(data->set.prereq_userp,
|
||||
data->info.conn_primary_ip,
|
||||
data->info.conn_local_ip,
|
||||
data->info.conn_primary_port,
|
||||
data->info.conn_local_port);
|
||||
data->info.primary.remote_ip,
|
||||
data->info.primary.local_ip,
|
||||
data->info.primary.remote_port,
|
||||
data->info.primary.local_port);
|
||||
Curl_set_in_callback(data, false);
|
||||
if(prereq_rc != CURL_PREREQFUNC_OK) {
|
||||
failf(data, "operation aborted by pre-request callback");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue