summaryrefslogtreecommitdiffstats
path: root/src/log.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:20:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:20:34 +0000
commitf3bb08bb1d94c77704371f8546a739119f0a05b4 (patch)
tree5dfb47fa424ecde655f8950098411a311e9296e6 /src/log.c
parentReleasing progress-linux version 2.9.6-1~progress7.99u1. (diff)
downloadhaproxy-f3bb08bb1d94c77704371f8546a739119f0a05b4.tar.xz
haproxy-f3bb08bb1d94c77704371f8546a739119f0a05b4.zip
Merging upstream version 2.9.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/log.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/log.c b/src/log.c
index 010ace9..42b905c 100644
--- a/src/log.c
+++ b/src/log.c
@@ -883,6 +883,7 @@ static void log_backend_srv_down(struct server *srv)
static int _postcheck_log_backend_compat(struct proxy *be)
{
int err_code = ERR_NONE;
+ int balance_algo = (be->lbprm.algo & BE_LB_ALGO);
if (!LIST_ISEMPTY(&be->tcp_req.inspect_rules) ||
!LIST_ISEMPTY(&be->tcp_req.l4_rules) ||
@@ -940,6 +941,13 @@ static int _postcheck_log_backend_compat(struct proxy *be)
err_code |= ERR_WARN;
free_server_rules(&be->server_rules);
}
+ if (balance_algo != BE_LB_ALGO_RR &&
+ balance_algo != BE_LB_ALGO_RND &&
+ balance_algo != BE_LB_ALGO_LS &&
+ balance_algo != BE_LB_ALGO_LH) {
+ ha_alert("in %s '%s': \"balance\" only supports 'roundrobin', 'random', 'sticky' and 'log-hash'.\n", proxy_type_str(be), be->id);
+ err_code |= ERR_ALERT | ERR_FATAL;
+ }
return err_code;
}