aboutsummaryrefslogtreecommitdiff
path: root/lib/hostip6.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-11-08 14:45:58 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-11-08 14:45:58 +0000
commitcab59b4c3209baa5f067b5c2339748a4669b3662 (patch)
tree10b2364a98396de3ecfb7016efa7bf73842cf35c /lib/hostip6.c
parent931eff89f52994365e20c8b45fd7498933cbf5be (diff)
Removed the use of AI_CANONNAME in the IPv6-enabled resolver functions since
we really have no use for reverse lookups of the address. I truly hope these are the last reverse lookups we had lingering in the code!
Diffstat (limited to 'lib/hostip6.c')
-rw-r--r--lib/hostip6.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/hostip6.c b/lib/hostip6.c
index 775ba9147..04ebaedee 100644
--- a/lib/hostip6.c
+++ b/lib/hostip6.c
@@ -228,7 +228,6 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
curl_socket_t s;
int pf;
struct SessionHandle *data = conn->data;
- int ai_flags;
*waitp=0; /* don't wait, we have the response now */
@@ -263,20 +262,20 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
}
}
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = pf;
+ hints.ai_socktype = conn->socktype;
+
if((1 == Curl_inet_pton(AF_INET, hostname, addrbuf)) ||
(1 == Curl_inet_pton(AF_INET6, hostname, addrbuf))) {
/* the given address is numerical only, prevent a reverse lookup */
- ai_flags = AI_NUMERICHOST;
+ hints.ai_flags = AI_NUMERICHOST;
}
+#if 0 /* removed nov 8 2005 before 7.15.1 */
else
- ai_flags = AI_CANONNAME;
-
- memset(&hints, 0, sizeof(hints));
- hints.ai_family = pf;
-
- hints.ai_socktype = conn->socktype;
+ hints.ai_flags = AI_CANONNAME;
+#endif
- hints.ai_flags = ai_flags;
if(port) {
snprintf(sbuf, sizeof(sbuf), "%d", port);
sbufptr=sbuf;