[prev in list] [next in list] [prev in thread] [next in thread]
List: git-commits-head
Subject: gre: Use inner mac length when computing tunnel length
From: "Linux Kernel Mailing List" <linux-kernel () vger ! kernel ! org>
Date: 2014-10-31 22:19:57
Message-ID: 20141031221957.4B6F266110C () gitolite ! kernel ! org
[Download RAW message or body]
Gitweb: http://git.kernel.org/linus/;a=commit;h=14051f0452a2c26a3f4791e6ad6a435e8f1945ff
Commit: 14051f0452a2c26a3f4791e6ad6a435e8f1945ff
Parent: 292dd6542f90126826fe87b302e6afa3b7ada6b8
Refname: refs/heads/master
Author: Tom Herbert <therbert@google.com>
AuthorDate: Thu Oct 30 08:40:56 2014 -0700
Committer: David S. Miller <davem@davemloft.net>
CommitDate: Thu Oct 30 19:51:56 2014 -0400
gre: Use inner mac length when computing tunnel length
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@google.com>
Acked-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
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 f6e345c..bb5947b 100644
--- a/net/ipv4/gre_offload.c
+++ b/net/ipv4/gre_offload.c
@@ -47,7 +47,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;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic