]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 Oct 2017 22:17:21 +0000 (23:17 +0100)
commit7230b16f62716798c1bfb82aa50033e6fe53e4e3
tree7bf861cfcde3af50e17f534f24fa73d7892fe8fb
parent41a1d9e28318069a1a05cd8d1b44461c385693f8
ip_gre: check packet length and mtu correctly in erspan tx

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: 575e64543169 ("gre: add collect_md mode to ERSPAN tunnel")
Fixes: 468dae257e70 ("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>
net/ipv4/ip_gre.c