]> granicus.if.org Git - curl/commitdiff
actually, we check for a numerical host using either ipv4 or ipv6, as neither
authorDaniel Stenberg <daniel@haxx.se>
Fri, 20 Aug 2004 09:18:12 +0000 (09:18 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 20 Aug 2004 09:18:12 +0000 (09:18 +0000)
should result in a reverse dns lookup

lib/hostip6.c

index d01c4476e441d134faad988779cbb5f300b02c1a..e7279425127b1d246116e20259d51e8d2d6b7618 100644 (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;
   }