summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-bug68423.patch55
-rw-r--r--php56.spec7
2 files changed, 61 insertions, 1 deletions
diff --git a/php-bug68423.patch b/php-bug68423.patch
new file mode 100644
index 0000000..34ba57a
--- /dev/null
+++ b/php-bug68423.patch
@@ -0,0 +1,55 @@
+From 23db11976889c3600cf7853fe0fd687a1c9435e6 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@php.net>
+Date: Fri, 14 Nov 2014 17:29:31 +0100
+Subject: [PATCH] Fix bug #68423i PHP-FPM will no longer load all pools
+
+The hash need to be unique per IP + Port
+Previous version have (IPv4 only)
+ sprintf(key, "%u.%u.%u.%u:%u", IPQUAD(&sa_in->sin_addr), (unsigned int) ntohs(sa_in->sin_port));
+---
+ sapi/fpm/fpm/fpm_sockets.c | 17 ++++++++++++++---
+ 1 file changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/sapi/fpm/fpm/fpm_sockets.c b/sapi/fpm/fpm/fpm_sockets.c
+index da14d63..3e4f09c 100644
+--- a/sapi/fpm/fpm/fpm_sockets.c
++++ b/sapi/fpm/fpm/fpm_sockets.c
+@@ -85,13 +85,24 @@ static void *fpm_get_in_addr(struct sockaddr *sa) /* {{{ */
+ }
+ /* }}} */
+
++static int fpm_get_in_port(struct sockaddr *sa) /* {{{ */
++{
++ if (sa->sa_family == AF_INET) {
++ return ntohs(((struct sockaddr_in*)sa)->sin_port);
++ }
++
++ return ntohs(((struct sockaddr_in6*)sa)->sin6_port);
++}
++/* }}} */
++
+ static int fpm_sockets_hash_op(int sock, struct sockaddr *sa, char *key, int type, int op) /* {{{ */
+ {
+ if (key == NULL) {
+ switch (type) {
+ case FPM_AF_INET : {
+- key = alloca(INET6_ADDRSTRLEN);
+- inet_ntop(sa->sa_family, fpm_get_in_addr(sa), key, sizeof key);
++ key = alloca(INET6_ADDRSTRLEN+10);
++ inet_ntop(sa->sa_family, fpm_get_in_addr(sa), key, INET6_ADDRSTRLEN);
++ sprintf(key+strlen(key), ":%d", fpm_get_in_port(sa));
+ break;
+ }
+
+@@ -246,7 +257,7 @@ static int fpm_socket_af_inet_listening_socket(struct fpm_worker_pool_s *wp) /*
+ char *addr = NULL;
+ int addr_len;
+ int port = 0;
+- int sock;
++ int sock = -1;
+ int status;
+
+ if (port_str) { /* this is host:port pair */
+--
+2.1.0
+
diff --git a/php56.spec b/php56.spec
index fe0fd6e..3e290fe 100644
--- a/php56.spec
+++ b/php56.spec
@@ -135,7 +135,7 @@ Version: 5.6.3
%if 0%{?snapdate:1}%{?rcver:1}
Release: 0.4.%{?snapdate}%{?rcver}%{?dist}
%else
-Release: 1%{?dist}
+Release: 2%{?dist}
%endif
# All files licensed under PHP version 3.01, except
# Zend is licensed under Zend
@@ -198,6 +198,7 @@ Patch91: php-5.6.3-oci8conf.patch
# Upstream fixes (100+)
Patch100: php-gmp41.patch
+Patch101: php-bug68423.patch
# Security fixes (200+)
@@ -956,6 +957,7 @@ rm -rf ext/json
# upstream patches
%patch100 -p1 -b .gmp41
+%patch101 -p1 -b .bug68423
# security patches
@@ -1945,6 +1947,9 @@ fi
%changelog
+* Fri Nov 14 2014 Remi Collet <remi@fedoraproject.org> 5.6.3-2
+- add upstream patch for https://bugs.php.net/68423
+
* Thu Nov 13 2014 Remi Collet <remi@fedoraproject.org> 5.6.3-1
- Update to PHP 5.6.3
http://php.net/releases/5_6_3.php