]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
extensions: libebt_mark: Fix mark target xlate
authorPhil Sutter <phil@nwl.cc>
Wed, 23 Nov 2022 02:35:34 +0000 (03:35 +0100)
committerPhil Sutter <phil@nwl.cc>
Thu, 24 Nov 2022 09:24:06 +0000 (10:24 +0100)
Target value is constructed setting all non-target bits to one instead
of zero.

Fixes: 03ecffe6c2cc0 ("ebtables-compat: add initial translations")
Signed-off-by: Phil Sutter <phil@nwl.cc>
extensions/libebt_mark.c

index 423c5c9133d0dceaf628a2d61ceb4060142b0764..40e49618e02152d41010b4be54aeec967f57a4ef 100644 (file)
@@ -201,7 +201,7 @@ static int brmark_xlate(struct xt_xlate *xl,
                return 0;
        }
 
-       tmp = info->target EBT_VERDICT_BITS;
+       tmp = info->target | ~EBT_VERDICT_BITS;
        xt_xlate_add(xl, "0x%lx %s ", info->mark, brmark_verdict(tmp));
        return 1;
 }