From: Aurelien DARRAGON Date: Mon, 20 Nov 2023 10:33:20 +0000 (+0100) Subject: MINOR: backend: remove invalid mode test for "hash-balance-factor" X-Git-Tag: v2.9-dev12~101 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ffae3ca34bf9df9009fd3d3551ed2a9aa0857659;p=thirdparty%2Fhaproxy.git MINOR: backend: remove invalid mode test for "hash-balance-factor" This is a leftover from 1e0093a317 ("MINOR: backend/balance: "balance" requires TCP or HTTP mode"). Indeed, we cannot perform the test during parsing as the effective proxy type is not yet known. Moreover, thanks to b61147fd ("MEDIUM: log/balance: merge tcp/http algo with log ones") we could potentially benefit from this setting even in log mode, but for now it is ignored by all log compatible load-balancing algorithms. --- diff --git a/src/cfgparse-listen.c b/src/cfgparse-listen.c index ba265fe760..2b5cb4b53c 100644 --- a/src/cfgparse-listen.c +++ b/src/cfgparse-listen.c @@ -2571,12 +2571,6 @@ stats_error_parsing: } } else if (strcmp(args[0], "hash-balance-factor") == 0) { - if (curproxy->mode != PR_MODE_TCP && curproxy->mode != PR_MODE_HTTP) { - ha_alert("parsing [%s:%d] : '%s' requires TCP or HTTP mode.\n", file, linenum, args[0]); - err_code |= ERR_ALERT | ERR_FATAL; - goto out; - } - if (*(args[1]) == 0) { ha_alert("parsing [%s:%d] : '%s' expects an integer argument.\n", file, linenum, args[0]); err_code |= ERR_ALERT | ERR_FATAL;