]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ipv6: fix tunnel error handling
authorMichal Kubeček <mkubecek@suse.cz>
Tue, 3 Nov 2015 07:51:07 +0000 (08:51 +0100)
committerZefan Li <lizefan@huawei.com>
Wed, 26 Oct 2016 15:15:24 +0000 (23:15 +0800)
commitcd23f0e1d1847abc122500c622b8954425fea806
treea8b65c20866703bfec627f79a1aa985a85624dbd
parent0c760ac8778bbcac7e61e68465cf0258501d027d
ipv6: fix tunnel error handling

commit ebac62fe3d24c0ce22dd83afa7b07d1a2aaef44d upstream.

Both tunnel6_protocol and tunnel46_protocol share the same error
handler, tunnel6_err(), which traverses through tunnel6_handlers list.
For ipip6 tunnels, we need to traverse tunnel46_handlers as we do e.g.
in tunnel46_rcv(). Current code can generate an ICMPv6 error message
with an IPv4 packet embedded in it.

Fixes: 73d605d1abbd ("[IPSEC]: changing API of xfrm6_tunnel_register")
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Zefan Li <lizefan@huawei.com>
net/ipv6/tunnel6.c