]> Pileus Git - ~andy/linux/commit
xfrm: choose protocol family by skb protocol
authorHannes Frederic Sowa <hannes@stressinduktion.org>
Sun, 18 Aug 2013 11:47:01 +0000 (13:47 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Mon, 19 Aug 2013 07:39:04 +0000 (09:39 +0200)
commit844d48746e4b281a933aedc0428048a1219b42f4
treed456114029573629bada5ee6882e89f18c42cb18
parent5d0ff542d0264f61dc4bdb34eba39ffb4ea3bc23
xfrm: choose protocol family by skb protocol

We need to choose the protocol family by skb->protocol. Otherwise we
call the wrong xfrm{4,6}_local_error handler in case an ipv6 sockets is
used in ipv4 mode, in which case we should call down to xfrm4_local_error
(ip6 sockets are a superset of ip4 ones).

We are called before before ip_output functions, so skb->protocol is
not reset.

Cc: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
include/net/xfrm.h
net/xfrm/xfrm_output.c