浏览代码

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 <heil@terminal-consulting.de>
heil 9 年前
父节点
当前提交
a69ba3efe3

+ 1
- 1
net/haproxy/Makefile 查看文件

@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
10 10
 
11 11
 PKG_NAME:=haproxy
12 12
 PKG_VERSION:=1.5.15
13
-PKG_RELEASE:=10
13
+PKG_RELEASE:=13
14 14
 PKG_SOURCE:=haproxy-$(PKG_VERSION).tar.gz
15 15
 PKG_SOURCE_URL:=http://haproxy.1wt.eu/download/1.5/src/
16 16
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)

+ 31
- 0
net/haproxy/patches/0011-BUG-MEDIUM-peers-table-entries-learned-from-a-remote.patch 查看文件

@@ -0,0 +1,31 @@
1
+From 96a1b4a969a5f3c9224d786c79e90d15a47094b0 Mon Sep 17 00:00:00 2001
2
+From: Emeric Brun <ebrun@haproxy.com>
3
+Date: Wed, 16 Dec 2015 15:16:46 +0100
4
+Subject: [PATCH 11/13] BUG/MEDIUM: peers: table entries learned from a remote
5
+ are pushed to others after a random delay.
6
+
7
+New sticktable entries learned from a remote peer can be pushed to others after
8
+a random delay because they are not inserted at the right position in the updates
9
+tree.
10
+(cherry picked from commit 234fc3c31e751f8191b9b78fa5fd16663c2627fe)
11
+(cherry picked from commit 8b1a697362977b8392caca3efaf97a5a8a8c782b)
12
+---
13
+ src/peers.c | 2 +-
14
+ 1 file changed, 1 insertion(+), 1 deletion(-)
15
+
16
+diff --git a/src/peers.c b/src/peers.c
17
+index 0564d3d..92b4df0 100644
18
+--- a/src/peers.c
19
++++ b/src/peers.c
20
+@@ -720,7 +720,7 @@ switchstate:
21
+ 							ts = stktable_store(ps->table->table, newts, 0);
22
+ 							newts = NULL; /* don't reuse it */
23
+ 
24
+-							ts->upd.key= (++ps->table->table->update)+(2^31);
25
++							ts->upd.key= (++ps->table->table->update)+(2147483648U);
26
+ 							eb = eb32_insert(&ps->table->table->updates, &ts->upd);
27
+ 							if (eb != &ts->upd) {
28
+ 								eb32_delete(eb);
29
+-- 
30
+2.4.10
31
+

+ 28
- 0
net/haproxy/patches/0012-BUG-MEDIUM-peers-old-stick-table-updates-could-be-re.patch 查看文件

@@ -0,0 +1,28 @@
1
+From a320fd146f802a851a396b2cde491711a4fb87cf Mon Sep 17 00:00:00 2001
2
+From: Emeric Brun <ebrun@haproxy.com>
3
+Date: Wed, 16 Dec 2015 15:28:12 +0100
4
+Subject: [PATCH 12/13] BUG/MEDIUM: peers: old stick table updates could be
5
+ repushed.
6
+
7
+Because the stick table updates tree was not properly initialized to EB_ROOT_UNIQUE.
8
+(cherry picked from commit 1c6235dbba0a67bad1d5e57ada88f28e1270a5cb)
9
+(cherry picked from commit 6e80935a77c8c2c67a982780a0f14c241f02f2aa)
10
+---
11
+ src/stick_table.c | 1 +
12
+ 1 file changed, 1 insertion(+)
13
+
14
+diff --git a/src/stick_table.c b/src/stick_table.c
15
+index 48d5710..6310690 100644
16
+--- a/src/stick_table.c
17
++++ b/src/stick_table.c
18
+@@ -385,6 +385,7 @@ int stktable_init(struct stktable *t)
19
+ 	if (t->size) {
20
+ 		memset(&t->keys, 0, sizeof(t->keys));
21
+ 		memset(&t->exps, 0, sizeof(t->exps));
22
++		t->updates = EB_ROOT_UNIQUE;
23
+ 
24
+ 		t->pool = create_pool("sticktables", sizeof(struct stksess) + t->data_size + t->key_size, MEM_F_SHARED);
25
+ 
26
+-- 
27
+2.4.10
28
+

+ 43
- 0
net/haproxy/patches/0013-CLEANUP-haproxy-using-_GNU_SOURCE-instead-of-__USE_G.patch 查看文件

@@ -0,0 +1,43 @@
1
+From 21fab69d332bfafd0a214ee29d8ad0779a055988 Mon Sep 17 00:00:00 2001
2
+From: David Carlier <devnexen@gmail.com>
3
+Date: Tue, 8 Dec 2015 21:43:09 +0000
4
+Subject: [PATCH 13/13] CLEANUP: haproxy: using _GNU_SOURCE instead of
5
+ __USE_GNU macro.
6
+
7
+In order to properly enable sched_setaffinity, in some versions of Linux,
8
+it is rather _GNU_SOURCE than __USE_GNU (spotted on Alpine Linux for instance),
9
+also for the sake of consistency as __USE_GNU seems not used across the code and
10
+for last, it seems on Linux it is the best way to enable non portable code.
11
+On Linux glibc's based versions, it seems _GNU_SOURCE defines __USE_GNU
12
+it should be safe enough.
13
+(cherry picked from commit 7ece096767d329d0ea04b70a1fb2c8b8a96b47e0)
14
+(cherry picked from commit 5a0ac35503f88a7bc8ee2c4f865354fa6cc25901)
15
+---
16
+ src/haproxy.c | 3 +--
17
+ 1 file changed, 1 insertion(+), 2 deletions(-)
18
+
19
+diff --git a/src/haproxy.c b/src/haproxy.c
20
+index b94252d..20480a1 100644
21
+--- a/src/haproxy.c
22
++++ b/src/haproxy.c
23
+@@ -25,6 +25,7 @@
24
+  *
25
+  */
26
+ 
27
++#define _GNU_SOURCE
28
+ #include <stdio.h>
29
+ #include <stdlib.h>
30
+ #include <unistd.h>
31
+@@ -47,9 +48,7 @@
32
+ #include <syslog.h>
33
+ #include <grp.h>
34
+ #ifdef USE_CPU_AFFINITY
35
+-#define __USE_GNU
36
+ #include <sched.h>
37
+-#undef __USE_GNU
38
+ #endif
39
+ 
40
+ #ifdef DEBUG_FULL
41
+-- 
42
+2.4.10
43
+