All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Willi <martin@strongswan.org>
To: David Ahern <dsahern@kernel.org>,
	Pablo Neira Ayuso <pablo@netfilter.org>,
	Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH nf] netfilter: Update ip6_route_me_harder to consider L3 domain
Date: Wed, 13 Apr 2022 11:05:22 +0200	[thread overview]
Message-ID: <5572c06750a388056001d1b460d5e67c18fa2836.camel@strongswan.org> (raw)
In-Reply-To: <a64e1342-c953-40c5-2afb-0e9654e7d002@kernel.org>

Hi David,

> > @@ -39,6 +38,13 @@ int ip6_route_me_harder(struct net *net, struct
> > sock *sk_partial, struct sk_buff
> >  	};
> >  	int err;
> >  
> > +	if (sk && sk->sk_bound_dev_if)
> > +		fl6.flowi6_oif = sk->sk_bound_dev_if;
> > +	else if (strict)
> > +		fl6.flowi6_oif = dev->ifindex;
> > +	else
> > +		fl6.flowi6_oif = l3mdev_master_ifindex(dev);
> 
> For top of tree, this is now fl6.flowi6_l3mdev

Ah, I see, missed that.

Given that IPv4 should be converted to flowi4_l3mdev as well (?), what
about:

 * Keep the IPv6 patch in this form, as this allows stable to pick it
   up as-is
 * I'll add a follow-up patch, which converts both to flowi[46]_l3mdev

This would avoid some noise for a separate stable patch, but let me
know what you prefer.

>  and dev is only needed here so make this:
> 	fl6.flowi6_l3mdev = l3mdev_master_ifindex(skb_dst(skb)->dev);

Actually it is used in that "strict" branch, this is why I've added
"dev" as a local variable. I guess that is still needed
with flowi6_l3mdev?

Thanks,
Martin


  reply	other threads:[~2022-04-13  9:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-12  7:46 [PATCH nf] netfilter: Update ip6_route_me_harder to consider L3 domain Martin Willi
2022-04-12 14:19 ` David Ahern
2022-04-13  9:05   ` Martin Willi [this message]
2022-04-13 15:37     ` David Ahern

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=5572c06750a388056001d1b460d5e67c18fa2836.camel@strongswan.org \
    --to=martin@strongswan.org \
    --cc=dsahern@kernel.org \
    --cc=fw@strlen.de \
    --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 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.