From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Zhongqiu Duan <dzq.aishenghu0@gmail.com>
Cc: coreteam@netfilter.org, netfilter-devel@vger.kernel.org,
Jozsef Kadlecsik <kadlec@netfilter.org>,
Florian Westphal <fw@strlen.de>, Simon Horman <horms@kernel.org>
Subject: Re: [PATCH nf] netfilter: nft_quota: make nft_overquota() really over the quota
Date: Mon, 14 Apr 2025 23:55:45 +0200 [thread overview]
Message-ID: <Z_2EYV1JiDkgf3gm@calendula> (raw)
In-Reply-To: <20250410071748.248027-1-dzq.aishenghu0@gmail.com>
On Thu, Apr 10, 2025 at 07:17:47AM +0000, Zhongqiu Duan wrote:
> Keep consistency with xt_quota and nfacct.
Where is the inconsistency?
> Fixes: 795595f68d6c ("netfilter: nft_quota: dump consumed quota")
> Signed-off-by: Zhongqiu Duan <dzq.aishenghu0@gmail.com>
> ---
> net/netfilter/nft_quota.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/netfilter/nft_quota.c b/net/netfilter/nft_quota.c
> index 9b2d7463d3d3..0bb43c723061 100644
> --- a/net/netfilter/nft_quota.c
> +++ b/net/netfilter/nft_quota.c
> @@ -21,7 +21,7 @@ struct nft_quota {
> static inline bool nft_overquota(struct nft_quota *priv,
> const struct sk_buff *skb)
> {
> - return atomic64_add_return(skb->len, priv->consumed) >=
> + return atomic64_add_return(skb->len, priv->consumed) >
> atomic64_read(&priv->quota);
From xt_quota:
if (priv->quota >= skb->len) {
priv->quota -= skb->len;
ret = !ret;
next prev parent reply other threads:[~2025-04-14 21:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-10 7:17 [PATCH nf] netfilter: nft_quota: make nft_overquota() really over the quota Zhongqiu Duan
2025-04-14 21:55 ` Pablo Neira Ayuso [this message]
2025-04-15 14:03 ` Zhongqiu Duan
2025-04-17 11:21 ` Pablo Neira Ayuso
2025-04-17 15:31 ` Zhongqiu Duan
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=Z_2EYV1JiDkgf3gm@calendula \
--to=pablo@netfilter.org \
--cc=coreteam@netfilter.org \
--cc=dzq.aishenghu0@gmail.com \
--cc=fw@strlen.de \
--cc=horms@kernel.org \
--cc=kadlec@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