]> granicus.if.org Git - curl/commitdiff
resolvers: no more using AI_CANONNAME
authorDaniel Stenberg <daniel@haxx.se>
Fri, 16 Apr 2010 13:03:52 +0000 (15:03 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 16 Apr 2010 13:03:52 +0000 (15:03 +0200)
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
lib/hostip6.c
lib/hostthre.c

index aa33fb96591db97288e77952cde5dac5da8cd154..05dd73e0aa4d6e077912e470002c4ea688a7e731 100644 (file)
@@ -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);
 
index fb3ad0c084e2c00170468eb0148b5d8299aa8af4..7d0a9122fd450806bd94964232d9cfcc8da7f23a 100644 (file)
@@ -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);
index 1e4845e2c9d2443b3a8da05ebb81700dd00a2a32..6698cd8481807b1b2e828a9342ba760907f76d7a 100644 (file)
@@ -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! */