vrf: make sure skb->data contains ip header to make routing
authorPeter Kosyh <p.kosyh@gmail.com>
Fri, 19 Jul 2019 08:11:47 +0000 (11:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Jul 2019 05:28:45 +0000 (07:28 +0200)
commite114a080353c1b19bd003e1b3b6904666c3b4f64
tree9584ace7912c8c8595465ac6a49f6dd2ff8cf03f
parent190cbbc468dfd46ab24f8632b850875ecc5033df
vrf: make sure skb->data contains ip header to make routing

[ Upstream commit 107e47cc80ec37cb332bd41b22b1c7779e22e018 ]

vrf_process_v4_outbound() and vrf_process_v6_outbound() do routing
using ip/ipv6 addresses, but don't make sure the header is available
in skb->data[] (skb_headlen() is less then header size).

Case:

1) igb driver from intel.
2) Packet size is greater then 255.
3) MPLS forwards to VRF device.

So, patch adds pskb_may_pull() calls in vrf_process_v4/v6_outbound()
functions.

Signed-off-by: Peter Kosyh <p.kosyh@gmail.com>
Reviewed-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/vrf.c