]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
extensions: libxt_connmark: Fix order of mask and mark
authorShivani Bhardwaj <shivanib134@gmail.com>
Wed, 1 Jun 2016 18:08:27 +0000 (23:38 +0530)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 2 Jun 2016 11:06:03 +0000 (13:06 +0200)
The order of mask and mark in the output is wrong. This has been pointed
out: http://git.netfilter.org/iptables/commit/?id=8548dd253833027c68ac6400c3118ef788fabe5d
by Liping Zhang <liping.zhang@spreadtrum.com>.
This patch fixes the same issue with connmark.

Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
extensions/libxt_connmark.c

index fbfeb743428c2865d85727ae3cc06561508ebf2b..958a50ceba8b6650c98ac66c2d01ed271275cf0f 100644 (file)
@@ -127,8 +127,8 @@ static void print_mark_xlate(unsigned int mark, unsigned int mask,
                             struct xt_xlate *xl, uint32_t op)
 {
        if (mask != 0xffffffffU)
-               xt_xlate_add(xl, " and 0x%x %s 0x%x ", mark,
-                          op == XT_OP_EQ ? "==" : "!=", mask);
+               xt_xlate_add(xl, " and 0x%x %s 0x%x ", mask,
+                          op == XT_OP_EQ ? "==" : "!=", mark);
        else
                xt_xlate_add(xl, " %s0x%x ",
                           op == XT_OP_EQ ? "" : "!= ", mark);