diff options
author | Daniel Stenberg <daniel@haxx.se> | 2022-10-07 18:10:05 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2022-10-08 11:45:20 +0200 |
commit | 4232e1ac84ff4c2f46807b68a93efdbb31ff22a2 (patch) | |
tree | c4f79ae16f78725da6f82b716137e02122a897cf /lib/connect.c | |
parent | c02291fd472d73de869e94d3336f52721bb0d710 (diff) | |
download | curl-4232e1ac84ff4c2f46807b68a93efdbb31ff22a2.tar.gz |
connect: fix Curl_updateconninfo for TRNSPRT_UNIX
Reported-by: Vasiliy Ulyanov
Fixes #9664
Closes #9670
Diffstat (limited to 'lib/connect.c')
-rw-r--r-- | lib/connect.c | 16 |
1 files 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); |