diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2009-09-30 20:48:41 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2009-09-30 20:48:41 +0000 |
commit | d35c2b14ddf5410459e05bfbbcb02cd9a52dc56a (patch) | |
tree | 4b9e2183a342c36ddf5463591c4f8dc2a83c878a /main/network.c | |
parent | 9408303390b0c4b212a5901541aba6ae2027a910 (diff) | |
download | php-git-d35c2b14ddf5410459e05bfbbcb02cd9a52dc56a.tar.gz |
Fixed bug #48805 (IPv6 socket transport is not working).
Diffstat (limited to 'main/network.c')
-rw-r--r-- | main/network.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/network.c b/main/network.c index 9f8c729e80..fcadcafbea 100644 --- a/main/network.c +++ b/main/network.c @@ -792,7 +792,7 @@ php_socket_t php_network_connect_socket_to_host(const char *host, unsigned short switch (sa->sa_family) { #if HAVE_GETADDRINFO && HAVE_IPV6 case AF_INET6: - if (bindto && strchr(bindto, ':')) { + if (!bindto || strchr(bindto, ':')) { ((struct sockaddr_in6 *)sa)->sin6_family = sa->sa_family; ((struct sockaddr_in6 *)sa)->sin6_port = htons(port); socklen = sizeof(struct sockaddr_in6); |