Commit a231a968 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

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

should result in a reverse dns lookup
parent 93b61bf0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
  }