From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Fernando Fernandez Mancera <fmancera@suse.de>
Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
louis.t42@caramail.com, fw@strlen.de
Subject: Re: [PATCH nf] netfilter: nft_connlimit: fix duplicated tracking of a connection
Date: Tue, 28 Oct 2025 17:58:47 +0100 [thread overview]
Message-ID: <aQD2R1fQSJtMmTJc@calendula> (raw)
In-Reply-To: <20251027125730.3864-1-fmancera@suse.de>
On Mon, Oct 27, 2025 at 01:57:30PM +0100, Fernando Fernandez Mancera wrote:
> diff --git a/net/netfilter/nft_connlimit.c b/net/netfilter/nft_connlimit.c
> index fc35a11cdca2..19c8b5377e35 100644
> --- a/net/netfilter/nft_connlimit.c
> +++ b/net/netfilter/nft_connlimit.c
> @@ -43,9 +43,15 @@ static inline void nft_connlimit_do_eval(struct nft_connlimit *priv,
> return;
> }
>
> - if (nf_conncount_add(nft_net(pkt), priv->list, tuple_ptr, zone)) {
> - regs->verdict.code = NF_DROP;
> - return;
> + if (ctinfo == IP_CT_NEW) {
Quick question: Is this good enough to deal with retransmitted packets
while in NEW state?
> + if (nf_conncount_add(nft_net(pkt), priv->list, tuple_ptr, zone)) {
> + regs->verdict.code = NF_DROP;
> + return;
> + }
> + } else {
> + local_bh_disable();
> + nf_conncount_gc_list(nft_net(pkt), priv->list);
> + local_bh_enable();
> }
>
> count = READ_ONCE(priv->list->count);
> --
> 2.51.0
>
>
next prev parent reply other threads:[~2025-10-28 16:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-27 12:57 [PATCH nf] netfilter: nft_connlimit: fix duplicated tracking of a connection Fernando Fernandez Mancera
2025-10-27 13:47 ` Florian Westphal
2025-10-27 13:54 ` Fernando Fernandez Mancera
2025-10-28 16:58 ` Pablo Neira Ayuso [this message]
2025-10-28 17:06 ` Florian Westphal
2025-10-28 17:11 ` Pablo Neira Ayuso
2025-10-28 17:26 ` Florian Westphal
2025-10-28 18:23 ` Fernando Fernandez Mancera
2025-10-28 18:33 ` Florian Westphal
2025-10-28 18:36 ` Fernando Fernandez Mancera
2025-10-28 19:10 ` Florian Westphal
2025-10-28 20:48 ` Fernando Fernandez Mancera
2025-10-28 20:54 ` Florian Westphal
2025-10-29 8:03 ` Fernando Fernandez Mancera
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=aQD2R1fQSJtMmTJc@calendula \
--to=pablo@netfilter.org \
--cc=coreteam@netfilter.org \
--cc=fmancera@suse.de \
--cc=fw@strlen.de \
--cc=louis.t42@caramail.com \
--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.