ip_tunnel: be careful when accessing the inner header
authorPaolo Abeni <pabeni@redhat.com>
Mon, 24 Sep 2018 13:48:19 +0000 (15:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Oct 2018 07:13:21 +0000 (09:13 +0200)
commit2b7b2c4218a84e5b4143a275441459e2e6912529
treef4d50f412a9897332450af6eef3d248341c7c0f2
parent22c1e77811aeda092e3edcba3e421420097e0341
ip_tunnel: be careful when accessing the inner header

[ Upstream commit ccfec9e5cb2d48df5a955b7bf47f7782157d3bc2]

Cong noted that we need the same checks introduced by commit 76c0ddd8c3a6
("ip6_tunnel: be careful when accessing the inner header")
even for ipv4 tunnels.

Fixes: c54419321455 ("GRE: Refactor GRE tunneling code.")
Suggested-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/ip_tunnel.c