]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libxt_cluster: fix inversion in the cluster match
authorPablo Neira Ayuso <pablo@netfilter.org>
Sun, 6 Feb 2011 20:34:33 +0000 (21:34 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sun, 6 Feb 2011 20:34:33 +0000 (21:34 +0100)
In libxt_cluster.c, we use:

info->flags |= (1 << XT_CLUSTER_F_INV);

but we should use instead:

info->flags |= XT_CLUSTER_F_INV;

since the definition of XT_CLUSTER_F_INV is:

enum xt_cluster_flags {
        XT_CLUSTER_F_INV        = (1 << 0)
};

This fixes the inversion in the cluster match.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
extensions/libxt_cluster.c

index edc14d3625352cfb5b3103043ca09c45a3f11ee5..e1607d04e26da0b8fce491822c4d721d13dcfdf4 100644 (file)
@@ -90,7 +90,7 @@ cluster_parse(int c, char **argv, int invert, unsigned int *flags,
                                      "`--cluster-local-node'", optarg);
                }
                if (invert)
-                       info->flags |= (1 << XT_CLUSTER_F_INV);
+                       info->flags |= XT_CLUSTER_F_INV;
 
                info->node_mask = node_mask = (1 << (num - 1));
                *flags |= 1 << c;
@@ -115,7 +115,7 @@ cluster_parse(int c, char **argv, int invert, unsigned int *flags,
                                      "`--cluster-local-node'", optarg);
                }
                if (invert)
-                       info->flags |= (1 << XT_CLUSTER_F_INV);
+                       info->flags |= XT_CLUSTER_F_INV;
 
                info->node_mask = node_mask = num;
                *flags |= 1 << c;