diff options
author | Jay Satiro <raysatiro@yahoo.com> | 2023-01-06 14:00:59 -0500 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2023-01-08 03:32:06 -0500 |
commit | 260fea215adf0cffed91fb9cb331e163431ebc5b (patch) | |
tree | 672cc1842dbfc1849ba88216f250b7bda98dc03b | |
parent | 91576eba575858fc62f8add163824b3a3fc1e571 (diff) | |
download | curl-260fea215adf0cffed91fb9cb331e163431ebc5b.tar.gz |
sendf: fix build for Linux TCP fastopen
- Fix the remote addr struct dereference.
- Include cf-socket.h in urldata.h.
Follow-up to 6a8d7ef9 which changed conn->ipaddr (Curl_addrinfo* )
member to conn->remote_addr (Curl_sockaddr_ex *) several days ago.
Reported-by: Stephan Guilloux
Fixes https://github.com/curl/curl/issues/10249
Closes https://github.com/curl/curl/pull/10250
-rw-r--r-- | lib/sendf.c | 3 | ||||
-rw-r--r-- | lib/urldata.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/sendf.c b/lib/sendf.c index 632b4f63a..a0fe27e1e 100644 --- a/lib/sendf.c +++ b/lib/sendf.c @@ -363,7 +363,8 @@ ssize_t Curl_send_plain(struct Curl_easy *data, int num, #if defined(MSG_FASTOPEN) && !defined(TCP_FASTOPEN_CONNECT) /* Linux */ if(conn->bits.tcp_fastopen) { bytes_written = sendto(sockfd, mem, len, MSG_FASTOPEN, - conn->remote_addr.addr, conn->remote_addr.addrlen); + &conn->remote_addr->sa_addr, + conn->remote_addr->addrlen); conn->bits.tcp_fastopen = FALSE; } else diff --git a/lib/urldata.h b/lib/urldata.h index 78cd0f006..87e4b052a 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -188,6 +188,7 @@ typedef CURLcode (*Curl_datastream)(struct Curl_easy *data, #include "wildcard.h" #include "multihandle.h" #include "c-hyper.h" +#include "cf-socket.h" #ifdef HAVE_GSSAPI # ifdef HAVE_GSSGNU |