mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ralf Lici <ralf@mandelbit.com>
To: Xavier HSINYUAN <XavierHsinyuan@outlook.com>
Cc: antonio@mandelbit.com, bgalvani@redhat.com,
	coreteam@netfilter.org, davem@davemloft.net, dsahern@kernel.org,
	dxld@darkboxed.org, edumazet@kernel.org, fw@strlen.de,
	horms@kernel.org, idosch@nvidia.com, kuba@kernel.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	netfilter-devel@vger.kernel.org, pabeni@redhat.com,
	pablo@netfilter.org, phil@nwl.cc, toke@kernel.org,
	xavierhsinyuan@outlook.com
Subject: Re: [RFC net-next v2 00/18] net: introduce ipxlat stateless IPv4/IPv6 translation
Date: Sat, 14 Nov 2026 10:47:21 +0100	[thread overview]
Message-ID: <20261114094722.114623-1-ralf@mandelbit.com> (raw)
In-Reply-To: <TYTPR01MB11000E65B4D5C27C27D7414B4CA762@TYTPR01MB11000.jpnprd01.prod.outlook.com>

On Fri, 06 Nov 2026 22:17:57 +0800, Xavier HSINYUAN <XavierHsinyuan@outlook.com> wrote:
> Hi Ralf,
>

Hi Xavier,

> Thanks for your v2 series!
>

Thanks for the review.

> Here is a question about netfilter hooks in ipxlat-lwt. In RFC v1,
> netdev-based ipxlat allows POST_ROUTING rules to be applied for
> original-family before translation. Currently LWT path translates first
> and does not check nf_hooks_lwtunnel to optionally run original-family
> POST_ROUTING before translation.
>
> Is this difference intentional since it keeps LWT path simple and leave
> such cases to netdev path, or would an optional pre-translation pass in
> LWT path also be worth considering?
>

Actually v2 has no netdevice attachment any more, the LWT is the only
harness in this series.

Aside from that, yes, the difference you describe follows from the v2
contract. The selecting route terminates original-family processing, so
that family only sees PRE_ROUTING (received) or LOCAL_OUT (local), and
FORWARD/POST_ROUTING/LOCAL_IN run in the translated family only. That is
indeed the first open question in the cover letter.

Looking into it again, there seems to be two concrete problems with that
contract:

- original-family conntrack entries are created at the entry hook and
  never confirmed, so stateful rules in that family see replies as new
  or invalid and a conventional ct state established firewall drops
  them;
- SNAT in the original family before translation is not possible, which
  rules out NAT44 in front of a CLAT and the NAPT66-based NAT64 recipe
  from the v1 documentation.

So I do not consider the current behaviour settled.

nf_hooks_lwtunnel is one way to add an original-family exit hook, and
seg6 is a good precedent for the hook placement. I am less sure about
the gate itself because it is global, cannot be switched off again, and
is off by default, so the default configuration would keep the problem.

Two alternatives I am evaluating are calling the exit hook
unconditionally, and moving the translation point to the LWT xmit stage
so the original family completes its normal path. I will come back with
a concrete proposal and a per-hook table.

Which setup do you have in mind: SNAT before translation, filtering, or
accounting?

-- 
Ralf Lici
Mandelbit Srl

      reply	other threads:[~2026-11-14  9:47 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-24  9:25 Ralf Lici
2026-10-24  9:25 ` [RFC net-next v2 01/18] lwtunnel: track callback dispatch separately from return value Ralf Lici
2026-10-24  9:25 ` [RFC net-next v2 02/18] ipv4/ipv6: add LWT receive helpers Ralf Lici
2026-10-24  9:25 ` [RFC net-next v2 03/18] ipv6: allow output fragmentation to reuse a Fragment Header Ralf Lici
2026-10-24  9:25 ` [RFC net-next v2 04/18] netfilter: preserve IPv6 refragmentation state across reassembly Ralf Lici
2026-10-24  9:25 ` [RFC net-next v2 05/18] net: ipxlat: add engine skeleton and configuration model Ralf Lici
2026-10-24  9:25 ` [RFC net-next v2 06/18] net: ipxlat: add RFC 6052 and EAM address translation Ralf Lici
2026-10-24  9:25 ` [RFC net-next v2 07/18] net: ipxlat: add packet metadata and header helpers Ralf Lici
2026-10-24  9:25 ` [RFC net-next v2 08/18] net: ipxlat: add IPv4 packet validation Ralf Lici
2026-10-24  9:25 ` [RFC net-next v2 09/18] net: ipxlat: add IPv6 " Ralf Lici
2026-10-24  9:25 ` [RFC net-next v2 10/18] net: ipxlat: add checksum and offload helpers Ralf Lici
2026-10-24  9:25 ` [RFC net-next v2 11/18] net: ipxlat: add IPv4/IPv6 header and transport translation Ralf Lici
2026-11-06 13:37   ` Xavier HSINYUAN
2026-11-14  9:28     ` Ralf Lici
2026-10-24  9:25 ` [RFC net-next v2 12/18] net: ipxlat: add translation preparation and dispatch Ralf Lici
2026-10-24  9:25 ` [RFC net-next v2 13/18] net: ipxlat: add translator-generated ICMP errors Ralf Lici
2026-10-24  9:25 ` [RFC net-next v2 14/18] net: ipxlat: add ICMP informational translation Ralf Lici
2026-10-24  9:25 ` [RFC net-next v2 15/18] net: ipxlat: add ICMP error and quoted-packet translation Ralf Lici
2026-10-24  9:25 ` [RFC net-next v2 16/18] net: ipxlat: add lightweight tunnel attachment Ralf Lici
2026-10-24  9:25 ` [RFC net-next v2 17/18] selftests: net: add ipxlat coverage Ralf Lici
2026-11-06 13:39   ` Xavier HSINYUAN
2026-11-14  9:31     ` Ralf Lici
2026-10-24  9:25 ` [RFC net-next v2 18/18] docs: networking: add ipxlat guide Ralf Lici
2026-11-06 14:17 ` [RFC net-next v2 00/18] net: introduce ipxlat stateless IPv4/IPv6 translation Xavier HSINYUAN
2026-11-14  9:47   ` Ralf Lici [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=20261114094722.114623-1-ralf@mandelbit.com \
    --to=ralf@mandelbit.com \
    --cc=XavierHsinyuan@outlook.com \
    --cc=antonio@mandelbit.com \
    --cc=bgalvani@redhat.com \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=dxld@darkboxed.org \
    --cc=edumazet@kernel.org \
    --cc=fw@strlen.de \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pablo@netfilter.org \
    --cc=phil@nwl.cc \
    --cc=toke@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

all inboxes | Powered by JetHome®