[3.16.y-ckt extended stable] Patch "gre: Use inner mac length when computing tunnel length" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Mon Nov 10 11:32:26 UTC 2014


This is a note to let you know that I have just added a patch titled

    gre: Use inner mac length when computing tunnel length

to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.16.y-queue

This patch is scheduled to be released in version 3.16.7-ckt1.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From f0e49009fc33710d24d5923976921d97ad0d0d2a Mon Sep 17 00:00:00 2001
From: Tom Herbert <therbert at google.com>
Date: Thu, 30 Oct 2014 08:40:56 -0700
Subject: gre: Use inner mac length when computing tunnel length

commit 14051f0452a2c26a3f4791e6ad6a435e8f1945ff upstream.

Currently, skb_inner_network_header is used but this does not account
for Ethernet header for ETH_P_TEB. Use skb_inner_mac_header which
handles TEB and also should work with IP encapsulation in which case
inner mac and inner network headers are the same.

Tested: Ran TCP_STREAM over GRE, worked as expected.

Signed-off-by: Tom Herbert <therbert at google.com>
Acked-by: Alexander Duyck <alexander.h.duyck at redhat.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 net/ipv4/gre_offload.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/gre_offload.c b/net/ipv4/gre_offload.c
index f0bdd47bbbcb..32041ecbeafb 100644
--- a/net/ipv4/gre_offload.c
+++ b/net/ipv4/gre_offload.c
@@ -51,7 +51,7 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *skb,

 	greh = (struct gre_base_hdr *)skb_transport_header(skb);

-	ghl = skb_inner_network_header(skb) - skb_transport_header(skb);
+	ghl = skb_inner_mac_header(skb) - skb_transport_header(skb);
 	if (unlikely(ghl < sizeof(*greh)))
 		goto out;

--
2.1.0





More information about the kernel-team mailing list