From f3d4b17a9cf4b92778a945c00a9df9b4856b97f6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 16 Apr 2010 15:03:52 +0200 Subject: resolvers: no more using AI_CANONNAME No resolver anymore needs to use AI_CANONNAME and do reverse lookups. We should work hard to avoid having code that relies on it. --- lib/hostip4.c | 5 ----- lib/hostip6.c | 5 ----- lib/hostthre.c | 4 +--- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/lib/hostip4.c b/lib/hostip4.c index aa33fb965..05dd73e0a 100644 --- a/lib/hostip4.c +++ b/lib/hostip4.c @@ -160,11 +160,6 @@ Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname, snprintf(sbuf, sizeof(sbuf), "%d", port); sbufptr = sbuf; } -#ifdef HAVE_GSSAPI - if(conn->data->set.krb) - /* if krb is used, we (might) need the canonical host name */ - hints.ai_flags |= AI_CANONNAME; -#endif (void)Curl_getaddrinfo_ex(hostname, sbufptr, &hints, &ai); diff --git a/lib/hostip6.c b/lib/hostip6.c index fb3ad0c08..7d0a9122f 100644 --- a/lib/hostip6.c +++ b/lib/hostip6.c @@ -213,11 +213,6 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn, /* the given address is numerical only, prevent a reverse lookup */ hints.ai_flags = AI_NUMERICHOST; } -#ifdef HAVE_GSSAPI - if(conn->data->set.krb) - /* if krb is used, we (might) need the canonical host name */ - hints.ai_flags |= AI_CANONNAME; -#endif if(port) { snprintf(sbuf, sizeof(sbuf), "%d", port); diff --git a/lib/hostthre.c b/lib/hostthre.c index 1e4845e2c..6698cd848 100644 --- a/lib/hostthre.c +++ b/lib/hostthre.c @@ -561,9 +561,7 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn, memset(&hints, 0, sizeof(hints)); hints.ai_family = pf; hints.ai_socktype = conn->socktype; -#if 0 /* removed nov 8 2005 before 7.15.1 */ - hints.ai_flags = AI_CANONNAME; -#endif + snprintf(sbuf, sizeof(sbuf), "%d", port); /* fire up a new resolver thread! */ -- cgit v1.2.3