summaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorStefan Eissing <stefan@eissing.org>2023-01-03 13:13:37 +0100
committerDaniel Stenberg <daniel@haxx.se>2023-01-03 17:33:29 +0100
commit6a8d7ef9818d5f5c9bbd9bcf4ce09feaa04a1556 (patch)
tree91ef71e554b532ce00c38d27f1c31a9c8333d933 /lib/ftp.c
parent436d63fbb18db9c91e816b27a3b9316cd7310471 (diff)
downloadcurl-6a8d7ef9818d5f5c9bbd9bcf4ce09feaa04a1556.tar.gz
cf-socket: keep sockaddr local in the socket filters
- copy `struct Curl_addrinfo` on filter setup into context - remove `struct Curl_addrinfoi *` with `struct Curl_sockaddr_ex *` in connectdata that is set and NULLed by the socket filter - this means we have no reference to the resolver info in connectdata or its filters - trigger the CF_CTRL_CONN_INFO_UPDATE event when the complete filter chain reaches connected status - update easy handle connection information on CF_CTRL_DATA_SETUP event. Closes #10213
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 381bad7c8..7adf73c9c 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -1010,9 +1010,9 @@ static CURLcode ftp_state_use_port(struct Curl_easy *data,
if(*addr != '\0') {
/* attempt to get the address of the given interface name */
- switch(Curl_if2ip(conn->ip_addr->ai_family,
+ switch(Curl_if2ip(conn->remote_addr->family,
#ifdef ENABLE_IPV6
- Curl_ipv6_scope(conn->ip_addr->ai_addr),
+ Curl_ipv6_scope(&conn->remote_addr->sa_addr),
conn->scope_id,
#endif
addr, hbuf, sizeof(hbuf))) {