netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH] libxt_cluster: fix inversion in the cluster match
Date: Sun, 06 Feb 2011 21:40:15 +0100	[thread overview]
Message-ID: <20110206204015.3401.51728.stgit@decadence> (raw)

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;


                 reply	other threads:[~2011-02-06 20:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110206204015.3401.51728.stgit@decadence \
    --to=pablo@netfilter.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).