From: Florian Westphal <fw@strlen.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf-next v2] netfilter: nft_ct: support expectation creation for natted flows
Date: Tue, 30 Jun 2026 13:04:42 +0200 [thread overview]
Message-ID: <akOitclorHvJsREK@strlen.de> (raw)
In-Reply-To: <akOVqk9WOTpIKCss@chamomile>
Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > +#if IS_ENABLED(CONFIG_NF_NAT)
> > + nf_ct_expect_iterate_destroy(expect_iter_nat, NULL);
> > + synchronize_rcu();
> > +#endif
>
> Not sure sashiko is signalling a real issue here.
I could use the nf_nat_helper_register/unregister interface which would
support dump/restore via ctnetlink / conntrackd.
Not sure its worth it.
This isn't using nat-follow-master directly to avoid a module dependency
on the nat core.
> static void __exit nf_nat_cleanup(void)
> {
> struct nf_nat_proto_clean clean = {};
>
> nf_ct_iterate_destroy(nf_nat_proto_clean, &clean);
>
> all NATted master conntracks are destroyed here, including their
> expectations, which might have the expectations using
> nat_follow_master.
Yes, but users can remove nft_ct and leave nf nat core loaded,
so above function won't run. The expect_iter_nat cb will zap
expectations that are still in the table that point to the
internal expectfn (i.e. into the module thats going away).
The alternative to the manual nf_ct_iterate_destroy() is to use
nf_ct_helper_expectfn_destroy() and a real struct nf_ct_helper_expectfn.
> And nf_nat_cleanup() can only be called if all there is no more nat
> chains in place, correct?
Yes, but I don't think thats related to the sashiko comment at
https://sashiko.dev/#/patchset/20260630060311.2504-1-fw%40strlen.de
next prev parent reply other threads:[~2026-06-30 11:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 6:03 [PATCH nf-next v2] netfilter: nft_ct: support expectation creation for natted flows Florian Westphal
2026-06-30 10:08 ` Pablo Neira Ayuso
2026-06-30 11:04 ` Florian Westphal [this message]
2026-06-30 14:20 ` Pablo Neira Ayuso
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=akOitclorHvJsREK@strlen.de \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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