mirror of
https://github.com/curl/curl.git
synced 2026-04-30 09:07:55 +03: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:
parent
93b61bf0d3
commit
a231a96841
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue