All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org, kuba@kernel.org
Subject: [PATCH 2/5] netfilter: ipset: Fix subcounter update skip
Date: Mon, 25 May 2020 23:54:17 +0200	[thread overview]
Message-ID: <20200525215420.2290-3-pablo@netfilter.org> (raw)
In-Reply-To: <20200525215420.2290-1-pablo@netfilter.org>

From: Phil Sutter <phil@nwl.cc>

If IPSET_FLAG_SKIP_SUBCOUNTER_UPDATE is set, user requested to not
update counters in sub sets. Therefore IPSET_FLAG_SKIP_COUNTER_UPDATE
must be set, not unset.

Fixes: 6e01781d1c80e ("netfilter: ipset: set match: add support to match the counters")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 net/netfilter/ipset/ip_set_list_set.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netfilter/ipset/ip_set_list_set.c b/net/netfilter/ipset/ip_set_list_set.c
index cd747c0962fd..5a67f7966574 100644
--- a/net/netfilter/ipset/ip_set_list_set.c
+++ b/net/netfilter/ipset/ip_set_list_set.c
@@ -59,7 +59,7 @@ list_set_ktest(struct ip_set *set, const struct sk_buff *skb,
 	/* Don't lookup sub-counters at all */
 	opt->cmdflags &= ~IPSET_FLAG_MATCH_COUNTERS;
 	if (opt->cmdflags & IPSET_FLAG_SKIP_SUBCOUNTER_UPDATE)
-		opt->cmdflags &= ~IPSET_FLAG_SKIP_COUNTER_UPDATE;
+		opt->cmdflags |= IPSET_FLAG_SKIP_COUNTER_UPDATE;
 	list_for_each_entry_rcu(e, &map->members, list) {
 		ret = ip_set_test(e->id, skb, par, opt);
 		if (ret <= 0)
-- 
2.20.1


  parent reply	other threads:[~2020-05-25 21:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-25 21:54 [PATCH 0/5] Netfilter fixes for net Pablo Neira Ayuso
2020-05-25 21:54 ` [PATCH 1/5] netfilter: nft_reject_bridge: enable reject with bridge vlan Pablo Neira Ayuso
2020-05-25 21:54 ` Pablo Neira Ayuso [this message]
2020-05-25 21:54 ` [PATCH 3/5] netfilter: nf_conntrack_pptp: prevent buffer overflows in debug code Pablo Neira Ayuso
2020-05-27 11:55   ` kbuild test robot
2020-05-25 21:54 ` [PATCH 4/5] netfilter: conntrack: make conntrack userspace helpers work again Pablo Neira Ayuso
2020-05-26 18:45   ` Jakub Kicinski
2020-05-27 14:51   ` kbuild test robot
2020-05-25 21:54 ` [PATCH 5/5] netfilter: nfnetlink_cthelper: unbreak userspace helper support Pablo Neira Ayuso
2020-05-26  1:29 ` [PATCH 0/5] Netfilter fixes for net David Miller
2020-05-26 20:10   ` Pablo Neira Ayuso
2020-05-26 23:08     ` David Miller

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=20200525215420.2290-3-pablo@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.