Browse Source

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>
lilik-openwrt-22.03
heil 9 years ago
parent
commit
a69ba3efe3
4 changed files with 103 additions and 1 deletions
  1. +1
    -1
      net/haproxy/Makefile
  2. +31
    -0
      net/haproxy/patches/0011-BUG-MEDIUM-peers-table-entries-learned-from-a-remote.patch
  3. +28
    -0
      net/haproxy/patches/0012-BUG-MEDIUM-peers-old-stick-table-updates-could-be-re.patch
  4. +43
    -0
      net/haproxy/patches/0013-CLEANUP-haproxy-using-_GNU_SOURCE-instead-of-__USE_G.patch

+ 1
- 1
net/haproxy/Makefile View File

@ -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)


+ 31
- 0
net/haproxy/patches/0011-BUG-MEDIUM-peers-table-entries-learned-from-a-remote.patch View File

@ -0,0 +1,31 @@
From 96a1b4a969a5f3c9224d786c79e90d15a47094b0 Mon Sep 17 00:00:00 2001
From: Emeric Brun <ebrun@haproxy.com>
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

+ 28
- 0
net/haproxy/patches/0012-BUG-MEDIUM-peers-old-stick-table-updates-could-be-re.patch View File

@ -0,0 +1,28 @@
From a320fd146f802a851a396b2cde491711a4fb87cf Mon Sep 17 00:00:00 2001
From: Emeric Brun <ebrun@haproxy.com>
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

+ 43
- 0
net/haproxy/patches/0013-CLEANUP-haproxy-using-_GNU_SOURCE-instead-of-__USE_G.patch View File

@ -0,0 +1,43 @@
From 21fab69d332bfafd0a214ee29d8ad0779a055988 Mon Sep 17 00:00:00 2001
From: David Carlier <devnexen@gmail.com>
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 <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -47,9 +48,7 @@
#include <syslog.h>
#include <grp.h>
#ifdef USE_CPU_AFFINITY
-#define __USE_GNU
#include <sched.h>
-#undef __USE_GNU
#endif
#ifdef DEBUG_FULL
--
2.4.10

Loading…
Cancel
Save