jorton 2003/09/29 12:08:16
Modified: network_io/unix Tag: APR_0_9_BRANCH sockaddr.c
Log:
Revert rev1.38 on 0.9 branch pending further testing on HEAD;
rev1.38 was:
Use AI_ADDRCONFIG flag by default, where available.
* sockaddr.c (call_resolver): For lookups of AF_UNSPEC addresses, set
the AI_ADDRCONFIG flag; retry without the flag if getaddrinfo returns
EAI_BADFLAGS.
Revision Changes Path
No revision
No revision
1.43.2.2 +0 -15 apr/network_io/unix/sockaddr.c
Index: sockaddr.c
===================================================================
RCS file: /home/cvs/apr/network_io/unix/sockaddr.c,v
retrieving revision 1.43.2.1
retrieving revision 1.43.2.2
diff -u -u -r1.43.2.1 -r1.43.2.2
--- sockaddr.c 9 Sep 2003 19:45:01 -0000 1.43.2.1
+++ sockaddr.c 29 Sep 2003 19:08:15 -0000 1.43.2.2
@@ -374,14 +374,6 @@
memset(&hints, 0, sizeof(hints));
hints.ai_family = family;
hints.ai_socktype = SOCK_STREAM;
-#ifdef AI_ADDRCONFIG
- if (family == AF_UNSPEC) {
- /* By default, only look up addresses using address types for
- * which a local interface is configured, i.e. no IPv6 if no
- * IPv6 interfaces configured. */
- hints.ai_flags = AI_ADDRCONFIG;
- }
-#endif
if(hostname == NULL) {
#ifdef AI_PASSIVE
/* If hostname is NULL, assume we are trying to bind to all
@@ -404,13 +396,6 @@
servname = apr_itoa(p, port);
}
error = getaddrinfo(hostname, servname, &hints, &ai_list);
-#ifdef AI_ADDRCONFIG
- if (error == EAI_BADFLAGS && family == AF_UNSPEC) {
- /* Retry with no flags if AI_ADDRCONFIG was rejected. */
- hints.ai_flags = 0;
- error = getaddrinfo(hostname, servname, &hints, &ai_list);
- }
-#endif
if (error) {
#ifndef WIN32
if (error == EAI_SYSTEM) {