Skip to content

Commit a164b95

Browse files
Phil Sutterummakynes
authored andcommitted
netfilter: ipset: Fix subcounter update skip
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: 6e01781 ("netfilter: ipset: set match: add support to match the counters") Signed-off-by: Phil Sutter <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent e9c284e commit a164b95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/netfilter/ipset/ip_set_list_set.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ list_set_ktest(struct ip_set *set, const struct sk_buff *skb,
5959
/* Don't lookup sub-counters at all */
6060
opt->cmdflags &= ~IPSET_FLAG_MATCH_COUNTERS;
6161
if (opt->cmdflags & IPSET_FLAG_SKIP_SUBCOUNTER_UPDATE)
62-
opt->cmdflags &= ~IPSET_FLAG_SKIP_COUNTER_UPDATE;
62+
opt->cmdflags |= IPSET_FLAG_SKIP_COUNTER_UPDATE;
6363
list_for_each_entry_rcu(e, &map->members, list) {
6464
ret = ip_set_test(e->id, skb, par, opt);
6565
if (ret <= 0)

0 commit comments

Comments
 (0)