Patch "ip_gre: check packet length and mtu correctly in erspan tx" has been added to the 4.14-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
ip_gre: check packet length and mtu correctly in erspan tx
to the 4.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ip_gre-check-packet-length-and-mtu-correctly-in-erspan-tx.patch
and it can be found in the queue-4.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Wed Dec 20 18:17:52 CET 2017
From: William Tu <[email protected]>
Date: Thu, 5 Oct 2017 12:07:12 -0700
Subject: ip_gre: check packet length and mtu correctly in erspan tx
From: William Tu <[email protected]>
[ 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.
--- net/ipv4/ip_gre.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
net/ipv4/ip_gre.c +4 -4
@@ -579,8 +579,8 @@ static void erspan_fb_xmit(struct sk_bufif (gre_handle_offloads (skb, false)) goto err_free_rt; -if (skb->len > dev->mtu) { -pskb_trim (skb, dev->mtu); +if (skb->len > dev->mtu + dev->hard_header_len) { +pskb_trim (skb, dev->mtu + dev->hard_header_len); truncate = true; }
@@ -731,8 +731,8 @@ static netdev_tx_t erspan_xmit(struct skif (skb_cow_head (skb, dev->needed_headroom)) goto free_skb; -if (skb->len - dev->hard_header_len > dev->mtu) { -pskb_trim (skb, dev->mtu); +if (skb->len > dev->mtu + dev->hard_header_len) { +pskb_trim (skb, dev->mtu + dev->hard_header_len); truncate = true; }
Patches currently in stable-queue which might be from [email protected] are
queue-4.14/ip_gre-check-packet-length-and-mtu-correctly-in-erspan-tx.patch