diff options
author | Jakub Kicinski <kuba@kernel.org> | 2020-10-31 17:28:17 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-10-31 17:34:19 -0700 |
commit | 859191b234f86b5f36cbe384baca1067a2221eb7 (patch) | |
tree | 07633504033079aca158db2c4fb988ca757629b9 /net/netfilter/ipset/ip_set_core.c | |
parent | ip_tunnel: fix over-mtu packet send fail without TUNNEL_DONT_FRAGMENT flags (diff) | |
parent | netfilter: ipset: Update byte and packet counters regardless of whether they match (diff) | |
download | wireguard-linux-859191b234f86b5f36cbe384baca1067a2221eb7.tar.xz wireguard-linux-859191b234f86b5f36cbe384baca1067a2221eb7.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
Pablo Neira Ayuso says:
====================
Netfilter fixes for net
The following patchset contains Netfilter fixes for net:
1) Incorrect netlink report logic in flowtable and genID.
2) Add a selftest to check that wireguard passes the right sk
to ip_route_me_harder, from Jason A. Donenfeld.
3) Pass the actual sk to ip_route_me_harder(), also from Jason.
4) Missing expression validation of updates via nft --check.
5) Update byte and packet counters regardless of whether they
match, from Stefano Brivio.
====================
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/netfilter/ipset/ip_set_core.c')
-rw-r--r-- | net/netfilter/ipset/ip_set_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset/ip_set_core.c index 6f35832f0de3..7cff6e5e7445 100644 --- a/net/netfilter/ipset/ip_set_core.c +++ b/net/netfilter/ipset/ip_set_core.c @@ -637,13 +637,14 @@ ip_set_match_extensions(struct ip_set *set, const struct ip_set_ext *ext, if (SET_WITH_COUNTER(set)) { struct ip_set_counter *counter = ext_counter(data, set); + ip_set_update_counter(counter, ext, flags); + if (flags & IPSET_FLAG_MATCH_COUNTERS && !(ip_set_match_counter(ip_set_get_packets(counter), mext->packets, mext->packets_op) && ip_set_match_counter(ip_set_get_bytes(counter), mext->bytes, mext->bytes_op))) return false; - ip_set_update_counter(counter, ext, flags); } if (SET_WITH_SKBINFO(set)) ip_set_get_skbinfo(ext_skbinfo(data, set), |