projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
61aa213
)
Refine login in b_sock.c.
author
Andy Polyakov
<appro@openssl.org>
Mon, 2 Jan 2006 16:05:26 +0000
(16:05 +0000)
committer
Andy Polyakov
<appro@openssl.org>
Mon, 2 Jan 2006 16:05:26 +0000
(16:05 +0000)
crypto/bio/b_sock.c
patch
|
blob
|
history
diff --git
a/crypto/bio/b_sock.c
b/crypto/bio/b_sock.c
index bbf627de55fb513d2dab9eefb220d49947e4e929..fd45bec3316017384e5600d343a461745a3bd23f 100644
(file)
--- a/
crypto/bio/b_sock.c
+++ b/
crypto/bio/b_sock.c
@@
-640,7
+640,21
@@
int BIO_get_accept_socket(char *host, int bind_mode)
* note that commonly IPv6 wildchard socket can service
* IPv4 connections just as well... */
memset(&hint,0,sizeof(hint));
* note that commonly IPv6 wildchard socket can service
* IPv4 connections just as well... */
memset(&hint,0,sizeof(hint));
- if (h && strchr(h,':')) hint.ai_family = AF_INET6;
+ if (h)
+ {
+ if (strchr(h,':'))
+ {
+ if (h[1]=='\0') h=NULL;
+#ifdef AF_INET6
+ hint.ai_family = AF_INET6;
+#else
+ h=NULL;
+#endif
+ }
+ else if (h[0]=='*' && h[1]=='\0')
+ h=NULL;
+ }
+
if ((*getaddrinfo.f)(h,p,&hint,&res)) break;
server = *res->ai_addr;
(*freeaddrinfo.f)(res);
if ((*getaddrinfo.f)(h,p,&hint,&res)) break;
server = *res->ai_addr;
(*freeaddrinfo.f)(res);