Subject: Re: [PATCH next v2 0/7] Introduce l3_dev pointer for L3 processing

From: Nicolas Dichtel <[email-masked]>
Date: Thu, 17 Mar 2016 09:47:47 +0100

Le 14/03/2016 18:57, Mahesh Bandewar a écrit :
> On Sun, Mar 13, 2016 at 8:53 PM, David Miller <[email-masked]> wrote:
[snip]
>> Furthermore, when you walk across the ns boundary, that old device has
>> to disappear.  That's why that is the device assigned to skb->dev.
>>
> The layer boundaries are not that well maintained. We do check for the xfrm
> policies in L4 and expect the skb->dev pointing to the L3 device. So unless we
> have a way to derive a L3 dev from skb->dev, I don't think xfrm will
> work. Unless
> some Xfrm-expert asserts that this is not needed.
Adding a hook "at the right place" to do the switch is probably the better way.
For xfrm, you will need to handle it in this hook or rearrange things.
I don't think that a quick and easy solution will be possible.