]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
Revert "MINOR: stktable: "stick" requires TCP or HTTP mode"
authorAurelien DARRAGON <adarragon@haproxy.com>
Fri, 17 Nov 2023 17:01:37 +0000 (18:01 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 18 Nov 2023 10:16:21 +0000 (11:16 +0100)
This reverts commit 098ae743fd17b3fae6671e53d9bdb74eb3f315fd since we
cannot perform the test during parsing as the effective proxy mode is
not yet known.

src/cfgparse-listen.c

index 49c7c7b2555ccb6c61bfdb9a604355b6353e6091..8981ef2b428b21871eac2ec8aafff6af658d399b 100644 (file)
@@ -1546,13 +1546,6 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
                        goto out;
                }
 
-               if (curproxy->mode != PR_MODE_TCP && curproxy->mode != PR_MODE_HTTP) {
-                       ha_alert("parsing [%s:%d] : 'stick-table' requires TCP or HTTP mode.\n",
-                                file, linenum);
-                       err_code |= ERR_ALERT | ERR_FATAL;
-                       goto out;
-               }
-
                other = stktable_find_by_name(curproxy->id);
                if (other) {
                        ha_alert("parsing [%s:%d] : stick-table name '%s' conflicts with table declared in %s '%s' at %s:%d.\n",
@@ -1605,13 +1598,6 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
                        goto out;
                }
 
-               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 (warnifnotcap(curproxy, PR_CAP_BE, file, linenum, args[0], NULL)) {
                        err_code |= ERR_WARN;
                        goto out;