Index: crypto/bio/b_sock.c
===================================================================
RCS file: /v/openssl/cvs/openssl/crypto/bio/b_sock.c,v
retrieving revision 1.49.2.9.2.1
diff -u -r1.49.2.9.2.1 b_sock.c
--- crypto/bio/b_sock.c	19 Mar 2011 09:47:27 -0000	1.49.2.9.2.1
+++ crypto/bio/b_sock.c	8 May 2011 12:30:09 -0000
@@ -683,6 +683,7 @@
 	 * note that commonly IPv6 wildchard socket can service
 	 * IPv4 connections just as well...  */
 	memset(&hint,0,sizeof(hint));
+	hint.ai_flags = AI_PASSIVE;
 	if (h)
 		{
 		if (strchr(h,':'))
@@ -695,7 +696,10 @@
 #endif
 			}
 	    	else if (h[0]=='*' && h[1]=='\0')
+			{
+			hint.ai_family = AF_INET;
 			h=NULL;
+			}
 		}
 
 	if ((*p_getaddrinfo.f)(h,p,&hint,&res)) break;
