aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/gre_offload.c
diff options
context:
space:
mode:
authorAlexander Duyck <aduyck@mirantis.com>2016-03-22 16:18:07 -0700
committerDavid S. Miller <davem@davemloft.net>2016-03-23 14:19:08 -0400
commit5197f3499c470ccc4b247db66ff883e597e3adda (patch)
tree3e468a804a1b2fcd9c3478534347ed442be93973 /net/ipv4/gre_offload.c
parentnet: mediatek: fix checking for NULL instead of IS_ERR() in .probe (diff)
downloadlinux-dev-5197f3499c470ccc4b247db66ff883e597e3adda.tar.xz
linux-dev-5197f3499c470ccc4b247db66ff883e597e3adda.zip
net: Reset encap_level to avoid resetting features on inner IP headers
This patch corrects an oversight in which we were allowing the encap_level value to pass from the outer headers to the inner headers. As a result we were incorrectly identifying UDP or GRE tunnels as also making use of ipip or sit when the second header actually represented a tunnel encapsulated in either a UDP or GRE tunnel which already had the features masked. Fixes: 76443456227097179c1482 ("net: Move GSO csum into SKB_GSO_CB") Reported-by: Tom Herbert <tom@herbertland.com> Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Acked-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/gre_offload.c')
-rw-r--r--net/ipv4/gre_offload.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/gre_offload.c b/net/ipv4/gre_offload.c
index dd031617160a..c47539d04b88 100644
--- a/net/ipv4/gre_offload.c
+++ b/net/ipv4/gre_offload.c
@@ -49,6 +49,7 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *skb,
/* setup inner skb. */
skb->encapsulation = 0;
+ SKB_GSO_CB(skb)->encap_level = 0;
__skb_pull(skb, tnl_hlen);
skb_reset_mac_header(skb);
skb_set_network_header(skb, skb_inner_network_offset(skb));