Re: [PATCH net-next v2] xfrm: make local error reporting more robust
From: David Miller <davem@davemloft.net>
Date: 2013-08-13 23:35:08
From: Hannes Frederic Sowa <redacted> Date: Tue, 13 Aug 2013 03:56:44 +0200
On Mon, Aug 12, 2013 at 07:54:14AM +0200, Steffen Klassert wrote:quoted
On Sat, Aug 10, 2013 at 06:16:29PM +0200, Hannes Frederic Sowa wrote:quoted
Seems skb->encapsulated helps, but I still have to wire it up for the ipv6 tunnels. I just prototyped this patch, but I fear I now introduced a dependency from core xfrm to ipv6, which I would like to have prevented (this would even happen if I put xfrm_local_error in a header file). Is this actually a problem? I fear so. The other way would be to put the local_error handler as function pointers somewhere reachable from struct sock.Maybe we should put a local_error() function pointer to struct xfrm_state_afinfo and call it via inner_mode->afinfo->local_error(). This should always call the right local_error function and we would not need to touch generic networking code to fix it.Sorry, had to do a v2, because I missed two more unsafe skb->sk dereferences. I will post a further one (unsafe determination of mtu) as a seperate patch (needs its own commit message). [PATCH net-next v2] xfrm: make local error reporting more robust
FWIW, this looks fine to me, and I hope Steffen will take care of it soon.