netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Florian Westphal <fw@strlen.de>, netdev@vger.kernel.org
Cc: netfilter-devel@vger.kernel.org, lschlesinger@drivenets.com,
	dsahern@kernel.org, pablo@netfilter.org, crosser@average.org
Subject: Re: [PATCH v2 net-next 2/2] vrf: run conntrack only in context of lower/physdev for locally generated packets
Date: Mon, 25 Oct 2021 08:25:16 -0600	[thread overview]
Message-ID: <b148c973-c4e9-e4ea-6045-2111f00eaa79@gmail.com> (raw)
In-Reply-To: <20211025141400.13698-3-fw@strlen.de>

On 10/25/21 8:14 AM, Florian Westphal wrote:
> The VRF driver invokes netfilter for output+postrouting hooks so that users
> can create rules that check for 'oif $vrf' rather than lower device name.
> 
> This is a problem when NAT rules are configured.
> 
> To avoid any conntrack involvement in round 1, tag skbs as 'untracked'
> to prevent conntrack from picking them up.
> 
> This gets cleared before the packet gets handed to the ip stack so
> conntrack will be active on the second iteration.
> 
> One remaining issue is that a rule like
> 
>   output ... oif $vrfname notrack
> 
> won't propagate to the second round because we can't tell
> 'notrack set via ruleset' and 'notrack set by vrf driver' apart.
> However, this isn't a regression: the 'notrack' removal happens
> instead of unconditional nf_reset_ct().
> I'd also like to avoid leaking more vrf specific conditionals into the
> netfilter infra.
> 
> For ingress, conntrack has already been done before the packet makes it
> to the vrf driver, with this patch egress does connection tracking with
> lower/physical device as well.
> 
> Signed-off-by: Florian Westphal <fw@strlen.de>
> ---
>  drivers/net/vrf.c | 28 ++++++++++++++++++++++++----
>  1 file changed, 24 insertions(+), 4 deletions(-)
> 

Acked-by: David Ahern <dsahern@kernel.org>



  reply	other threads:[~2021-10-25 14:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25 14:13 [PATCH v2 net-next 0/2] vrf: rework interaction with netfilter/conntrack Florian Westphal
2021-10-25 14:13 ` [PATCH v2 net-next 1/2] netfilter: conntrack: skip confirmation and nat hooks in postrouting for vrf Florian Westphal
2021-10-25 14:14 ` [PATCH v2 net-next 2/2] vrf: run conntrack only in context of lower/physdev for locally generated packets Florian Westphal
2021-10-25 14:25   ` David Ahern [this message]
2021-10-26 12:36   ` Pablo Neira Ayuso
2021-10-26 12:58     ` Florian Westphal
2021-10-26 13:16       ` Pablo Neira Ayuso
2021-10-26 12:30 ` [PATCH v2 net-next 0/2] vrf: rework interaction with netfilter/conntrack patchwork-bot+netdevbpf

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=b148c973-c4e9-e4ea-6045-2111f00eaa79@gmail.com \
    --to=dsahern@gmail.com \
    --cc=crosser@average.org \
    --cc=dsahern@kernel.org \
    --cc=fw@strlen.de \
    --cc=lschlesinger@drivenets.com \
    --cc=netdev@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).