- Update connection info when using UNIX socket as endpoint connect-fix-Curl_updateconninfo-for-TRNSPRT_UNIX.patch OBS-URL: https://build.opensuse.org/request/show/1008961 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/curl?expand=0&rev=319
43 lines
1.4 KiB
Diff
43 lines
1.4 KiB
Diff
From 4232e1ac84ff4c2f46807b68a93efdbb31ff22a2 Mon Sep 17 00:00:00 2001
|
|
From: Daniel Stenberg <daniel@haxx.se>
|
|
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
|
|
|