]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: global: Fix tune.disable-(fast-forward/zero-copy-forwarding) options
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 24 Nov 2023 08:23:04 +0000 (09:23 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 24 Nov 2023 08:33:56 +0000 (09:33 +0100)
These options were not properly handled during configration parsing. A wrong
bitwise operation was used.

No backport needed.

src/cfgparse-global.c

index 9e7e3324bcf199fe09b4490a37c44f0bbdd361b1..a80ac854f6ccbdb861c656cb1fe4c36edd708e58 100644 (file)
@@ -515,12 +515,12 @@ int cfg_parse_global(const char *file, int linenum, char **args, int kwm)
 
                if (alertif_too_many_args(0, file, linenum, args, &err_code))
                        goto out;
-               global.tune.options &= GTUNE_USE_FAST_FWD;
+               global.tune.options &= ~GTUNE_USE_FAST_FWD;
        }
        else if (strcmp(args[0], "tune.disable-zero-copy-forwarding") == 0) {
                if (alertif_too_many_args(0, file, linenum, args, &err_code))
                        goto out;
-               global.tune.options &= GTUNE_USE_ZERO_COPY_FWD;
+               global.tune.options &= ~GTUNE_USE_ZERO_COPY_FWD;
        }
        else if (strcmp(args[0], "cluster-secret") == 0) {
                blk_SHA_CTX sha1_ctx;