[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20161014.110356.1414076388878308737.davem@davemloft.net>
Date: Fri, 14 Oct 2016 11:03:56 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: tom@...bertland.com
Cc: netdev@...r.kernel.org, kernel-team@...com
Subject: Re: [PATCH net-next 0/5] udp: Flow dissection for tunnels
From: Tom Herbert <tom@...bertland.com>
Date: Thu, 13 Oct 2016 12:29:46 -0700
> On Thu, Oct 13, 2016 at 12:17 PM, David Miller <davem@...emloft.net> wrote:
>> This socket lookup is very heavy handed, and I realize that you
>> need this because we no longer store the encapsulation socket in
>> skb->sk these days.
>>
> I don't quite understand your point about the encapsulation socket.
On the transmit side we used to have an issue wrt. what socket lives
on skb->sk when encapsulation is involved.
The problem is that we need skb->sk to be the transport level socket,
but in the output path we used to make tests on "skb->sk" to determine
things such as the multicast loopback flag. But we should be looking
at the tunnel socket for that, otherwise we could do crazy things
like dereference an AF_PACKET socket as if it were an inet socket one.
As such we modified the output path to pass the inner tunnel socket
'sk' down through the call chain, as an argument to functions such as
ip_queue_xmit(), ip_local_out*(), etc.
Powered by blists - more mailing lists