remove |#ifdef AI_ADDRCONFIG| block since AI_ADDRCONFIG may be defined NSPR_GETADDRINFO_BRANCH
authordarin%meer.net
Wed, 13 Aug 2003 23:55:21 +0000
branchNSPR_GETADDRINFO_BRANCH
changeset 2886 72b0d5eb81130e4fe8b95150ac9454437fa5b3db
parent 2885 51570dc92435046fbc04ba0c6ccec5a95012caf0
push idunknown
push userunknown
push dateunknown
remove |#ifdef AI_ADDRCONFIG| block since AI_ADDRCONFIG may be defined for use with getipnodebyname, but have no meaning when used with getaddrinfo. (patch suggested by wtc)
pr/src/misc/prnetdb.c
--- a/pr/src/misc/prnetdb.c
+++ b/pr/src/misc/prnetdb.c
@@ -2070,27 +2070,26 @@ PR_IMPLEMENT(PRAddrInfo *) PR_GetAddrInf
     if (!_pr_ipv6_is_present) {
         return pr_GetAddrInfoByNameFB(hostname, af, flags);
     }
 #endif
     {
         PRADDRINFO *res, hints;
         PRStatus rv;
 
+        /*
+         * we assume a RFC 2553 compliant getaddrinfo.  this may at some
+         * point need to be customized as platforms begin to adopt the
+         * RFC 3493.
+         */
+
         memset(&hints, 0, sizeof(hints));
         hints.ai_flags = AI_CANONNAME;
         hints.ai_family = AF_UNSPEC;
 
-#ifdef AI_ADDRCONFIG
-        /* By default, only look up addresses using address types for
-         * which a local interface is configured (i.e. no IPv6 if no IPv6
-         * interfaces. NOTE: do this only if ai_family is PF_UNSPEC. */
-        hints.ai_flags |= AI_ADDRCONFIG;
-#endif
-        
         rv = GETADDRINFO(hostname, NULL, &hints, &res);
         if (rv == 0)
             return (PRAddrInfo *) res;
 
         PR_SetError(PR_DIRECTORY_LOOKUP_ERROR, rv);
     }
     return NULL;
 #endif