From: Pierre Joye Date: Sat, 10 Oct 2009 12:21:08 +0000 (+0000) Subject: - Merge: Fixed bug #48805 (IPv6 socket transport is not working) X-Git-Tag: php-5.3.1RC2~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6425b074be223150cb125d07b2908adc28e56a17;p=php - Merge: Fixed bug #48805 (IPv6 socket transport is not working) --- 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);