]> granicus.if.org Git - php/commitdiff
Fixed bug #48805 (IPv6 socket transport is not working).
authorIlia Alshanetsky <iliaa@php.net>
Wed, 30 Sep 2009 20:48:41 +0000 (20:48 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 30 Sep 2009 20:48:41 +0000 (20:48 +0000)
NEWS
main/network.c

diff --git a/NEWS b/NEWS
index 936ac9033fe836da40df7d218519a013650248f1..822bad05ff75801ae222463216cadd9c7f9fbf04 100644 (file)
--- 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)
index 9f8c729e807e80fab012ea2a902ea45ae83f0458..fcadcafbeaae0f1620897e1ff1308f5bbf9d6824 100644 (file)
@@ -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);