Use AI_ADDRCONFIG unconditionally in kpropd
authorGreg Hudson <ghudson@mit.edu>
Thu, 23 Jun 2011 04:13:32 +0000 (04:13 +0000)
committerGreg Hudson <ghudson@mit.edu>
Thu, 23 Jun 2011 04:13:32 +0000 (04:13 +0000)
fake-addrinfo.h ensures that AI_ADDRCONFIG is defined, so we don't
need #ifdef tests when we use it.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24976 dc483132-0cff-0310-8789-dd5450dbe970

src/slave/kpropd.c

index 259d633681248c339e56b2e2b80a77cbd8ea2ba4..d20d86561c101d91494401748c1073dd7fa28978 100644 (file)
@@ -245,11 +245,7 @@ get_wildcard_addr(struct addrinfo **res)
 
     memset(&hints, 0, sizeof(hints));
     hints.ai_socktype = SOCK_STREAM;
-    hints.ai_flags = AI_PASSIVE;
-#ifdef AI_ADDRCONFIG
-    /* Try to avoid IPv6 if the host has no IPv6 interface addresses. */
-    hints.ai_flags |= AI_ADDRCONFIG;
-#endif
+    hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;
 #ifdef KRB5_USE_INET6
     hints.ai_family = AF_INET6;
     error = getaddrinfo(NULL, port, &hints, res);