mirror of
https://github.com/curl/curl.git
synced 2025-03-01 15:15:34 +08:00
connect: fix Curl_updateconninfo for TRNSPRT_UNIX
Reported-by: Vasiliy Ulyanov Fixes #9664 Closes #9670
This commit is contained in:
parent
c02291fd47
commit
4232e1ac84
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user