From a69ba3efe32d3f22a8a1f1769969d194ef7387ca Mon Sep 17 00:00:00 2001 From: heil Date: Mon, 25 Jan 2016 17:00:31 +0100 Subject: [PATCH] haproxy: add pending patches from upstream - [PATCH 11/13] BUG/MEDIUM: peers: table entries learned from a remote - [PATCH 12/13] BUG/MEDIUM: peers: old stick table updates could be - [PATCH 13/13] CLEANUP: haproxy: using _GNU_SOURCE instead of Signed-off-by: heil --- net/haproxy/Makefile | 2 +- ...-table-entries-learned-from-a-remote.patch | 31 +++++++++++++ ...-old-stick-table-updates-could-be-re.patch | 28 ++++++++++++ ...using-_GNU_SOURCE-instead-of-__USE_G.patch | 43 +++++++++++++++++++ 4 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 net/haproxy/patches/0011-BUG-MEDIUM-peers-table-entries-learned-from-a-remote.patch create mode 100644 net/haproxy/patches/0012-BUG-MEDIUM-peers-old-stick-table-updates-could-be-re.patch create mode 100644 net/haproxy/patches/0013-CLEANUP-haproxy-using-_GNU_SOURCE-instead-of-__USE_G.patch diff --git a/net/haproxy/Makefile b/net/haproxy/Makefile index 5138e7c3da..949cac7b9d 100644 --- a/net/haproxy/Makefile +++ b/net/haproxy/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=haproxy PKG_VERSION:=1.5.15 -PKG_RELEASE:=10 +PKG_RELEASE:=13 PKG_SOURCE:=haproxy-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://haproxy.1wt.eu/download/1.5/src/ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) diff --git a/net/haproxy/patches/0011-BUG-MEDIUM-peers-table-entries-learned-from-a-remote.patch b/net/haproxy/patches/0011-BUG-MEDIUM-peers-table-entries-learned-from-a-remote.patch new file mode 100644 index 0000000000..ae23e26fac --- /dev/null +++ b/net/haproxy/patches/0011-BUG-MEDIUM-peers-table-entries-learned-from-a-remote.patch @@ -0,0 +1,31 @@ +From 96a1b4a969a5f3c9224d786c79e90d15a47094b0 Mon Sep 17 00:00:00 2001 +From: Emeric Brun +Date: Wed, 16 Dec 2015 15:16:46 +0100 +Subject: [PATCH 11/13] BUG/MEDIUM: peers: table entries learned from a remote + are pushed to others after a random delay. + +New sticktable entries learned from a remote peer can be pushed to others after +a random delay because they are not inserted at the right position in the updates +tree. +(cherry picked from commit 234fc3c31e751f8191b9b78fa5fd16663c2627fe) +(cherry picked from commit 8b1a697362977b8392caca3efaf97a5a8a8c782b) +--- + src/peers.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/peers.c b/src/peers.c +index 0564d3d..92b4df0 100644 +--- a/src/peers.c ++++ b/src/peers.c +@@ -720,7 +720,7 @@ switchstate: + ts = stktable_store(ps->table->table, newts, 0); + newts = NULL; /* don't reuse it */ + +- ts->upd.key= (++ps->table->table->update)+(2^31); ++ ts->upd.key= (++ps->table->table->update)+(2147483648U); + eb = eb32_insert(&ps->table->table->updates, &ts->upd); + if (eb != &ts->upd) { + eb32_delete(eb); +-- +2.4.10 + diff --git a/net/haproxy/patches/0012-BUG-MEDIUM-peers-old-stick-table-updates-could-be-re.patch b/net/haproxy/patches/0012-BUG-MEDIUM-peers-old-stick-table-updates-could-be-re.patch new file mode 100644 index 0000000000..1bd4653f00 --- /dev/null +++ b/net/haproxy/patches/0012-BUG-MEDIUM-peers-old-stick-table-updates-could-be-re.patch @@ -0,0 +1,28 @@ +From a320fd146f802a851a396b2cde491711a4fb87cf Mon Sep 17 00:00:00 2001 +From: Emeric Brun +Date: Wed, 16 Dec 2015 15:28:12 +0100 +Subject: [PATCH 12/13] BUG/MEDIUM: peers: old stick table updates could be + repushed. + +Because the stick table updates tree was not properly initialized to EB_ROOT_UNIQUE. +(cherry picked from commit 1c6235dbba0a67bad1d5e57ada88f28e1270a5cb) +(cherry picked from commit 6e80935a77c8c2c67a982780a0f14c241f02f2aa) +--- + src/stick_table.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/stick_table.c b/src/stick_table.c +index 48d5710..6310690 100644 +--- a/src/stick_table.c ++++ b/src/stick_table.c +@@ -385,6 +385,7 @@ int stktable_init(struct stktable *t) + if (t->size) { + memset(&t->keys, 0, sizeof(t->keys)); + memset(&t->exps, 0, sizeof(t->exps)); ++ t->updates = EB_ROOT_UNIQUE; + + t->pool = create_pool("sticktables", sizeof(struct stksess) + t->data_size + t->key_size, MEM_F_SHARED); + +-- +2.4.10 + diff --git a/net/haproxy/patches/0013-CLEANUP-haproxy-using-_GNU_SOURCE-instead-of-__USE_G.patch b/net/haproxy/patches/0013-CLEANUP-haproxy-using-_GNU_SOURCE-instead-of-__USE_G.patch new file mode 100644 index 0000000000..88a11576dc --- /dev/null +++ b/net/haproxy/patches/0013-CLEANUP-haproxy-using-_GNU_SOURCE-instead-of-__USE_G.patch @@ -0,0 +1,43 @@ +From 21fab69d332bfafd0a214ee29d8ad0779a055988 Mon Sep 17 00:00:00 2001 +From: David Carlier +Date: Tue, 8 Dec 2015 21:43:09 +0000 +Subject: [PATCH 13/13] CLEANUP: haproxy: using _GNU_SOURCE instead of + __USE_GNU macro. + +In order to properly enable sched_setaffinity, in some versions of Linux, +it is rather _GNU_SOURCE than __USE_GNU (spotted on Alpine Linux for instance), +also for the sake of consistency as __USE_GNU seems not used across the code and +for last, it seems on Linux it is the best way to enable non portable code. +On Linux glibc's based versions, it seems _GNU_SOURCE defines __USE_GNU +it should be safe enough. +(cherry picked from commit 7ece096767d329d0ea04b70a1fb2c8b8a96b47e0) +(cherry picked from commit 5a0ac35503f88a7bc8ee2c4f865354fa6cc25901) +--- + src/haproxy.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/haproxy.c b/src/haproxy.c +index b94252d..20480a1 100644 +--- a/src/haproxy.c ++++ b/src/haproxy.c +@@ -25,6 +25,7 @@ + * + */ + ++#define _GNU_SOURCE + #include + #include + #include +@@ -47,9 +48,7 @@ + #include + #include + #ifdef USE_CPU_AFFINITY +-#define __USE_GNU + #include +-#undef __USE_GNU + #endif + + #ifdef DEBUG_FULL +-- +2.4.10 + -- 2.30.2