summaryrefslogtreecommitdiff
path: root/main/network.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2009-09-30 20:48:41 +0000
committerIlia Alshanetsky <iliaa@php.net>2009-09-30 20:48:41 +0000
commitd35c2b14ddf5410459e05bfbbcb02cd9a52dc56a (patch)
tree4b9e2183a342c36ddf5463591c4f8dc2a83c878a /main/network.c
parent9408303390b0c4b212a5901541aba6ae2027a910 (diff)
downloadphp-git-d35c2b14ddf5410459e05bfbbcb02cd9a52dc56a.tar.gz
Fixed bug #48805 (IPv6 socket transport is not working).
Diffstat (limited to 'main/network.c')
-rw-r--r--main/network.c2
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);