diff --git a/connect-fix-Curl_updateconninfo-for-TRNSPRT_UNIX.patch b/connect-fix-Curl_updateconninfo-for-TRNSPRT_UNIX.patch new file mode 100644 index 0000000..0aae964 --- /dev/null +++ b/connect-fix-Curl_updateconninfo-for-TRNSPRT_UNIX.patch @@ -0,0 +1,42 @@ +From 4232e1ac84ff4c2f46807b68a93efdbb31ff22a2 Mon Sep 17 00:00:00 2001 +From: Daniel Stenberg +Date: Fri, 7 Oct 2022 18:10:05 +0200 +Subject: [PATCH] connect: fix Curl_updateconninfo for TRNSPRT_UNIX + +Reported-by: Vasiliy Ulyanov +Fixes #9664 +Closes #9670 +--- + lib/connect.c | 16 ++++------------ + 1 file changed, 4 insertions(+), 12 deletions(-) + +diff --git a/lib/connect.c b/lib/connect.c +index c1d8cfd39..9dc14704d 100644 +--- a/lib/connect.c ++++ b/lib/connect.c +@@ -762,18 +762,10 @@ void Curl_updateconninfo(struct Curl_easy *data, struct connectdata *conn, + char local_ip[MAX_IPADR_LEN] = ""; + int local_port = -1; + +- if(conn->transport == TRNSPRT_TCP) { +- if(!conn->bits.reuse && !conn->bits.tcp_fastopen) +- Curl_conninfo_remote(data, conn, sockfd); +- Curl_conninfo_local(data, sockfd, local_ip, &local_port); +- } /* end of TCP-only section */ +-#ifdef ENABLE_QUIC +- else if(conn->transport == TRNSPRT_QUIC) { +- if(!conn->bits.reuse) +- Curl_conninfo_remote(data, conn, sockfd); +- Curl_conninfo_local(data, sockfd, local_ip, &local_port); +- } +-#endif ++ if(!conn->bits.reuse && ++ (conn->transport != TRNSPRT_TCP || !conn->bits.tcp_fastopen)) ++ Curl_conninfo_remote(data, conn, sockfd); ++ Curl_conninfo_local(data, sockfd, local_ip, &local_port); + + /* persist connection info in session handle */ + Curl_persistconninfo(data, conn, local_ip, local_port); +-- +2.37.3 + diff --git a/curl.changes b/curl.changes index 7f276fe..17dcddb 100644 --- a/curl.changes +++ b/curl.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Oct 8 17:06:50 UTC 2022 - Vasily Ulyanov + +- Update connection info when using UNIX socket as endpoint + connect-fix-Curl_updateconninfo-for-TRNSPRT_UNIX.patch + ------------------------------------------------------------------- Wed Aug 31 07:34:20 UTC 2022 - Pedro Monreal diff --git a/curl.spec b/curl.spec index 846528a..5296524 100644 --- a/curl.spec +++ b/curl.spec @@ -35,6 +35,7 @@ Patch1: dont-mess-with-rpmoptflags.patch Patch2: curl-secure-getenv.patch #PATCH-FIX-OPENSUSE bsc#1076446 protocol redirection not supported or disabled Patch3: curl-disabled-redirect-protocol-message.patch +Patch4: connect-fix-Curl_updateconninfo-for-TRNSPRT_UNIX.patch BuildRequires: libtool BuildRequires: pkgconfig Requires: libcurl4 = %{version}