netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@kernel.org>
To: Martin Willi <martin@strongswan.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 09:37:33 -0600	[thread overview]
Message-ID: <8faa4219-9b67-7ba8-7058-e350623c437c@kernel.org> (raw)
In-Reply-To: <5572c06750a388056001d1b460d5e67c18fa2836.camel@strongswan.org>

On 4/13/22 3:05 AM, Martin Willi wrote:
> 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

sure, backport to stable will be easier.

> 
> 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?

ah, missed the strict branch use.

      reply	other threads:[~2022-04-13 15:37 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
2022-04-13 15:37     ` David Ahern [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=8faa4219-9b67-7ba8-7058-e350623c437c@kernel.org \
    --to=dsahern@kernel.org \
    --cc=fw@strlen.de \
    --cc=martin@strongswan.org \
    --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).