Linux Netfilter development
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Ren Wei <weir@nebusec.ai>
Cc: netfilter-devel@vger.kernel.org, pablo@netfilter.org,
	phil@nwl.cc, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
	kaber@trash.net, vega@nebusec.ai, caoruide123@gmail.com
Subject: Re: [PATCH nf 1/1] netfilter: ecache: bound destroy event redelivery
Date: Tue, 22 Sep 2026 23:03:49 +0200	[thread overview]
Message-ID: <arLtL4Azj6d7Juxe@strlen.de> (raw)
In-Reply-To: <48840876b129e0094fbd8048e96fb6e3fae51055.1787158072.git.vega.cover-letter@nebusec.ai>

Ren Wei <weir@nebusec.ai> wrote:
> From: Ruide Cao <caoruide123@gmail.com>
> 
> A conntrack whose destroy event cannot be delivered is kept on the
> per-netns ecache list while the workqueue retries the notification.
> The worker stops at the first failure and retries every 10 ms without
> a lifetime limit. A listener that enables NETLINK_BROADCAST_ERROR and
> never drains its receive queue can therefore retain conntracks and
> keep the worker busy indefinitely.

Yes, that's by design.  This feature intentionally blocks new
conntracks.

> +	if (!cnet->ecache.retry_deadline)
> +		cnet->ecache.retry_deadline = jiffies + ECACHE_RETRY_TIMEOUT;
> +
> +	if (time_after_eq(jiffies, cnet->ecache.retry_deadline)) {
> +		hlist_nulls_for_each_entry_safe(h, n, &cnet->ecache.dying_list,
> +						hnnode) {
> +			struct nf_conn *ct = nf_ct_tuplehash_to_ctrack(h);
> +
> +			hlist_nulls_del_rcu(&ct->tuplehash[IP_CT_DIR_ORIGINAL].hnnode);
> +			hlist_nulls_add_head(&ct->tuplehash[IP_CT_DIR_REPLY].hnnode,
> +					     &evicted_list);
> +		}
> +		ret = STATE_DONE;
> +		goto out_unlock;
> +	}

I doubt this is correct.  Userspace that can deal with missing destroy
events SHOULD NOT enable reliable event delivery mode.

      reply	other threads:[~2026-09-22 21:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22 17:39 [PATCH nf 0/1] netfilter: ecache: bound destroy event redelivery Ren Wei
2026-09-22 17:39 ` [PATCH nf 1/1] " Ren Wei
2026-09-22 21:03   ` Florian Westphal [this message]

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=arLtL4Azj6d7Juxe@strlen.de \
    --to=fw@strlen.de \
    --cc=caoruide123@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kaber@trash.net \
    --cc=kuba@kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pablo@netfilter.org \
    --cc=phil@nwl.cc \
    --cc=vega@nebusec.ai \
    --cc=weir@nebusec.ai \
    /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