OSDN Git Service

ip_gre: check packet length and mtu correctly in erspan tx
authorWilliam Tu <u9012063@gmail.com>
Thu, 5 Oct 2017 19:07:12 +0000 (12:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Dec 2017 13:26:27 +0000 (14:26 +0100)
commit2f48fc1742a2da6196482695ec3bcd2438d24a13
tree09b807d995b72643608426c29ec03b0ac2f462c4
parent6d7bdad132d59c429dc340f8d10a4977e58813b0
ip_gre: check packet length and mtu correctly in erspan tx

[ Upstream commit f192970de860d3ab90aa9e2a22853201a57bde78 ]

Similarly to early patch for erspan_xmit(), the ARPHDR_ETHER device
is the length of the whole ether packet.  So skb->len should subtract
the dev->hard_header_len.

Fixes: 1a66a836da63 ("gre: add collect_md mode to ERSPAN tunnel")
Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN")
Signed-off-by: William Tu <u9012063@gmail.com>
Cc: Xin Long <lucien.xin@gmail.com>
Cc: David Laight <David.Laight@aculab.com>
Reviewed-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/ip_gre.c