netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Eugene Crosser <crosser@average.org>, netdev@vger.kernel.org
Cc: netfilter-devel@vger.kernel.org, David Ahern <dsahern@gmail.com>,
	Florian Westphal <fw@strlen.de>,
	Lahav Schlesinger <lschlesinger@drivenets.com>
Subject: Re: [PATCH net 1/1] vrf: Revert "Reset skb conntrack connection..."
Date: Tue, 19 Oct 2021 20:02:29 -0600	[thread overview]
Message-ID: <e8dca460-7f5a-ee90-865c-dbb8bb0aa5d6@gmail.com> (raw)
In-Reply-To: <20211018182250.23093-2-crosser@average.org>

On 10/18/21 12:22 PM, Eugene Crosser wrote:
> This reverts commit 09e856d54bda5f288ef8437a90ab2b9b3eab83d1.
> 
> When an interface is enslaved in a VRF, prerouting conntrack hook is
> called twice: once in the context of the original input interface, and
> once in the context of the VRF interface. If no special precausions are
> taken, this leads to creation of two conntrack entries instead of one,
> and breaks SNAT.
> 
> Commit above was intended to avoid creation of extra conntrack entries
> when input interface is enslaved in a VRF. It did so by resetting
> conntrack related data associated with the skb when it enters VRF context.
> 
> However it breaks netfilter operation. Imagine a use case when conntrack
> zone must be assigned based on the original input interface, rather than
> VRF interface (that would make original interfaces indistinguishable). One
> could create netfilter rules similar to these:
> 
>         chain rawprerouting {
>                 type filter hook prerouting priority raw;
>                 iif realiface1 ct zone set 1 return
>                 iif realiface2 ct zone set 2 return
>         }
> 
> This works before the mentioned commit, but not after: zone assignment
> is "forgotten", and any subsequent NAT or filtering that is dependent
> on the conntrack zone does not work.
> 
...

> 
> Signed-off-by: Eugene Crosser <crosser@average.org>
> ---
>  drivers/net/vrf.c | 4 ----
>  1 file changed, 4 deletions(-)
> 

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



  reply	other threads:[~2021-10-20  2:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 18:22 [PATCH net] vrf: Revert "Reset skb conntrack connection..." Eugene Crosser
2021-10-18 18:22 ` [PATCH net 1/1] " Eugene Crosser
2021-10-20  2:02   ` David Ahern [this message]
2021-10-20 10:29   ` 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=e8dca460-7f5a-ee90-865c-dbb8bb0aa5d6@gmail.com \
    --to=dsahern@gmail.com \
    --cc=crosser@average.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).