netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libxt_cluster: fix inversion in the cluster match
@ 2011-02-06 20:40 Pablo Neira Ayuso
  0 siblings, 0 replies; only message in thread
From: Pablo Neira Ayuso @ 2011-02-06 20:40 UTC (permalink / raw)
  To: netfilter-devel

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 |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/extensions/libxt_cluster.c b/extensions/libxt_cluster.c
index edc14d3..e1607d0 100644
--- a/extensions/libxt_cluster.c
+++ b/extensions/libxt_cluster.c
@@ -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;


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-02-06 20:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-06 20:40 [PATCH] libxt_cluster: fix inversion in the cluster match Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).