Ling Thio pointed out that getaddrinfo() reverse-lookups ip-only names, and
this is an attempt to prevent it from doing that. affects ipv6-enabled only.
This commit is contained in:
parent
62ff567c47
commit
c8c47768c7
6
CHANGES
6
CHANGES
@ -6,6 +6,12 @@
|
|||||||
|
|
||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
|
Daniel (18 August 2004)
|
||||||
|
- Ling Thio pointed out that when libcurl is built ipv6-enabled, it still did
|
||||||
|
reverse DNS lookups when fed with a numerical IP-address (like
|
||||||
|
http://127.0.0.1/), although it doesn't when built ipv6-disabled. libcurl
|
||||||
|
should never do reverse lookups.
|
||||||
|
|
||||||
Daniel (17 August 2004)
|
Daniel (17 August 2004)
|
||||||
- Kjetil Jacobsen noticed that when transferring a file:// URL pointing to an
|
- Kjetil Jacobsen noticed that when transferring a file:// URL pointing to an
|
||||||
empty file, libcurl would return with the file still open.
|
empty file, libcurl would return with the file still open.
|
||||||
|
@ -14,6 +14,9 @@ This release includes the following changes:
|
|||||||
|
|
||||||
This release includes the following bugfixes:
|
This release includes the following bugfixes:
|
||||||
|
|
||||||
|
o no more reverse DNS lookups when getting ip-only address with ipv6-enabled
|
||||||
|
libcurl
|
||||||
|
o libcurl works better multi-threaded on AIX (when built with xlc)
|
||||||
o cookies over proxy didn't match the path properly
|
o cookies over proxy didn't match the path properly
|
||||||
o MSVC makefile fixes to build better
|
o MSVC makefile fixes to build better
|
||||||
o FTP response 530 on 'PASS' now sends back a better error message
|
o FTP response 530 on 'PASS' now sends back a better error message
|
||||||
@ -25,6 +28,7 @@ Other curl-related news since the previous public release:
|
|||||||
This release would not have looked like this without help, code, reports and
|
This release would not have looked like this without help, code, reports and
|
||||||
advice from friends like these:
|
advice from friends like these:
|
||||||
|
|
||||||
Casey O'Donnell, Roland Krikava, Alex
|
Casey O'Donnell, Roland Krikava, Alex, Alexander Krasnostavsky, Kjetil
|
||||||
|
Jacobsen, Ling Thio
|
||||||
|
|
||||||
Thanks! (and sorry if I forgot to mention someone)
|
Thanks! (and sorry if I forgot to mention someone)
|
||||||
|
@ -208,9 +208,11 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
|
|||||||
struct addrinfo hints, *res;
|
struct addrinfo hints, *res;
|
||||||
int error;
|
int error;
|
||||||
char sbuf[NI_MAXSERV];
|
char sbuf[NI_MAXSERV];
|
||||||
|
char addrbuf[128];
|
||||||
curl_socket_t s;
|
curl_socket_t s;
|
||||||
int pf;
|
int pf;
|
||||||
struct SessionHandle *data = conn->data;
|
struct SessionHandle *data = conn->data;
|
||||||
|
int ai_flags;
|
||||||
|
|
||||||
*waitp=0; /* don't wait, we have the response now */
|
*waitp=0; /* don't wait, we have the response now */
|
||||||
|
|
||||||
@ -245,10 +247,17 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(1 == inet_pton(pf, addrbuf, sizeof(addrbuf))) {
|
||||||
|
/* the given address is numerical only, prevent a reverse lookup */
|
||||||
|
ai_flags = AI_NUMERICHOST;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ai_flags = AI_CANONNAME;
|
||||||
|
|
||||||
memset(&hints, 0, sizeof(hints));
|
memset(&hints, 0, sizeof(hints));
|
||||||
hints.ai_family = pf;
|
hints.ai_family = pf;
|
||||||
hints.ai_socktype = SOCK_STREAM;
|
hints.ai_socktype = SOCK_STREAM;
|
||||||
hints.ai_flags = AI_CANONNAME;
|
hints.ai_flags = ai_flags;
|
||||||
snprintf(sbuf, sizeof(sbuf), "%d", port);
|
snprintf(sbuf, sizeof(sbuf), "%d", port);
|
||||||
error = getaddrinfo(hostname, sbuf, &hints, &res);
|
error = getaddrinfo(hostname, sbuf, &hints, &res);
|
||||||
if (error) {
|
if (error) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user