mirror of
https://github.com/curl/curl.git
synced 2026-08-26 02:43:31 +03:00
IPv6 adjustments, connect()ing to bad ports still don't work properly for
IPv6
This commit is contained in:
parent
51ca5fcbe0
commit
ced8955325
2 changed files with 78 additions and 41 deletions
|
|
@ -1949,7 +1949,7 @@ static CURLcode CreateConnection(struct SessionHandle *data,
|
|||
if(!conn->hostaddr) {
|
||||
/* it might already be set if reusing a connection */
|
||||
conn->hostaddr = Curl_getaddrinfo(data, conn->name, conn->port,
|
||||
&conn->hostent_buf);
|
||||
&conn->hostent_buf);
|
||||
}
|
||||
if(!conn->hostaddr) {
|
||||
failf(data, "Couldn't resolve host '%s'", conn->name);
|
||||
|
|
@ -1963,7 +1963,7 @@ static CURLcode CreateConnection(struct SessionHandle *data,
|
|||
/* resolve proxy */
|
||||
/* it might already be set if reusing a connection */
|
||||
conn->hostaddr = Curl_getaddrinfo(data, conn->proxyhost, conn->port,
|
||||
&conn->hostent_buf);
|
||||
&conn->hostent_buf);
|
||||
|
||||
if(!conn->hostaddr) {
|
||||
failf(data, "Couldn't resolve proxy '%s'", conn->proxyhost);
|
||||
|
|
@ -2040,7 +2040,7 @@ static CURLcode CreateConnection(struct SessionHandle *data,
|
|||
#else
|
||||
const int niflags = NI_NUMERICHOST;
|
||||
#endif
|
||||
struct addrinfo *ai = conn->ai;
|
||||
struct addrinfo *ai = conn->serv_addr;
|
||||
|
||||
if (getnameinfo(ai->ai_addr, ai->ai_addrlen, hbuf, sizeof(hbuf), NULL, 0,
|
||||
niflags)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue