From: Ilia Alshanetsky Date: Wed, 30 Sep 2009 20:48:41 +0000 (+0000) Subject: Fixed bug #48805 (IPv6 socket transport is not working). X-Git-Tag: php-5.3.2RC1~415 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d35c2b14ddf5410459e05bfbbcb02cd9a52dc56a;p=php Fixed bug #48805 (IPv6 socket transport is not working). --- diff --git a/NEWS b/NEWS index 936ac9033f..822bad05ff 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,7 @@ cannot be set"). (Felipe) - Fixed bug #49517 (cURL's CURLOPT_FILE prevents file from being deleted after fclose). (Ilia) +- Fixed bug #48805 (IPv6 socket transport is not working). (Ilia) ?? ??? 2009, PHP 5.3.1RC? <- WHY IS THIS HERE? Gonna be released after 5.3.1 or what?? - Upgraded bundled sqlite to version 3.6.18. (Ilia) 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);