netfilter: nft_quota: don't read quota twice on reset
Subsystems (2)
Pablo Neira Ayuso
maintainerPATCH 1/1 netfilter: nft_quota: don't read quota twice on reset
The quota is already fetched before reset, so there is no need to re-fetch it, otherwise userspace reports consumed quota is always zero on reset. This problem was likely introduced when rebasing this patchset.
Signed-off-by Pablo Neira Ayuso <[email protected]>
--- net/netfilter/nft_quota.c | 1 - 1 file changed, 1 deletion(-)
net/netfilter/nft_quota.c +0 -1
@@ -112,7 +112,6 @@ static int nft_quota_do_dump(struct sk_buff *skb, struct nft_quota *priv, consumed =atomic64_read (&priv->consumed); } - consumed =atomic64_read (&priv->consumed);/* Since we inconditionally increment consumed quota for each packet * that we see, don't go over the quota boundary in what we send to * userspace.
Signature · 1 line
2.1.4