]> git.baikalelectronics.ru Git - kernel.git/commit
vti6: fix input path
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Mon, 19 Sep 2016 14:17:57 +0000 (16:17 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Wed, 21 Sep 2016 08:09:14 +0000 (10:09 +0200)
commita64bea8db9591f2df18877a0bafb2d64d2a69375
tree2f16ef080b7a0b9fdd43915a33fd6ab2557eca2f
parent5d0d41954b3092346c652e7f9783d7a9623e588e
vti6: fix input path

Since commit 325a4169b7cb, vti6 is broken, all input packets are dropped
(LINUX_MIB_XFRMINNOSTATES is incremented).

XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip6 is set by vti6_rcv() before calling
xfrm6_rcv()/xfrm6_rcv_spi(), thus we cannot set to NULL that value in
xfrm6_rcv_spi().

A new function xfrm6_rcv_tnl() that enables to pass a value to
xfrm6_rcv_spi() is added, so that xfrm6_rcv() is not touched (this function
is used in several handlers).

CC: Alexey Kodanev <alexey.kodanev@oracle.com>
Fixes: 325a4169b7cb ("net/xfrm_input: fix possible NULL deref of tunnel.ip6->parms.i_key")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
include/net/xfrm.h
net/ipv6/ip6_vti.c
net/ipv6/xfrm6_input.c
net/ipv6/xfrm6_tunnel.c