From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Ryoga Saito <contact@proelbtn.com>
Cc: netfilter-devel@vger.kernel.org, stefano.salsano@uniroma2.it,
andrea.mayer@uniroma2.it, davem@davemloft.net, kuba@kernel.org,
yoshfuji@linux-ipv6.org, dsahern@kernel.org,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v7 0/2] netfilter: add netfilter hooks to track SRv6-encapsulated flows
Date: Mon, 30 Aug 2021 02:10:34 +0200 [thread overview]
Message-ID: <20210830001034.GA15598@salvia> (raw)
In-Reply-To: <20210817083938.15051-1-contact@proelbtn.com>
On Tue, Aug 17, 2021 at 08:39:36AM +0000, Ryoga Saito wrote:
> Tunneling protocols such as VXLAN or IPIP are implemented using virtual
> network devices (vxlan0 or ipip0). Therefore, conntrack can record both
> inner flows and outer flows correctly. In contrast, SRv6 is implemented
> using lightweight tunnel infrastructure. Therefore, SRv6 packets are
> encapsulated and decapsulated without passing through virtual network
> device. Due to the following problems caused by this, conntrack can't
> record both inner flows and outer flows correctly.
>
> First problem is caused when SRv6 packets are encapsulated. In VXLAN, at
> first, packets received are passed to nf_conntrack_in called from
> ip_rcv/ipv6_rcv. These packets are sent to virtual network device and these
> flows are confirmed in ip_output/ip6_output. However, in SRv6, at first,
> packets are passed to nf_conntrack_in, encapsulated and flows are confirmed
> in ipv6_output even if inner packets are IPv4. Therefore, IPv6 conntrack
> needs to be enabled to track IPv4 inner flow.
>
> Second problem is caused when SRv6 packets are decapsulated. If IPv6
> conntrack is enabled, SRv6 packets are passed to nf_conntrack_in called
> from ipv6_rcv. Even if inner packets are passed to nf_conntrack_in after
> packets are decapsulated, flow aren't tracked because skb->_nfct is already
> set. Therefore, IPv6 conntrack needs to be disabled to track IPv4 flow
> when packets are decapsulated.
>
> This patch series solves these problems and allows conntrack to record
> inner flows correctly. It introduces netfilter hooks to srv6 lwtunnel
> and srv6local lwtunnel. It also introduces new sysctl toggle to turn on
> lightweight tunnel netfilter hooks. You can enable lwtunnel netfilter as
> following:
>
> sysctl net.netfilter.nf_hooks_lwtunnel=1
Applied to nf-next with a few edits. I'll post it to net-next in the
next pull request.
prev parent reply other threads:[~2021-08-30 0:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-17 8:39 [PATCH v7 0/2] netfilter: add netfilter hooks to track SRv6-encapsulated flows Ryoga Saito
2021-08-17 8:39 ` [PATCH v7 1/2] netfilter: add new sysctl toggle for lightweight tunnel netfilter hooks Ryoga Saito
2021-08-17 8:39 ` [PATCH v7 2/2] netfilter: add netfilter hooks to SRv6 data plane Ryoga Saito
2021-08-30 0:10 ` Pablo Neira Ayuso [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=20210830001034.GA15598@salvia \
--to=pablo@netfilter.org \
--cc=andrea.mayer@uniroma2.it \
--cc=contact@proelbtn.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=kuba@kernel.org \
--cc=lkp@intel.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=stefano.salsano@uniroma2.it \
--cc=yoshfuji@linux-ipv6.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.