]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerDavid S. Miller <davem@davemloft.net>
Sun, 21 Jul 2019 20:32:51 +0000 (13:32 -0700)
commitdc6b5fe1861b7b1d1dfd2b34f4baa19a5ba18e91
treead7e68bbfcbb8e66acce7611af31597eadfd9ca9
parent5c4e5d426060f98c65b8fadec97f3c568a5b117d
vrf: make sure skb->data contains ip header to make routing

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>
drivers/net/vrf.c