]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
extensions: libxt_devgroup: Fix order of mask and id
authorShivani Bhardwaj <shivanib134@gmail.com>
Thu, 2 Jun 2016 13:24:42 +0000 (18:54 +0530)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 2 Jun 2016 14:50:39 +0000 (16:50 +0200)
The order of mask and id in the translated code is not apt
so fix it.
This patch follows commit 8548dd by Liping Zhang.

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

index a30fff0fed1aafdf51d7a24796a7447b799f8da3..f110ea73c02763fa462081ff3b7802a801977d89 100644 (file)
@@ -158,8 +158,8 @@ print_devgroup_xlate(unsigned int id, uint32_t op,  unsigned int mask,
        const char *name = NULL;
 
        if (mask != 0xffffffff)
-               xt_xlate_add(xl, "and 0x%x %s 0x%x ", id,
-                          op == XT_OP_EQ ? "==" : "!=", mask);
+               xt_xlate_add(xl, "and 0x%x %s 0x%x ", mask,
+                          op == XT_OP_EQ ? "==" : "!=", id);
        else {
                if (numeric == 0)
                        name = xtables_lmap_id2name(devgroups, id);