1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

actually, we check for a numerical host using either ipv4 or ipv6, as neither

should result in a reverse dns lookup
This commit is contained in:
Daniel Stenberg 2004-08-20 09:18:12 +00:00
parent 93b61bf0d3
commit a231a96841

View File

@ -247,7 +247,8 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
}
}
if(1 == inet_pton(pf, hostname, addrbuf)) {
if((1 == inet_pton(AF_INET, hostname, addrbuf)) ||
(1 == inet_pton(AF_INET6, hostname, addrbuf))) {
/* the given address is numerical only, prevent a reverse lookup */
ai_flags = AI_NUMERICHOST;
}