Need the AI_PASSIVE flag when using dns lookups with bind().
authorRyan C. Gordon <icculus@icculus.org>
Fri, 06 Nov 2009 11:55:33 -0800
changeset 137 41d5f45750d0
parent 136 d914c6063504
child 138 b4ce72a2568a
Need the AI_PASSIVE flag when using dns lookups with bind().
nph-offload.c
--- a/nph-offload.c	Fri Nov 06 11:12:23 2009 -0800
+++ b/nph-offload.c	Fri Nov 06 11:55:33 2009 -0800
@@ -1985,7 +1985,7 @@
     memset(&hints, '\0', sizeof (hints));
     hints.ai_family = GLISTENFAMILY;
     hints.ai_socktype = SOCK_STREAM;
-    hints.ai_flags = AI_NUMERICSERV | AI_V4MAPPED | AI_ALL | AI_ADDRCONFIG;
+    hints.ai_flags = AI_NUMERICSERV | AI_V4MAPPED | AI_ALL | AI_ADDRCONFIG | AI_PASSIVE;
 
     int rc = -1;
     struct addrinfo *dns = NULL;