ipv6: fix tunnel error handling
authorMichal Kubeček <mkubecek@suse.cz>
Tue, 3 Nov 2015 07:51:07 +0000 (08:51 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 27 Nov 2015 12:48:22 +0000 (12:48 +0000)
commit29fbb7880914dcdefe243d1bb26990c64134404b
tree5bee0fc8664b3d50465d22814d67eb7aa1ab5133
parent6b8120dbc56a7ecc9e4b664d860011877bdce985
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: Ben Hutchings <ben@decadent.org.uk>
net/ipv6/tunnel6.c