summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2016-05-06 20:11:26 -0700
committerZac Medico <zmedico@gentoo.org>2016-05-06 20:15:06 -0700
commitb5ba1ddb6b1eb7fb418d9e8f268fae2dd06d44d2 (patch)
treec33abefeba4eb70d99ec004d3842c4011fdf57c1 /www-servers/nginx
parentapp-emulation/docker: remove unused files (diff)
downloadgentoo-b5ba1ddb6b1eb7fb418d9e8f268fae2dd06d44d2.tar.gz
gentoo-b5ba1ddb6b1eb7fb418d9e8f268fae2dd06d44d2.tar.bz2
gentoo-b5ba1ddb6b1eb7fb418d9e8f268fae2dd06d44d2.zip
www-servers/nginx: add segfault fix to 1.10.0 for http_upstream_check (bug 582316)
Package-Manager: portage-2.2.28
Diffstat (limited to 'www-servers/nginx')
-rw-r--r--www-servers/nginx/files/check-0.3.0-segfault-on-reload.patch26
-rw-r--r--www-servers/nginx/nginx-1.10.0.ebuild3
2 files changed, 29 insertions, 0 deletions
diff --git a/www-servers/nginx/files/check-0.3.0-segfault-on-reload.patch b/www-servers/nginx/files/check-0.3.0-segfault-on-reload.patch
new file mode 100644
index 00000000000..f556aab6fc6
--- /dev/null
+++ b/www-servers/nginx/files/check-0.3.0-segfault-on-reload.patch
@@ -0,0 +1,26 @@
+From 2a52fbf565d0d5bdc9f25382b5af6e952216831f Mon Sep 17 00:00:00 2001
+From: Dmitry Saprykin <saprykin.dmitry@gmail.com>
+Date: Fri, 5 Dec 2014 11:46:18 +0300
+Subject: [PATCH] * serfault on reload fix
+
+---
+ ngx_http_upstream_check_module.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/ngx_http_upstream_check_module.c b/ngx_http_upstream_check_module.c
+index e2a4030..41aa63a 100644
+--- a/ngx_http_upstream_check_module.c
++++ b/ngx_http_upstream_check_module.c
+@@ -3991,9 +3991,9 @@ ngx_http_upstream_check_find_shm_peer(ngx_http_upstream_check_peers_shm_t *p,
+ continue;
+ }
+
+- if ((ngx_memcmp(addr->sockaddr, peer_shm->sockaddr, addr->socklen) == 0)
+- && (ngx_strncmp(upstream_name->data, peer_shm->upstream_name->data,
+- upstream_name->len) == 0)) {
++ if (ngx_memcmp(addr->sockaddr, peer_shm->sockaddr, addr->socklen) == 0
++ && upstream_name->len == peer_shm->upstream_name->len
++ && ngx_strncmp(upstream_name->data, peer_shm->upstream_name->data, upstream_name->len) == 0) {
+ return peer_shm;
+ }
+ }
diff --git a/www-servers/nginx/nginx-1.10.0.ebuild b/www-servers/nginx/nginx-1.10.0.ebuild
index 159f891dcad..ef851c40213 100644
--- a/www-servers/nginx/nginx-1.10.0.ebuild
+++ b/www-servers/nginx/nginx-1.10.0.ebuild
@@ -329,6 +329,9 @@ src_prepare() {
if use nginx_modules_http_upstream_check; then
eapply -p0 "${FILESDIR}/check-1.9.2".patch
+ pushd "${HTTP_UPSTREAM_CHECK_MODULE_WD}" >/dev/null
+ eapply -p1 "${FILESDIR}/check-0.3.0-segfault-on-reload".patch
+ popd >/dev/null
fi
if use nginx_modules_http_lua; then