netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Florian Westphal <fw@strlen.de>
Cc: Eugene Crosser <crosser@average.org>,
	netdev@vger.kernel.org, netfilter-devel@vger.kernel.org,
	Lahav Schlesinger <lschlesinger@drivenets.com>,
	David Ahern <dsahern@kernel.org>
Subject: Re: Commit 09e856d54bda5f288ef8437a90ab2b9b3eab83d1r "vrf: Reset skb conntrack connection on VRF rcv" breaks expected netfilter behaviour
Date: Tue, 19 Oct 2021 08:34:01 -0600	[thread overview]
Message-ID: <c0279807-2f5b-4fe4-d7f5-d545b95860a7@gmail.com> (raw)
In-Reply-To: <20211019114939.GD28644@breakpoint.cc>

On 10/19/21 5:49 AM, Florian Westphal wrote:
> David Ahern <dsahern@gmail.com> wrote:
>> Thanks for the detailed summary and possible solutions.
>>
>> NAT/MASQ rules with VRF were not really thought about during
>> development; it was not a use case (or use cases) Cumulus or other NOS
>> vendors cared about. Community users were popping up fairly early and
>> patches would get sent, but no real thought about how to handle both
>> sets of rules - VRF device and port devices.
>>
>> What about adding an attribute on the VRF device to declare which side
>> to take -- rules against the port device or rules against the VRF device
>> and control the nf resets based on it?
> 
> This would need a way to suppress the NF_HOOK invocation from the
> normal IP path.  Any idea on how to do that?  AFAICS there is no way to
> get to the vrf device at that point, so no way to detect the toggle.
> 
> Or did you mean to only suppress the 2nd conntrack round?

My thought was that the newly inserted nf_reset_ct fixed one use case
and breaks another, so the new attribute would control that call.

> 
> For packets that get forwarded we'd always need to run those in the vrf
> context, afaics, because doing an nf_reset() may create a new conntrack
> entry (if flow has DNAT, then incoming address has been reversed
> already, so it won't match existing REPLY entry in the conntrack table anymore).
> 
> For locally generated packets, we could skip conntrack for VRF context
> via 'skb->_nfct = UNTRACKED' + nf_reset_ct before xmit to lower device,
> and for lower device by eliding the reset entirely.
> 

ok.

  parent reply	other threads:[~2021-10-19 14:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-12 13:28 Commit 09e856d54bda5f288ef8437a90ab2b9b3eab83d1r "vrf: Reset skb conntrack connection on VRF rcv" breaks expected netfilter behaviour Eugene Crosser
2021-10-13  9:22 ` Florian Westphal
2021-10-15 21:04   ` Florian Westphal
2021-10-16 18:51     ` David Ahern
2021-10-18 14:34       ` Florian Westphal
2021-10-18 18:14         ` David Ahern
2021-10-19 11:49           ` Florian Westphal
2021-10-19 13:21             ` Eugene Crosser
2021-10-19 14:34             ` David Ahern [this message]
2021-10-19 14:46               ` Florian Westphal
2021-10-19 21:41     ` Jakub Kicinski
2021-10-13 12:28 ` Lahav Schlesinger
2021-10-13 12:58   ` Florian Westphal

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=c0279807-2f5b-4fe4-d7f5-d545b95860a7@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 \
    /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).